Image processing apparatus
By converting RGB images to HSV format and applying background subtraction, noise removal, and machine learning, the system improves the accuracy of oil and refrigerant leak detection in varying lighting conditions.
Patent Information
- Application Number
- JP2023020144
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-02-13
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-02-13
AI Technical Summary
Existing oil and liquid refrigerant leak detection systems face reduced accuracy due to varying light source management requirements in different lighting conditions, leading to improper brightness control and decreased detection precision.
The system converts RGB-formatted images to HSV format, extracts the S component, smoothes and compares images using background subtraction and noise removal methods, and employs machine learning models to identify and classify the type of liquid leak.
Enhances detection accuracy of liquid leaks by stabilizing light source management and improving image processing techniques, allowing precise identification and classification of oil and refrigerant leaks.
Smart Images

Figure 2024114397000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an image processing device. [Background technology]
[0002] An oil leakage detection device that detects oil leakage from oil-filled equipment is known. The oil leakage detection device includes a light source that irradiates light onto the oil-filled equipment, an imaging device that images the oil-filled equipment, a control device that controls the operation of the light source and the imaging device, and an image processing device that processes the captured image. When a three-layer structure of brightness having areas with different brightness and dark areas is observed in the captured image, the image processing device recognizes the brightest area on the image and the dark area adjacent to this brightest area as the oil leakage adhesion area (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent No. 7096780 Summary of the Invention [Problem to be solved by the invention]
[0004] However, when the above-mentioned brightness is used in detecting a liquid leak such as an oil leak or a liquid refrigerant leak, the detection accuracy of the liquid leak may be reduced. For example, when observing a three-layer structure of brightness in a dark and narrow space, and when observing a three-layer structure of brightness in a bright and wide space, different management of the light source is required to control the brightness. In other words, the management of the light source changes.
[0005] In such a state where the management of the light source changes, if the light source is managed improperly, the brightness will not be appropriately controlled according to the state of the space, and the accuracy of detecting liquid leakage may decrease.
[0006] SUMMARY OF THE PRESENT EMBODIMENTS Accordingly, an object of the present invention is to provide an image processing device that suppresses a decrease in the accuracy of detecting liquid leakage. [Means for solving the problem]
[0007] The image processing device of the present invention has a control unit that executes the following processes: a process of converting a first reference image, whose colors are expressed in RGB (Red Green Blue) format and which does not contain liquid leakage, into HSV (Hue Saturation Value) format to extract a second reference image having only the S component; a process of converting a first detection target image, whose colors are expressed in the RGB format, into the HSV format to extract a second detection target image having only the S component; a process of generating a third reference image and a third detection target image by smoothing the second reference image and the second detection target image, respectively; and a process of detecting the liquid leakage based on a comparison result between the third reference image and the third detection target image.
[0008] In the above configuration, the control unit may perform a process to detect a specific area in which the liquid leakage has occurred based on a first background difference image which is a result of processing the third reference image and the third detection target image using a background difference method.
[0009] In the above configuration, the control unit may perform a process of generating a second background subtraction image by removing noise from the first background subtraction image based on a predetermined noise removal method for removing noise from an image, and detecting a specific area where the liquid leakage has occurred based on the second background subtraction image.
[0010] In the above configuration, the control unit may execute a process to determine the type of liquid causing the leak based on a trained model that has been machine-learned to determine an oil color expressed in the RGB format as the color of oil and a non-oil color expressed in the RGB format as the color of liquid excluding the oil, and based on the specific area.
[0011] In the above configuration, the control unit may execute processing to acquire the first reference image and the first detection object image from an imaging device that images an object having liquid circulating therein, and display the liquid type discrimination result on a display device. Effect of the Invention
[0012] According to the present invention, it is possible to suppress a decrease in the accuracy of detecting liquid leakage. [Brief description of the drawings]
[0013] [Figure 1] FIG. 1 is a diagram illustrating an application example of an image processing device. [Diagram 2] 2 is an example of a hardware configuration of an image processing device. [Diagram 3] 2 is an example of a functional configuration of an image processing device. [Figure 4] (a) is an example of a reference image, and (b) is an example of a detection target image. [Diagram 5] 1 is an example of a discrimination model. [Figure 6] 10 is a flowchart illustrating an example of a process executed by a control unit. [Figure 7] 1A is an example of a background subtraction image according to a comparative example, and FIG. 1B is an example of a background subtraction image according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0015] First, an application example of the image processing device 100 will be described with reference to Fig. 1. The image processing device 100 is included in a terminal device 10. In Fig. 1, a desktop PC (Personal Computer) is shown as an example of the terminal device 10. However, the terminal device 10 may be a laptop PC or a mobile terminal such as a smart terminal. Note that smart terminals include, for example, smartphones and tablet terminals.
[0016] An input device 11, a display device 12, and an imaging device 13 are connected to the image processing device 100. The input device 11 includes, for example, a keyboard, a mouse, and a touch panel. The display device 12 includes, for example, a liquid crystal display. The imaging device 13 includes, for example, a video camera that captures moving images in color, and a still camera that continuously captures still images in color. Note that when the terminal device 10 is a mobile terminal, the imaging device 13 is built into the mobile terminal.
[0017] An image capturing object 20 is disposed within the image capturing range of the image capturing device 13. The image capturing object 20 includes, for example, an engine 21, a torque converter 22, and an automatic transmission 23. The torque converter 22 is connected to the engine 21. The automatic transmission 23 is connected to the torque converter 22. A propeller shaft 24 is connected to the automatic transmission 23. A hydraulic control circuit 25 is provided in the automatic transmission 23.
[0018] 1, a part of the image capturing object 20 is included in the image capturing range, but the entire image capturing object 20 may be included in the image capturing range. The image capturing device 13 captures images of the respective side surfaces (specifically, the surfaces of the side walls) of the engine 21, the torque converter 22, and the automatic transmission 23, for example. Engine oil and liquid refrigerant circulate inside the engine 21. The liquid refrigerant may be cooling water or LLC (Long Life Coolant). Lubricating oil such as ATF (Automatic Transmission Fluid) circulates inside the torque converter 22 and the automatic transmission 23.
[0019] Although details will be described later, the image processing device 100 acquires a captured image that is an image captured by the imaging device 13, and executes various image processing to detect a liquid leak occurring in any of the engine 21, the torque converter 22, and the automatic transmission 23. In the case of the engine 21, the liquid leak may be engine oil or liquid refrigerant. Therefore, when the image processing device 100 detects a liquid leak, it determines the type of liquid leaking and displays the determination result on the display device 12 as necessary. For example, the image processing device 100 displays the type of liquid, such as engine oil or LLC, on the display device 12 together with the captured image including the liquid leak.
[0020] Next, a hardware configuration of the image processing device 100 will be described with reference to Fig. 2. The image processing device 100 includes a CPU (Central Processing Unit) 100A as a processor, and a RAM (Random Access Memory) 100B and a ROM (Read Only Memory) 100C as memories. The image processing device 100 includes a network I / F (Interface) 100D and a HDD (Hard Disk Drive) 100E. Instead of the HDD (Hard Disk Drive) 100E, a SSD (Solid State Drive) may be adopted.
[0021] The image processing device 100 may include at least one of an input I / F 100F, an output I / F 100G, an input / output I / F 100H, and a drive device 100I, as necessary. The CPU 100A to the drive device 100I are connected to each other via an internal bus 100J. In other words, the image processing device 100 can be realized by a computer.
[0022] An input device 11 is connected to the input I / F 100F. A display device 12 is connected to the output I / F 100G. An imaging device 13 is connected to the input / output I / F 100H. When the image processing device 100 includes a plurality of input / output I / Fs 100H, a semiconductor memory may be connected to the input / output I / F 100H. Examples of the semiconductor memory include a USB (Universal Serial Bus) memory and a flash memory. The input / output I / F 100H reads a predetermined program stored in the semiconductor memory. The input I / F 100F and the input / output I / F 100H each include, for example, a USB port. The output I / F 100G includes, for example, a display port.
[0023] A portable recording medium 14 is inserted into the drive device 100I. The portable recording medium 14 may be a removable disk such as a CD (Compact Disc)-ROM or a DVD (Digital Versatile Disc). The drive device 100I reads a predetermined program recorded on the portable recording medium 14. The network I / F 100D includes, for example, a LAN (Local Area Network) port and a communication circuit.
[0024] A predetermined program stored in at least one of the ROM 100C, the HDD 100E, and the semiconductor memory is temporarily stored in the RAM 100B by the CPU 100A. A predetermined program recorded in the portable recording medium 14 is temporarily stored in the RAM 100B by the CPU 100A. By executing the stored predetermined program, the CPU 100A realizes various functions described later and executes various processes described later. The predetermined program may correspond to a flowchart described later.
[0025] The functional configuration of the image processing device 100 will be described with reference to Fig. 3 to Fig. 5. Note that Fig. 3 shows the main functional parts of the image processing device 100.
[0026] 3, the image processing device 100 includes a storage unit 110, a control unit 120, an input unit 130, an output unit 140, and an input / output unit 150. The storage unit 110 can be realized by the above-mentioned RAM 100B, HDD 100E, etc. The control unit 120 can be realized by the above-mentioned CPU 100A. The input unit 130 can be realized by the above-mentioned input I / F 100F.
[0027] The output unit 140 can be realized by the above-mentioned output I / F 100G. The input / output unit 150 can be realized by the above-mentioned input / output I / F 100H. Therefore, the storage unit 110, the control unit 120, the input unit 130, the output unit 140, and the input / output unit 150 are connected to each other.
[0028] Here, the storage unit 110 includes a first image storage unit 111, a second image storage unit 112, and a discrimination model storage unit 113. The control unit 120 includes an image acquisition unit 121, an image processing unit 122, and a discrimination unit 123.
[0029] The image acquisition unit 121 acquires captured images from the imaging device 13. Here, the imaging device 13 periodically or continuously captures images of the state of the imaging target 20 before (or before starting) operation, the state of the imaging target 20 during operation, and the imaging range after the operation of the imaging target 20 has ended. As a result, the imaging device 13 generates a moving image or a plurality of still images representing the imaging range as a plurality of captured images in time series. The colors of the captured images are expressed in RGB (Red Green Blue) format. The image acquisition unit 121 acquires such captured images from the imaging device 13.
[0030] When the image acquisition unit 121 acquires a captured image, it cuts out a part of the captured image and analyzes the partial captured image (hereinafter simply referred to as a partial image) that is a part of the captured image. If the image acquisition unit 121 determines that there is no liquid leakage as a result of analyzing the partial image, it stores the partial image without liquid leakage as a first reference image in the first image storage unit 111. As a result, as shown in FIG. 4(a), the first image storage unit 111 stores a first reference image 31 that does not include liquid leakage. As long as there is no liquid leakage, the first reference image 31 may be in any of the following states: before the start of operation, during operation, and after operation. The first image storage unit 111 may store one or more first reference images 31.
[0031] On the other hand, regardless of the result of analyzing the partial image, the image acquiring unit 121 stores one of the partial images (for example, the most recently captured image) as a first detection target image in the second image storage unit 112. As a result, when the image acquiring unit 121 analyzes the partial image and determines that there is a liquid leak on the surface of the image capture target 20, the second image storage unit 112 stores a first detection target image 32 including the liquid leak 28, as shown in FIG.
[0032] The image processing unit 122 acquires the first reference image 31 from the first image storage unit 111. The image processing unit 122 converts the first reference image 31 into HSV (Hue Saturation Value) format based on a known conversion method for converting from RGB format to HSV format. Then, the image processing unit 122 extracts or separates a second reference image (not shown) having only an S component (saturation component) from the converted first reference image 31. That is, the H component (hue component) and the V component (brightness component) are excluded. The image processing unit 122 also acquires the first detection target image 32 from the second image storage unit 112 and converts the first detection target image 32 into the HSV format. Then, the image processing unit 122 extracts or separates a second detection target image (not shown) having only an S component from the converted first detection target image 32.
[0033] When the separation into the second reference image and the second detection target image is completed, the image processing unit 122 generates a third reference image and a third detection target image by smoothing the second reference image and the second detection target image, respectively. After generating the third reference image and the third detection target image, the image processing unit 122 detects liquid leakage based on a comparison result between the third reference image and the third detection target image.
[0034] More specifically, the image processing unit 122 detects a specific area where liquid leakage has occurred based on a first background difference image that is a result of processing the third reference image and the third detection target image using a background difference method. The image processing unit 122 may generate a second background difference image by removing noise from the first background difference image based on a predetermined noise removal method that removes noise from an image. The image processing unit 122 may detect a specific area where liquid leakage has occurred based on the second background difference image. The predetermined noise removal method may be, for example, either one or both of an expansion / contraction process and a GLCM (Gray Level Co-occurrence Matrix) process.
[0035] The expansion and contraction process is a known technique and will not be described in detail here. For example, the expansion and contraction process includes an expansion process that replaces a pixel of interest with white if there is at least one white pixel in the vicinity of the pixel of interest (kernel size of 3 pixels x 3 pixels). The expansion and contraction process also includes a contraction process that replaces a pixel of interest with black if there is at least one black pixel in the vicinity of the pixel of interest. If the leakage represented by the specific area represents an engine oil leak, the specific area appears relatively occupying a certain area on the image. For this reason, even if the expansion and contraction process is applied to the first background difference image, it is assumed that the specific area is unlikely to disappear. On the other hand, noise appears relatively occupying a very small area on the image. For this reason, it is assumed that there is a high possibility that noise will be removed when the expansion and contraction process is applied to the first background difference image.
[0036] On the other hand, the GLCM process is also a known technique, and the details are omitted, but for example, a GLCM is generated from surrounding pixels arranged around a pixel of interest, and multiple texture feature quantities are calculated as characteristic values from the GLCM. Examples of characteristic values include entropy, dissimilarity, contrast, and energy. Here, when the fluid leakage represented by a specific area represents an engine oil leak, there is a property or state specific to oil that is uniform, unlike noise. For this reason, the entropy tends to be small, and the energy tends to be large. For this reason, the GLCM process compares such characteristic values with a predetermined threshold value that extracts the engine oil leak alone, removes noise, and detects the engine oil leak. In this way, the GLCM process has the characteristic that pixels with low frequency (for example, noise parts) are difficult to detect.
[0037] The discrimination model memory unit 113 stores, as a first discrimination model, a trained model that has been machine-learned to represent oil-color images, such as engine oil and ATF, in RGB format, and non-oil-color images, such as liquids other than oil (e.g., LLC and coolant), in RGB format.
[0038] As shown in Fig. 5, the discrimination model can be represented by a predetermined distribution in a three-dimensional space of R, G and B axes. The predetermined distribution is divided into two areas by a discrimination boundary BD. For example, distribution area AR1 represents a set of R, G and B values corresponding to oil, and distribution area AR2 represents a set of R, G and B values corresponding to liquids other than oil. The R, G and B values each have 256 gradations. Such a discrimination model is generated based on an OCSVM (One-Class Support Vector Machine) and is stored in advance in the discrimination model storage unit 113.
[0039] Although not shown, the discrimination model storage unit 113 may store as a second discrimination model a trained model that has been machine-learned to represent refrigerant colors in which the colors of liquid refrigerant (e.g., LLC or coolant) are expressed in RGB format, and non-refrigerant colors in which the colors of liquids other than liquid refrigerant (e.g., rainwater or muddy water) are expressed in RGB format.
[0040] The discrimination unit 123 acquires a first discrimination model from the discrimination model storage unit 113. The discrimination unit 123 discriminates the liquid type of the liquid leakage represented by the specific area based on the acquired first discrimination model, the specific area detected by the image processing unit 122, and the first detection target image. The process using the background difference method by the image processing unit 122 or the process of removing noise by the noise removal method may not be able to accurately discriminate the liquid type. For this reason, the discrimination unit 123 discriminates whether the liquid leakage represented by the specific area is an oil leakage or not based on the first discrimination model, the specific area, and the first detection target image. In this way, by using the first discrimination model, the liquid type can be discriminated with high accuracy. The discrimination unit 123 may acquire a second discrimination model to discriminate whether the liquid leakage represented by the specific area is a leakage of liquid refrigerant or not.
[0041] Next, the process executed by the control unit 120 will be described with reference to FIGS.
[0042] First, as shown in Fig. 6, the image acquisition unit 121 cuts out a captured image (step S1). More specifically, the image acquisition unit 121 acquires a captured image from the imaging device 13, cuts out a part of the captured image, and analyzes the partial image. If it is determined that there is no liquid leakage as a result of analyzing the partial image, the image acquisition unit 121 stores the partial image without liquid leakage as a first reference image in the first image storage unit 111. Furthermore, regardless of the result of analyzing the partial image, the image acquisition unit 121 stores one of the partial images as a first detection target image in the second image storage unit 112.
[0043] When the process of step S1 is completed, the image processing unit 122 then acquires the first reference image from the first image storage unit 111, converts the first reference image into HSV format, and extracts a second reference image of only the S component (step S2). When the process of step S2 is completed, the image processing unit 122 acquires the first detection target image from the second image storage unit 112, converts the first detection target image into HSV format, and extracts a second detection target image of only the S component (step S3).
[0044] When the process of step S3 is completed, the image processing unit 122 performs a smoothing process on each of the second reference image and the second detection target image (step S4). By performing the smoothing process, the image processing unit 122 generates a third reference image obtained by smoothing the second reference image and a third detection target image obtained by smoothing the second detection target image. The smoothing process is a known technique and will not be described in detail, but for example, it is a process of replacing each pixel with the average value of the surrounding pixels to remove noise components. The smoothing process reduces sudden changes in saturation in the image. Therefore, when the fluid leakage represents the leakage of engine oil, it is assumed that the noise parts will become fainter, but the oil parts having a uniform property or state will hardly change. The uniform property or state refers to, for example, a flat property or state.
[0045] When the process of step S4 is completed, the image processor 122 executes background subtraction processing based on the third reference image and the third detection target image (step S5). The background subtraction processing according to this embodiment is a process in which, for a first background subtraction image between the third reference image and the third detection target image, if the saturation difference between the surrounding pixels is equal to or greater than a threshold, a white pixel is output, and if the saturation difference is less than the threshold, a black pixel is output.
[0046] For example, the image processing unit 122 executes background difference processing that outputs white pixels when the brightness difference with surrounding pixels is equal to or greater than a threshold, and outputs black pixels when the brightness difference is less than the threshold. This reduces the detection accuracy of a specific area 42 appearing in a background difference image 41, as shown in FIG. 7(a). As a result, the liquid type may not be accurately determined in subsequent processing. However, according to the background difference processing of this embodiment, the detection accuracy of a specific area 52 appearing in a background difference image 51 is improved, as shown in FIG. 7(b). As a result, when the liquid type is to be determined in subsequent processing, the liquid type can be accurately determined.
[0047] When the process of step S5 is completed, the image processing unit 122 removes noise from the background differential image based on a predetermined noise removal method (step S6). More specifically, the image processing unit 122 generates a noise-removed background differential image (not shown) as a second background differential image by removing noise from the background differential image 51 as the first background differential image.
[0048] When the process of step S6 is completed, the image processing unit 122 detects a specific area based on the noise-removed background difference image (step S7). If liquid leakage has occurred in the image capture object 20, as described above, the specific area 52 will clearly appear in the noise-removed background difference image. Therefore, the image processing unit 122 can detect the specific area 52 with high accuracy. By detecting the specific area 52, it is possible to identify the area (region) where liquid leakage has occurred.
[0049] When the processing of step S7 is completed, the discrimination unit 123 discriminates the type of liquid (step S8) and ends the processing. For example, the discrimination unit 123 acquires a first discrimination model from the discrimination model storage unit 113. Then, the discrimination unit 123 discriminates whether or not the liquid leakage represented by the specific area 52 is an oil leakage based on the first discrimination model, the specific area detected by the image processing unit 122, and the first detection target image. The specific area 52 is detected with high accuracy by the various image processes described above executed by the image processing unit 122. Therefore, it is possible to discriminate whether or not the liquid leakage represented by the specific area 52 is an oil leakage with high accuracy.
[0050] In this way, the image processing unit 122 of the control unit 120 included in the image processing device 100 according to this embodiment performs a process of converting the first reference image, which is expressed in color in RGB format and does not include liquid leakage, into HSV format in the process of step S2 to extract a second reference image of only S components. Next, the image processing unit 122 performs a process of converting the first detection target image, which is expressed in color in RGB format, into HSV format in the process of step S3 to extract a second detection target image of only S components. After that, the image processing unit 122 performs a process of generating a third reference image and a third detection target image by smoothing the second reference image and the second detection target image, respectively, in the process of step S4. Then, the image processing unit 122 performs a process of detecting liquid leakage 28 based on the comparison result between the third reference image and the third detection target image in the processes of steps S5 and S7. These processes can suppress a decrease in the detection accuracy of liquid leakage.
[0051] Here, in this embodiment, an example of detecting a liquid leak on the side of the image capturing object 20 (for example, the engine 21 or the automatic transmission 23) has been described. A flat-bottomed tray (for example, an oil pan) for receiving liquid may be placed under the image capturing object 20, and the image capturing device 13 may capture an image of the liquid collected in the tray. For example, when colorless and transparent kerosene drips from the image capturing object 20 into the tray, the kerosene usually first drips into one point on the tray and then gradually spreads over the tray. For this reason, it may be difficult to distinguish the color of the tray from the color of the kerosene. Even in such a case, according to this embodiment, it is possible to suppress a decrease in the accuracy of detecting kerosene leaks.
[0052] Although a preferred embodiment of the present invention has been described in detail above, the present invention is not limited to such a specific embodiment, and various modifications and variations are possible within the scope of the gist of the present invention described in the claims. [Explanation of symbols]
[0053] 10 Terminal Equipment 13 Imaging device 20 Image capture object 21 Engine 22 Torque converter 23 Automatic transmission 28 Leaking fluid 100 Image processing device 120 Control section
Claims
1. A process of converting a first reference image, which is expressed in color in RGB (Red Green Blue) format and does not include liquid leakage, into an HSV (Hue Saturation Value) format to extract a second reference image of only the S component; A process of converting the first detection target image, the color of which is expressed in the RGB format, into the HSV format and extracting a second detection target image having only an S component; a process of generating a third reference image and a third detection object image by smoothing the second reference image and the second detection object image, respectively; detecting the liquid leakage based on a comparison result between the third reference image and the third detection target image; An image processing device having a control unit that executes the above.
2. the control unit detects the specific area where the liquid leakage has occurred based on a first background subtraction image that is a result of processing the third reference image and the third detection target image using a background subtraction method. The image processing apparatus according to claim 1 , which performs processing.
3. the control unit generates a second background subtraction image by removing noise from the first background subtraction image based on a predetermined noise removal method for removing noise from an image, and detects the specific area where the liquid leakage has occurred based on the second background subtraction image.
3. The image processing apparatus according to claim 2, wherein the image processing apparatus executes processing.
4. The control unit determines the type of liquid of the leak based on a machine-learned model of an oil color expressed in the RGB format and a non-oil color expressed in the RGB format of a color of a liquid excluding the oil, and the specific area.
4. The image processing apparatus according to claim 2, wherein the image processing apparatus executes processing.
5. the control unit acquires the first reference image and the first detection object image from an imaging device that images an imaging object having a liquid circulating therein, and displays a result of the determination of the type of the liquid on a display device.
5. The image processing apparatus according to claim 4, wherein said image processing apparatus executes processing.
Citation Information
Patent Citations
Detection method and device of oil-immersed mutual inductor, equipment and storage medium
CN113743454A
Oil leakage detector
JP2013101474A
Biological sample detector
JP2020118596A
Oil film detection system and oil film detection method
JP2022107535A
Required treatment instructing system, information processing device, information processing method, program, and recording medium
JP2022121003A
