Control method of vehicle refrigerator and electronic device
By installing a camera inside the vehicle refrigerator, real-time image capture and calculation of the average grayscale value can be performed to automatically determine the presence or absence of items. This solves the problems of poor user experience and energy waste in existing vehicle refrigerator control methods, achieving automated control and energy-saving effects.
Patent Information
- Application Number
- CN202310374390.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-10
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-04-10
AI Technical Summary
The existing control methods for in-vehicle refrigerators result in a poor user experience, cumbersome manual operation, and serious energy waste, especially in green new energy vehicles.
The system uses cameras to capture real-time images of the interior of the vehicle refrigerator. By detecting color blocks and calculating the average grayscale value of white and black blocks, it automatically determines whether items are placed inside, thereby controlling the refrigerator's opening and closing.
It enables automated control of the vehicle refrigerator, improving the user experience and reducing energy waste.
Smart Images

Figure CN116399078B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicle refrigerator control, and in particular to a control method of a vehicle refrigerator and an electronic device. BACKGROUND
[0002] In order to meet the needs of vehicle users for the multifunction of vehicles, equipping a vehicle refrigerator becomes one of the routine choices for some vehicles. The vehicle is equipped with a vehicle refrigerator, so that the vehicle user can put various things suitable for cold storage (such as wine bottles containing wine, soda bottles, fruits, etc.) into the vehicle refrigerator, and in the process of driving the vehicle, the vehicle user can open the vehicle refrigerator to take out the things in the vehicle refrigerator, so as to improve the driving experience of the vehicle user.
[0003] At present, the vehicle refrigerator is basically controlled by a fixed switch to start and stop the operation of the refrigerator. Generally, the refrigerator will start to run automatically as soon as the vehicle is powered on. If there is no article in the refrigerator at this time, starting the refrigerator will cause a waste of energy consumption. Especially with the popularization of green new energy vehicles, the air conditioner of the vehicle is a big energy consumption in summer, so saving the operation of other vehicle equipment is a very important work.
[0004] Therefore, the existing vehicle refrigerator in China needs to be opened or closed each time by a manual switch or a timing switch, which will inevitably cause the problems of poor user experience, tedious manual operation, and energy waste caused by the vehicle refrigerator. SUMMARY
[0005] The purpose of the present application is to provide a control method of a vehicle refrigerator to solve the problems of poor user experience, tedious manual operation, and energy waste caused by the vehicle refrigerator with a manual switch.
[0006] In a first aspect, to solve the above technical problems, the present application provides a control method of a vehicle refrigerator, characterized in that the control method is applied to a vehicle refrigerator with a camera device, the camera device is fixed in the vehicle refrigerator and can shoot the inside bottom and the inside side wall of the vehicle refrigerator, and the camera device is connected with a control terminal, and the control method comprises the following steps:
[0007] When a preset camera shooting condition is met, the camera device is controlled to collect an inside bottom image and / or an inside side wall image of the vehicle refrigerator;
[0008] The inside bottom image and / or the inside side wall image of the vehicle refrigerator is subjected to color block detection calculation to obtain the white block gray mean value and the black block gray mean value of the inside bottom image and / or the inside side wall image;
[0009] Judge whether the white block gray mean and the black block gray mean meet the preset threshold requirement, and when the judgment result is yes, it is determined that the vehicle-mounted refrigerator is placed with articles, and the vehicle-mounted refrigerator is started.
[0010] Further, the control method of the vehicle-mounted refrigerator provided by the present application can further include: if the judgment result is no, it is determined that the vehicle-mounted refrigerator is not placed with articles, and the vehicle-mounted refrigerator is turned off, so that the vehicle-mounted refrigerator is powered off.
[0011] Further, when the preset camera shooting condition is met, the step of controlling the camera device to collect the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator can include:
[0012] When the control terminal detects that the vehicle-mounted refrigerator is powered on or the refrigerator door thereof is closed, a shooting instruction is sent to the camera device;
[0013] The camera device receiving the shooting instruction is started, and the internal bottom and / or the internal side wall of the vehicle-mounted refrigerator is shot to obtain the internal bottom image and / or the internal side wall image.
[0014] Further, while the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator is collected, the image information of the internal bottom image and / or the internal side wall image can also be obtained, and the image information includes the gray value Y of the image, the width W of the image, and the height H of the image.
[0015] Further, the step of performing color block detection calculation on the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator can include:
[0016] The internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator is divided into black and white color blocks to obtain a color block image corresponding to the internal bottom image and / or the internal side wall image, wherein the color block image contains a plurality of black color blocks and a plurality of white color blocks arranged at intervals;
[0017] For each color block, the image block gray mean of each color block is calculated;
[0018] According to the image block gray mean corresponding to each of all white color blocks and all black color blocks in the color block image, the total gray mean of all white color blocks and the total gray mean of all black color blocks in the color block image are calculated;
[0019] The total gray mean of all white color blocks is taken as the white block gray mean, and the total gray mean of all black color blocks is taken as the black block gray mean.
[0020] Further, the step of calculating the image block gray mean value of each color block can comprise:
[0021] dividing the entire area of each color block into a plurality of square sub-areas, and selecting a plurality of square sub-areas from the plurality of square sub-areas;
[0022] calculating the image block gray mean value of each color block based on the selected plurality of square sub-areas by using a single image block gray mean value calculation formula.
[0023] Further, the plurality of square sub-areas can have the same area.
[0024] Further, the image block gray mean value calculation formula can be specifically as follows:
[0025]
[0026] wherein, is the image block gray mean value of a color block t in the color block image, m is the number of selected square sub-areas in the color block t, n is the number of pixel points of each selected square sub-area in the color block t, j is any one of the m selected square sub-areas in the color block t, i is the pixel point number of each selected square sub-area in the color block t, Y (ij)t is the gray value of the pixel i corresponding to the jth square sub-area in the color block t, n is not less than 9, and m is not less than 5.
[0027] Further, the calculation formula for calculating the total gray mean value of all white color blocks or all black color blocks in the color block image can be specifically as follows:
[0028]
[0029] wherein, is the total gray mean value of all white color blocks or all black color blocks, b is the total number of all white color blocks or all black color blocks contained in the color block image, t is a color block number, and t has a value of 1, 2,..., K, is the image block gray mean value of a color block t in the color block image, and the color block t can be a white color block or a black color block.
[0030] Further, the white color block and the black color block can have the same size.
[0031] Further, the step of judging whether the white block gray mean value and the black block gray mean value satisfy the preset threshold requirement can comprise:
[0032] comparing the total gray mean value of all white color blocks with a first threshold value X1, and comparing the total gray mean value of all black color blocks with a second threshold value X2;
[0033] If the total gray mean value of all white color blocks is within the range of the first threshold value X1, and the total gray mean value of all black color blocks is within the range of the second threshold value X2, it is determined that the vehicle-mounted refrigerator has placed an article.
[0034] Further, the range of the first threshold value X1 can be specifically 200 < X1 ≤ 255.
[0035] Further, the range of the second threshold value X2 can be specifically 0 ≤ X2 < 50.
[0036] In a second aspect, based on the control method of the vehicle-mounted refrigerator as described above, the application further provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus.
[0037] The memory is used to store a computer program.
[0038] The processor is used to execute the program stored on the memory, so as to realize the steps of the control method of the vehicle-mounted refrigerator as described above.
[0039] In a third aspect, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the steps of any of the control methods of the vehicle-mounted refrigerator.
[0040] Compared with the prior art, the technical scheme of the application has at least one of the following beneficial effects:
[0041] In the control method of the vehicle-mounted refrigerator provided in the application, by using the camera device (for example, a camera) arranged in the vehicle-mounted refrigerator, the inside bottom and the inside side wall of the vehicle-mounted refrigerator are photographed in real time when the vehicle-mounted refrigerator is powered on or the refrigerator door thereof is closed, and then the inside bottom image and / or the inside side wall image of the vehicle-mounted refrigerator is collected. Then, the color block detection calculation is performed on the collected inside bottom image and / or the inside side wall image, and then the white block gray mean value and the black block gray mean value of the inside bottom image and / or the inside side wall image are obtained. Then, whether an article is placed in the vehicle-mounted refrigerator is judged according to the white block gray mean value and the black block gray mean value. If yes, the vehicle-mounted refrigerator is powered on to start. If not, the vehicle-mounted refrigerator is powered off to stop in time.
[0042] The control method provided by the application can use the image information of the bottom or side wall of the refrigerator collected by the camera device built in the vehicle-mounted refrigerator to determine whether the bottom or side wall of the refrigerator is covered, and further determine whether there is an article in the vehicle-mounted refrigerator, that is, the function of automatically stopping when the vehicle-mounted refrigerator is empty and automatically starting in time when there is an article in the vehicle-mounted refrigerator is realized, that is, the automatic control of the vehicle-mounted refrigerator is realized, the user experience is improved, and the problem of waste battery energy consumption of the vehicle-mounted refrigerator is also solved. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 A flowchart of a control method of a vehicle-mounted refrigerator provided in an embodiment of the application is shown.
[0044] Figure 2 A structural diagram of an electronic device provided in an embodiment of the application is shown. DETAILED DESCRIPTION
[0045] The specific embodiments of the application will be described in more detail below with reference to the accompanying drawings. The advantages and features of the application will be more apparent according to the following description. It should be noted that the drawings are very simplified and use non-precise proportions, only to facilitate and clarify the purpose of assisting the description of the embodiments of the application.
[0046] As described in the background, in the prior art, at present, the vehicle-mounted refrigerator is basically controlled by a fixed switch to start and stop the operation of the refrigerator. Generally, the refrigerator will start to run as soon as the vehicle is powered on, which will cause waste of energy if there is no article in the refrigerator. Especially with the popularization of green new energy vehicles, the air conditioner of the vehicle consumes a lot of energy in summer, so it is very important to save the operation of other vehicle-mounted devices.
[0047] Therefore, in the prior art, the vehicle-mounted refrigerator needs to be opened or closed by a manual switch or a timing switch every time, which will inevitably cause the problems of poor user experience, tedious manual operation and waste of energy consumption of the vehicle-mounted refrigerator.
[0048] Therefore, the application provides a control method of a vehicle-mounted refrigerator to solve the problems of poor user experience, tedious manual operation and waste of energy consumption of the vehicle-mounted refrigerator caused by the manual switch.
[0049] First, a control method of a vehicle-mounted refrigerator provided in an embodiment of the application will be introduced.
[0050] It should be noted that the control method for a vehicle-mounted refrigerator provided in this embodiment of the invention is applied to a vehicle-mounted refrigerator equipped with a camera device, which is fixed inside the refrigerator and can capture images of the interior bottom and interior sidewalls. In specific applications, the camera device can be any electronic device currently capable of capturing images in real time to obtain YUV image data.
[0051] Furthermore, to achieve image data transmission, the camera device fixed inside the vehicle refrigerator, which can capture images of the interior bottom and side walls, needs to be connected to a control terminal. This connection technology can be Bluetooth, a local area network (LAN), or a server. The control terminal can be an electronic device such as a mobile phone or laptop. Of course, the connection technology between the camera device and the control terminal in this embodiment can be any technology that connects the camera device and the control terminal; no limitation is made here.
[0052] See Figure 1 , Figure 1 This is a flowchart illustrating a control method for a vehicle-mounted refrigerator according to an embodiment of the present invention, as shown below. Figure 1 As shown, this method is applied to a vehicle-mounted refrigerator equipped with a camera device. The camera device is fixed inside the vehicle-mounted refrigerator, capable of capturing images of the interior bottom and interior sidewalls, and is connected to a control terminal. The control method includes the following steps:
[0053] Step S101: When the preset camera shooting conditions are met, control the camera device to acquire the internal bottom image and / or internal side wall image of the vehicle refrigerator.
[0054] In this embodiment, a camera device (such as a webcam) electrically connected to the control terminal is installed inside the vehicle refrigerator. The shooting angle of the camera device needs to be adjusted so that it can at least capture the bottom and side walls (also referred to as the internal bottom or internal side walls) of the vehicle refrigerator used for placing items. Then, the control terminal is connected to the camera device via electrical connection. After that, a shooting condition for the camera device is set, that is, when the control terminal detects that the vehicle refrigerator with the camera device installed inside has performed some specific operation, it uses this as a trigger command (also understood as a shooting command) for the camera device to start shooting. Then, it controls the camera device to start, and the camera device completes the shooting of the internal bottom or internal side walls of the vehicle refrigerator, thereby obtaining an image of the internal bottom and / or internal side walls of the vehicle refrigerator in YUV data format.
[0055] The control method of the vehicle-mounted refrigerator provided in the embodiment is specifically used for detecting whether the vehicle-mounted refrigerator is placed with articles in real time, and different operations are performed according to different situations of whether the vehicle-mounted refrigerator is placed with articles, that is, when the vehicle-mounted refrigerator is placed with articles, the vehicle-mounted refrigerator is started in time, and when the vehicle-mounted refrigerator is not placed with articles, the vehicle-mounted refrigerator is turned off in time, so as to realize the purpose of reducing the waste of battery energy of the vehicle-mounted refrigerator while ensuring that the vehicle-mounted refrigerator is fully utilized. Therefore, the preset photographing condition of the camera shooting device can be a photographing condition triggered by an operation action of the vehicle-mounted refrigerator, and of course, the photographing condition can also be a photographing condition triggered by other factors in the vehicle-mounted refrigerator, for example, can be a pressure sensing factor of the bottom and / or the side wall in the vehicle-mounted refrigerator (when the pressure sensed by the side wall or the bottom is greater than a certain value, it indicates that the side wall or the bottom can be placed with articles at this time, that is, the camera shooting device can be triggered to shoot), or can also be an odor detection factor in the vehicle-mounted refrigerator, and the like.
[0056] As a preferred example, the preset photographing condition of the camera shooting device in the embodiment of the application can be that the vehicle-mounted refrigerator is powered on or the refrigerator door of the vehicle-mounted refrigerator is closed.
[0057] That is, when the preset photographing condition is met, the step of controlling the camera shooting device to capture the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator can specifically include:
[0058] Step S101.1, when the control terminal detects that the vehicle-mounted refrigerator is powered on or the refrigerator door of the vehicle-mounted refrigerator is closed, a shooting instruction is sent to the camera shooting device;
[0059] Step S101.2, the camera shooting device receiving the shooting instruction is started, and the internal bottom and / or the internal side wall of the vehicle-mounted refrigerator is shot to obtain the internal bottom image and / or the internal side wall image.
[0060] Further, while the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator is captured, image information of the internal bottom image and / or the internal side wall image is also obtained, and the image information includes a gray value Y of the image, a width W of the image, and a height H of the image.
[0061] Because the YUV data format image has only Y channel data to be obtained for input detection, and only W*H of the image is required for storage space, and the Y component information is the gray information of the image, therefore, when detection is performed, the black and white image detection is facilitated, and the memory cost of the image detection is reduced. Therefore, the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator captured by the camera shooting device such as the camera in the embodiment of the application is preferably a YUV data format image.
[0062] Step S102, color block detection calculation is performed on the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator to obtain the white block gray mean value and the black block gray mean value of the internal bottom image and / or the internal side wall image.
[0063] In this embodiment, after obtaining the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator and the image information corresponding to the image by the above step S101, the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator is subjected to black and white color block segmentation to obtain a color block image corresponding to the internal bottom image and / or the internal side wall image, wherein the color block image contains a plurality of black color blocks and a plurality of white color blocks arranged at intervals, and the size of the black color blocks and the white color blocks is the same; then, the image block gray mean value of each color block is calculated; then, the total gray mean value of all white color blocks and the total gray mean value of all black color blocks in the color block image are calculated according to the image block gray mean value corresponding to each of all white color blocks and all black color blocks in the color block image; finally, the total gray mean value of all white color blocks is taken as the white block gray mean value, and the total gray mean value of all black color blocks is taken as the black block gray mean value.
[0064] As a preferred example, the step of calculating the image block gray mean value of each color block can specifically include:
[0065] Step S102.1, dividing the entire area of each color block into a plurality of square small areas, and selecting a plurality of square small areas from the plurality of square small areas;
[0066] Step S102.2, calculating the image block gray mean value of each color block by using a single image block gray mean value calculation formula based on the selected plurality of square small areas.
[0067] The areas of the plurality of square small areas can be the same.
[0068] The image block gray mean value calculation formula can be specifically as follows:
[0069]
[0070] wherein, is the image block gray mean value of color block t in the color block image, m is the number of selected square small areas in color block t, n is the number of pixel points of each selected square small area in color block t, j is any one of the m selected square small areas in color block t, i is the pixel point number of each selected square small area in color block t, Y(ij)t is the gray value of the corresponding pixel i in the jth square sub-region in the color block t, the value of n is not less than 9, and the value of m is not less than 5.
[0071] Further, the calculation formula of the total gray mean value of all white color blocks or all black color blocks in the color block image can be specifically:
[0072]
[0073] wherein, is the total gray mean value of all white color blocks or all black color blocks, b is the total number of all white color blocks or all black color blocks contained in the color block image, t is the color block number, and t takes the value of 1, 2, …, K, is the image block gray mean value of the color block t in the color block image, and the color block t can be a white color block or a black color block.
[0074] In the embodiment, after obtaining the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator, the internal bottom image and / or the internal side wall image can be first divided into a plurality of interval-arranged black and white color blocks, then the entire region of each color block (black color block or white color block) is regionally divided, and then a plurality of small regions are divided on the region of each color block. Preferably, in the embodiment of the application, the shape of the divided small regions is set to be square, and in other embodiments, it can be any other shape, for example, rectangular, parallelogram, etc. Then, for each color block, a few small regions with square shape (referred to as square small regions for short) are selected from the upper part, the middle part and the lower part of the entire region of the color block, respectively. For example, 2 square small regions are taken from the upper part of each color block, 1 square small region is taken from the middle part, and 2 square small regions are taken from the lower part, i.e. 5 square small regions are taken from each color block, and for example, the size of each square small region is 3*3. Then, the image block gray mean value of each white color block and black color block contained in the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator can be calculated according to the above formula (1), and then the total gray mean value of all white color blocks in the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator is calculated by using the formula (2), and the total gray mean value of all black color blocks is obtained in the same way. Then, the total gray mean value of the white color blocks and the total gray mean value of all black color blocks are respectively verified by threshold requirement according to the following step S103, and then the purpose of automatically and real-timely determining whether there is an article placed in the vehicle-mounted refrigerator is finally realized through the steps of black and white color block division and calculation.
[0075] It should be noted that in the embodiment of the present application, when the inside bottom image and / or the inside side wall image of the vehicle-mounted refrigerator is collected by the camera device in the above step S101, it can be that the inside bottom image and the inside side wall image of the vehicle-mounted refrigerator are collected at the same time, and then the operation processes of steps S102 and S103 are performed on the inside bottom image and the inside side wall image respectively, or it can also be that only the inside bottom image or the inside side wall image of the vehicle-mounted refrigerator is collected, and then the operation processes of steps S102 and S103 are performed, and the embodiment of the present application does not make specific limitation on this.
[0076] In step S103, it is judged whether the white block gray mean value and the black block gray mean value both satisfy the preset threshold requirement, and when the judgment result is yes, it is determined that the vehicle-mounted refrigerator has placed articles therein, and the vehicle-mounted refrigerator is started.
[0077] As a preferred example, the step of judging whether the white block gray mean value and the black block gray mean value both satisfy the preset threshold requirement in the embodiment of the present application can include:
[0078] In step S103.1, the total gray mean value of all white color blocks is compared with a first threshold X1, and the total gray mean value of all black color blocks is compared with a second threshold X2.
[0079] In step S103.2, if the total gray mean value of all white color blocks is within the range of the first threshold X1, and the total gray mean value of all black color blocks is within the range of the second threshold X2, it is determined that the vehicle-mounted refrigerator has placed articles therein.
[0080] The range of the first threshold X1 can be specifically 200 < X1 < 255, that is, the value of the first threshold X1 can be 201, 202, 205, 210, 215, 215.1, 215.5, 220, 225, 230, 235, 240, 245, 250, 255, a region composed of any two of the above numbers and any integer or decimal within the region, etc.; the range of the second threshold X2 can be specifically 0 < X2 < 50, that is, the value of the second threshold X2 can be 0, 1, 2, 2.1, 2.5, 2.55, 3, 3.5, 4, 5, 10, 15, 20, 25, 30, 40, 50, a region composed of any two of the above numbers and any integer or decimal within the region, etc.
[0081] After the above step S103, the control method of the vehicle-mounted refrigerator provided in the embodiment of the present application can further include the following steps:
[0082] Step S104, if the result is no, it is determined that the vehicle-mounted refrigerator is not placed in the article, and the vehicle-mounted refrigerator is closed to make the vehicle-mounted refrigerator power off.
[0083] In summary, in the control method of the vehicle-mounted refrigerator provided in the application, by using the camera device (for example, a camera) arranged in the vehicle-mounted refrigerator, the inside bottom and the inside side wall of the vehicle-mounted refrigerator are photographed in real time when the vehicle-mounted refrigerator is powered on or the refrigerator door thereof is closed, and then the inside bottom image and / or the inside side wall image of the vehicle-mounted refrigerator are collected, and then the white block gray mean value and the black block gray mean value of the inside bottom image and / or the inside side wall image are obtained by performing color block detection calculation on the collected inside bottom image and / or the inside side wall image, and then whether the vehicle-mounted refrigerator is placed with an article is judged according to the white block gray mean value and the black block gray mean value, if yes, the vehicle-mounted refrigerator is powered on to be opened, and if no, the vehicle-mounted refrigerator is powered off to be closed in time.
[0084] Due to the control method provided in the application, the image information of the refrigerator bottom or side wall collected by the camera device built in the vehicle-mounted refrigerator is used to judge whether the bottom or side wall of the vehicle-mounted refrigerator is covered, and then whether the vehicle-mounted refrigerator is placed with an article is judged, that is, the function that the vehicle-mounted refrigerator can be automatically stopped when the vehicle-mounted refrigerator encounters an empty refrigerator and can be automatically started in time when the inside of the vehicle-mounted refrigerator is placed with an article is realized, that is, the automatic control of the vehicle-mounted refrigerator is realized, the user's use experience is improved, and the problem of waste battery energy consumption of the vehicle-mounted refrigerator is also solved.
[0085] The embodiment of the application further provides an electronic device, as shown in the figure, Figure 2 The processor 201, the communication interface 202 and the memory 203 complete mutual communication through the communication bus 204,
[0086] The memory 203 is used for storing a computer program;
[0087] The processor 201 is used for executing the program stored on the memory 203, and realizes the control method of the vehicle-mounted refrigerator provided in the embodiment of the application.
[0088] Specifically, the control method of the vehicle-mounted refrigerator is applied to the vehicle-mounted refrigerator with the camera device, the camera device is fixed in the vehicle-mounted refrigerator and connected with the control terminal, and the control method comprises the following steps:
[0089] When the preset camera shooting condition is met, the camera device is controlled to collect an internal bottom image and / or an internal side wall image of the vehicle-mounted refrigerator;
[0090] The internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator are subjected to color block detection calculation to obtain a white block gray mean value and a black block gray mean value of the internal bottom image and / or the internal side wall image;
[0091] It is judged whether the white block gray mean value and the black block gray mean value both satisfy a preset threshold requirement, and when the judgment result is yes, it is determined that an article is placed in the vehicle-mounted refrigerator, and the vehicle-mounted refrigerator is started.
[0092] In addition, the processor 201 executes a program stored on the memory 203 to realize another implementation manner of the control method of the vehicle-mounted refrigerator, which is the same as the implementation manners mentioned in the foregoing method embodiment part, and thus will not be described herein again.
[0093] The communication bus mentioned by the control terminal can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0094] The communication interface is used for communication between the electronic device and other devices.
[0095] The memory can include a random access memory (RAM) and can also include a non-volatile memory (NVM), for example, at least one disk memory. Optionally, the memory can also be at least one storage device located away from the foregoing processor.
[0096] The processor described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0097] In yet another embodiment provided by the present application, a computer readable storage medium is provided, and the computer readable storage medium stores instructions, which, when executed on a computer, cause the computer to perform the control method of the vehicle refrigerator described in any of the above embodiments.
[0098] In the above embodiments, the implementation can be achieved entirely or partially by software, hardware, firmware or any combination thereof. When implemented by software, the implementation can be achieved entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the flow or function described in the embodiments of the present application is entirely or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)) and the like.
[0099] It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting; it is not intended to exclude myriad other embodiments of the present application that other present or future devices perform the same function under a different name. It must be noted that, as used in the specification and the appended claims, the singular forms "a," "an" and "the" include plural referents unless the context clearly dictates otherwise. Thus, for example, reference to "a component" can include a plurality of such components. In this specification and in the claims, the term "when" should be understood to mean "whereupon" or "upon" when used in close proximity to defining an action in conjunction with one or more other actions or events, such as, for example, "when A happens, B happens" or "when A occurs, B occurs." The terms "program" or software are used herein in a generic sense to refer to any type of computer code or set of computer-executable instructions that can be employed to program a computer or other processor configuration to implement various aspects associated with the present application. Additionally, the term "coupled" is used herein to express a relationship between or among multiple elements and / or components in a manner that can be internal or external, temporary or permanent, directly or indirectly, wired or wireless, or some combination of the above. Such terms, when used in a context containing other terms are understood to encompass the other terms, for example, the term "coupled" is not limited to "universally coupled" but can also mean "universally coupled," "universally coupled in some manner," "universally coupled in some manner in some circumstances," "universally coupled in some manner in some circumstances and not in others," "universally coupled in some manner in some circumstances and not in others and in some other manner," and the like.
[0100] Each of the various embodiments described in this specification are described with reference to particular embodiments, and each of the various embodiments share similar parts with each other. Each of the various embodiments focuses on the differences from other embodiments. In particular, the device, electronic device, and computer-readable storage medium embodiments are described more simply because they are substantially similar to the method embodiments. The relevant parts are described with reference to the method embodiment.
[0101] The preferred embodiments of the present application have been described above with the purpose of enabling not only the best modes of practicing the application but also of enabling others skilled in the art to utilize the application in various embodiments and with various modifications as are suited to the particular use contemplated. Therefore, the above description is intended to be illustrative, but not restrictive, of the scope of the present application. All modifications that can fall within the scope of the claims, along with their full scope of equivalents, are included in the present application. Accordingly, the application is not to be limited to only those embodiments that are presently described.
Claims
1. A control method of a vehicle refrigerator, characterized by, The control method is applied to a vehicle-mounted refrigerator with a camera device fixed in the vehicle-mounted refrigerator and connected with a control terminal, and the control method comprises the following steps: When a preset camera shooting condition is met, the camera device is controlled to collect an internal bottom image and / or an internal side wall image of the vehicle-mounted refrigerator; The internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator is subjected to color block detection calculation to obtain a white block gray mean value and a black block gray mean value of the internal bottom image and / or the internal side wall image; It is judged whether the white block gray mean value and the black block gray mean value meet a preset threshold requirement, and when the judgment result is yes, it is determined that an article is placed in the vehicle-mounted refrigerator, and the vehicle-mounted refrigerator is started.
2. The control method of the in-vehicle refrigerator according to claim 1, characterized by, The control method further comprises: if the judgment result is no, it is determined that no article is placed in the vehicle-mounted refrigerator, and the vehicle-mounted refrigerator is turned off so as to be powered off.
3. The control method of the in-vehicle refrigerator according to claim 1, characterized by, When a preset camera shooting condition is met, the camera device is controlled to collect an internal bottom image and / or an internal side wall image of the vehicle-mounted refrigerator, and the step comprises the following steps: When the control terminal detects that the vehicle-mounted refrigerator is powered on or the refrigerator door thereof is closed, a shooting instruction is sent to the camera device; The camera device receiving the shooting instruction is started, and the internal bottom and / or the internal side wall of the vehicle-mounted refrigerator is shot to obtain the internal bottom image and / or the internal side wall image.
4. The control method of the in-vehicle refrigerator according to claim 1, characterized by, While the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator is collected, image information of the internal bottom image and / or the internal side wall image is also obtained, and the image information comprises a gray value Y of the image, a width W of the image and a height H of the image.
5. The control method of the in-vehicle refrigerator according to claim 4, characterized by, The step of subjecting the internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator to color block detection calculation comprises the following steps: The internal bottom image and / or the internal side wall image of the vehicle-mounted refrigerator is subjected to black and white color block segmentation to obtain a color block image corresponding to the internal bottom image and / or the internal side wall image, wherein the color block image comprises a plurality of black color blocks and a plurality of white color blocks arranged at intervals; For each color block, an image block gray mean value of each color block is calculated; According to the image block gray mean values corresponding to all the white color blocks and all the black color blocks in the color block image, a total gray mean value of all the white color blocks and a total gray mean value of all the black color blocks in the color block image are calculated; The total gray mean value of all the white color blocks is taken as the white block gray mean value, and the total gray mean value of all the black color blocks is taken as the black block gray mean value.
6. The control method of the in-vehicle refrigerator according to claim 5, characterized by, The step of calculating the image block gray mean value of each color block comprises the following steps: Each region of each color block is divided into a plurality of square small regions, and a plurality of square small regions are selected from the plurality of square small regions; Based on the selected plurality of square small regions, a single image block gray mean value calculation formula is used to calculate the image block gray mean value of each color block.
7. The control method of the in-vehicle refrigerator according to claim 6, characterized by, The plurality of square small regions have the same area.
8. The control method of the in-vehicle refrigerator according to claim 7, characterized by, The single image block gray mean value calculation formula is: wherein, is the image block gray mean value of the color block t in the color block image, m is the number of selected square small areas in the color block t, n is the number of pixel points of each selected square small area in the color block t, j is any one of the m selected square small areas in the color block t, i is the pixel point number of each selected square small area in the color block t, Y (ij)t is the gray value of the corresponding pixel i in the jth square small area in the color block t, the value of n is not less than 9, and the value of m is not less than 5.
9. The control method of the in-vehicle refrigerator according to claim 8, characterized by, The total gray mean value calculation formula of all white color blocks or all black color blocks in the color block image is: wherein, is the total gray value of all white color patches or all black color patches, b is the total number of all white color patches or all black color patches contained in the color patch image, t is the color patch number, t has a value of 1, 2,..., K, is the image block gray value of the color patch t in the color patch image, the color patch t can be a white color patch or a black color patch.
10. The control method of the vehicle-mounted refrigerator according to claim 5, wherein the black color blocks and the white color blocks have the same size.
11. The control method of the in-vehicle refrigerator according to claim 5, characterized by, The step of judging whether the white block gray mean value and the black block gray mean value meet the preset threshold requirement comprises: The total gray mean value of the all white color blocks is compared with a first threshold X1, and the total gray mean value of the all black color blocks is compared with a second threshold X2. If the total gray mean value of the all white color blocks is within the first threshold X1 range, and the total gray mean value of the all black color blocks is within the second threshold X2 range, it is determined that the vehicle-mounted refrigerator contains an article.
12. The control method of the in-vehicle refrigerator according to claim 11, characterized by, The first threshold X1 range is 200 < X1 ≤ 255.
13. The control method of the in-vehicle refrigerator according to claim 11, characterized in that, The second threshold X2 range is 0 ≤ X2 < 50.
14. An electronic device, comprising: The control method comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus. The memory is used for storing a computer program. The processor is used for executing the program stored on the memory, and realizes the control method of the vehicle-mounted refrigerator according to any one of claims 1-13.
Citation Information
Patent Citations
Refrigerator food material detection method and device, storage medium and electronic device
CN112001430A