CN114067115A - Transformer substation respirator identification method and device based on color gamut extraction and segmentation - Google Patents

Transformer substation respirator identification method and device based on color gamut extraction and segmentation Download PDF

Info

Publication number
CN114067115A
CN114067115A CN202111387138.8A CN202111387138A CN114067115A CN 114067115 A CN114067115 A CN 114067115A CN 202111387138 A CN202111387138 A CN 202111387138A CN 114067115 A CN114067115 A CN 114067115A
Authority
CN
China
Prior art keywords
image
respirator
segmentation
color gamut
binarization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111387138.8A
Other languages
Chinese (zh)
Other versions
CN114067115B (en
Inventor
林旭
李密
陈旭
陈佳期
唐光铁
魏明泉
曾远强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Strait Zhihui Technology Co ltd
Original Assignee
Fujian Strait Zhihui Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Strait Zhihui Technology Co ltd filed Critical Fujian Strait Zhihui Technology Co ltd
Priority to CN202111387138.8A priority Critical patent/CN114067115B/en
Publication of CN114067115A publication Critical patent/CN114067115A/en
Application granted granted Critical
Publication of CN114067115B publication Critical patent/CN114067115B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The utility model relates to a transformer substation respirator recognition method based on color gamut extraction is cut apart, this method is at first the original RGB image normalization that contains transformer substation respirator and adjustment image size be the fixed value, carries out the preliminary treatment to the image again, will again preliminary treatment RGB image converts HSV color space image into HSV color space image, later will HSV color space image cuts apart, forms a plurality of subimages, then carries out binarization color gamut segmentation to subimage, obtains a plurality of binarization MASKs, then scores white part in the binarization MASKs, later statistics white part's total score in all binarization MASKs in the subimage list, based on predetermine third threshold value with total score compares and output recognition result. Simultaneously, this application has still provided a transformer substation respirator recognition device based on colour gamut draws and cuts apart, has the effect that improves discernment transformer substation respirator work efficiency.

Description

Transformer substation respirator identification method and device based on color gamut extraction and segmentation
Technical Field
The application relates to the technical field of transformer substation respirator identification, in particular to a transformer substation respirator identification method and device based on color gamut extraction and segmentation.
Background
The respirator is also called a moisture absorber and is an auxiliary safety protection device of the main transformer, and the respirator absorbs moisture such as moisture, dew and the like around the main transformer through materials such as adsorbents and the like, so that the safety of the main transformer is protected. Moreover, because the respirator has the service life of the respirator, the color of the surface of the respirator is changed when the respirator cannot work, the surface of the respirator in a normal state is white, and the color of the surface of the respirator is changed from white to red when the respirator cannot work. In order to ensure that the main transformer can stably run without interference, the working and maintenance personnel of the transformer substation need to perform regular manual inspection. However, the manual inspection not only requires a large amount of maintenance work, but also has low work efficiency.
Disclosure of Invention
Aiming at the problems that the manual inspection of the respirator state is large in maintenance workload and low in working efficiency, the application provides a transformer substation respirator identification method and device based on color gamut extraction and segmentation.
In a first aspect, the application provides a transformer substation respirator identification method based on color gamut extraction and segmentation, which includes the following steps:
s1: normalizing the original RGB image containing the transformer substation respirator and adjusting the size of the image to be a fixed value to obtain an RGB image with a fixed size;
s2: carrying out contrast enhancement and chroma enhancement on the RGB image with the fixed size to obtain a preprocessed RGB image;
s3: converting the preprocessed RGB image into an HSV color space image;
s4: dividing the HSV color space image to form a plurality of sub-images, and outputting a sub-image list;
s5: based on the preset upper and lower limit threshold values of the color to be recognized, performing binarization color gamut segmentation on the subimage in the subimage list, setting the color part meeting the color gamut range of the color to be recognized as white, and obtaining a plurality of binarization MASKs;
s6: calculating the proportion of the pixel value of the white part in the binarization MASK of the current sub-image to the whole pixel value of the binarization MASK;
s7: if the proportion is larger than a second threshold value, counting effective scores for the current sub-image, and counting the total score of white parts in all binaryzation MASKs in the sub-image list;
s8: and comparing the total score based on a preset third threshold and outputting a recognition result, wherein if the total score is greater than the third threshold, the output result is that the respirator is invalid, and if the total score is less than the third threshold, the output result is that the respirator is valid.
By adopting the scheme, the transformer substation respirator is characterized in that the transformer substation respirator is not white or red, the original RGB image containing the transformer substation respirator is normalized and the size of the image is adjusted to be a fixed value, the image is preprocessed and then converted into the HSV color space image, the HSV color space image is segmented to form a plurality of sub-images, the sub-images are subjected to binaryzation color gamut segmentation to obtain a plurality of binaryzation MASKs, then the white parts in the binaryzation MASKs are scored, then the total scores of the white parts in all the binaryzation MASKs in the sub-image list are counted, the identification results are compared with the total scores based on the preset third threshold and output, the identification results are that the respirator is invalid or the respirator is effective, the respirator is not required to be manually checked, and therefore the working efficiency is improved.
Preferably, the image size of the fixed-size RGB image in step S1 is specifically: the height h is 250 and the width w is 450.
By adopting the technical scheme, the size of the fixed-size RGB image is set to be 250 mm in height h and 450 mm in width w, which is beneficial to subsequent image segmentation and binarization color gamut segmentation.
Preferably, in the step S3, the original RGB image is converted into an HSV color space image by the following formula:
Max=max(R,G,B);
Min=min(R,G,B);
Figure BDA0003367488860000031
wherein, f (x) is expressed as a function of converting an original RGB image into an HSV color space image, R, G, B respectively expresses the values of red, green and blue components of a color pixel point, Max expresses the maximum value, and Min expresses the minimum value.
By adopting the technical scheme, the original RGB image can be accurately converted into the HSV color space image through the algorithm.
Preferably, in step S2, the fixed-size RGB image contrast enhancement is enhanced by using an equalizehost function of OpenCV.
By adopting the technical scheme, the gray histogram equalization algorithm realized by the equalizehost function is to normalize each gray value of the histogram, calculate the cumulative distribution of each gray value, then obtain a mapped gray mapping table, and then correct each pixel in the original image according to the corresponding gray value.
Preferably, in step S2, the RGB image with the fixed size is first converted into a gray-scale image by OpenCV, and then the image is linearly superimposed and fused to realize chroma enhancement.
By adopting the technical scheme, the RGB image with fixed size is converted into the gray image, and then the linear superposition is carried out to fuse the image, so that the chroma enhancement can be effectively realized.
Preferably, the linear superposition fusion of the images is realized by calling an interface function cv2.addweighted in OpenCV.
By adopting the technical scheme, the cv2.addweighted function is a function for linearly overlapping and fusing two pictures with the same size and the same type, and the special effect of the pictures can be realized.
Preferably, the image sizes of the sub-images in the step S4 are all equal.
By adopting the technical scheme, the image sizes of the divided HSV images are equal, so that the weight value of the binary MASK scoring of each sub-image is the same, the situation that the weight value occupied by the part with large error is larger is avoided, and the total score value of the white part in all the binary MASKs is more accurate.
Preferably, in step S5, the binarization color gamut segmentation of the sub-image is performed through a threshold operation function cv2.inrange in OpenCV.
By adopting the technical scheme, cv2.inRange is a threshold operation function in an OpenCV computer vision open source library, and the function is used for extracting a desired color, setting the area of the color as white and setting the rest as black.
In a second aspect, the present application further provides a transformer substation respirator identification apparatus based on color gamut extraction and segmentation, including:
the image acquisition module is used for acquiring an original RGB image;
the preprocessing module is used for preprocessing the original RGB image and obtaining a preprocessed RGB image;
an image segmentation module to segment the pre-processed RGB image into a plurality of sub-images;
the binarization segmentation module is used for carrying out binarization color gamut segmentation on the sub-images and obtaining a plurality of binarization MASKs;
the output module calculates a total score of the plurality of binarized MASKs by the method of the first aspect, compares the total score with a preset third threshold value and outputs an identification result, if the total score is greater than the third threshold value, the output result is invalid, and if the total score is less than the third threshold value, the output result is valid.
According to the scheme, the original RGB image is obtained through the image obtaining module, then the original RGB image is preprocessed through the preprocessing module to obtain the preprocessed RGB image, then the preprocessed RGB image is divided into the sub images through the image dividing module, then the sub images are subjected to binaryzation color gamut division through the binaryzation dividing module to obtain the binaryzation MASKs, finally the total value of the binaryzation MASKs is calculated through the output module, the identification result is output based on the comparison of the preset third threshold value and the total value, the identification result is that the respirator is invalid or the respirator is valid, the respirator does not need to be checked manually at regular time, and therefore working efficiency is improved.
In a third aspect, the present application also proposes a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the computing method according to the first aspect.
The application provides a transformer substation respirator recognition method based on color gamut extraction segmentation, and the original RGB image that will contain the transformer substation respirator carries out normalization, preliminary treatment, image segmentation and binaryzation color gamut segmentation, later to in the binaryzation MASK white part score, at last based on predetermine the third threshold value with total score comparison and output recognition result, recognition result is that the respirator is invalid or the respirator is effective, does not need regularly manual inspection respirator to the work efficiency is low has been improved. Meanwhile, the application also provides a transformer substation respirator identification device based on color gamut extraction and segmentation, and the device identifies the state of a transformer substation respirator by using a transformer substation respirator identification method based on color gamut extraction and segmentation.
Drawings
The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments and together with the description serve to explain the principles of the invention. Other embodiments and many of the intended advantages of embodiments will be readily appreciated as they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale relative to each other. Like reference numerals designate corresponding similar parts.
Fig. 1 is a flow chart of a transformer substation respirator identification method based on gamut extraction segmentation in one embodiment of the present application.
Fig. 2 is a schematic diagram of a specific embodiment of the transformer substation respirator identification method based on color gamut extraction and segmentation according to the present application.
Fig. 3a is a raw RGB image containing a substation ventilator in one embodiment of the present application.
FIG. 3b is an HSV color space image in one embodiment of the present application.
FIG. 4 is a schematic diagram of segmentation of an HSV color space image in one embodiment of the present application.
Fig. 5 is a schematic diagram of a sub-image in a sub-image list in an embodiment of the present application.
Fig. 6 is a schematic diagram of a divided HSV color space image after binarization gamut division in an embodiment of the present application.
FIG. 7 is a diagram illustrating binarization MASKs in a sub-image list in an embodiment of the present application.
Fig. 8 is a block diagram of a substation respirator identification apparatus based on gamut extraction segmentation in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 shows a transformer substation respirator identification method based on color gamut extraction segmentation of the present application, and fig. 2 shows a schematic diagram of a specific embodiment of the transformer substation respirator identification method based on color gamut extraction segmentation of the present application, with reference to fig. 1 and 2, the method includes the following steps:
s1: normalizing the original RGB image containing the transformer substation respirator and adjusting the size of the image to be a fixed value to obtain the RGB image with the fixed size.
In a specific embodiment, the OpenCV is used to normalize the raw RGB image containing the substation ventilator and adjust the image size to a fixed value, and the image size of the fixed RGB image is specifically: the height h is 250 and the width w is 450.
S2: carrying out contrast enhancement and chroma enhancement on the RGB image with the fixed size to obtain a preprocessed RGB image;
the contrast is the ratio of black to white of the image, i.e. the gradation from black to white. The larger the ratio, the more gradation from black to white, and the richer the color expression. The influence of the contrast on the visual effect is very critical, generally, the higher the contrast is, the clearer and more striking the pattern is, and the more vivid and gorgeous the color is; and the contrast is low, so that the whole picture is gray.
In a specific embodiment, in step S2, the contrast enhancement of the fixed-size RGB image is enhanced by using an equalizehost function of OpenCV, where the contrast enhancement is performed by using a histogram equalization method, and the histogram equalization aims to redistribute the number of pixels of each pixel value of the original image to 256 pixel values [0,255], so that the number of pixels corresponding to each pixel value is approximately equal, that is, after redistribution, the number of pixels corresponding to each pixel value of 0 to 255 is approximately (rows × cols/256).
The parameters using the equalizeHist function in OpenCV are listed below:
cv2.equalizeHist(src,dst);
src is an image object matrix, which must be single-channel agent 8 type matrix data;
dst output image matrix (same as shape of src).
Chroma refers to the purity of a color, also called saturation or chroma, and is one of the "three attributes of color". For example, bright red is redder than rose red, which means that the color of bright red is higher. It is a descriptive color variable for HSV color attribute patterns, munsell color system, etc. In a broad sense, black, white, and gray are colors of "chromaticity is 0". In various color models, there are different quantization modes for the chroma. The chromaticity is related to the intensity of the light and the intensity distribution at different wavelengths. The highest chromaticity is generally achieved with a single wavelength of intense light (e.g., laser light), with the lower the light intensity the lower the chromaticity, with a constant wavelength distribution. In the three primary color light mode, chromaticity can quantify the difference between a certain color and a pure color by σ:
Figure BDA0003367488860000081
in a specific embodiment, in step S2, the RGB image with the fixed size is first converted into a grayscale image by OpenCV, and then the linear superposition is performed to fuse the images, so as to achieve chroma enhancement. And linear superposition and fusion of images are carried out by calling an interface function cv2.addweighted in OpenCV.
S3: converting the preprocessed RGB image into an HSV color space image;
in a specific embodiment, the conversion of the preprocessed RGB image into HSV color space images is illustrated in fig. 3a and 3 b. The HSV color space is one of the ways to express colors by Hue (Hue), Saturation (Saturation), and Value (Value). Hue: the color is expressed by 0-360 degrees, which is the name of the color, such as red, blue, etc., that we say everyday; saturation degree: the purity of color, the lower the saturation, the darker the color (0< ═ S < 1); lightness: i.e., the brightness of the color, the higher the value, the closer to white, and the lower the value, the closer to black (0< ═ V < 1).
In this embodiment, the original RGB image is converted into an HSV color space image by the following formula:
Max=max(R,G,B);
Min=min(R,G,B);
Figure BDA0003367488860000091
wherein, f (x) is expressed as a function of converting an original RGB image into an HSV color space image, R, G, B respectively expresses the values of red, green and blue components of a color pixel point, Max expresses the maximum value, and Min expresses the minimum value.
Regarding the calculation of the above conversion formula, there are the following calculation example tables:
Figure BDA0003367488860000092
Figure BDA0003367488860000101
s4: and segmenting the HSV color space image to form a plurality of sub-images, and outputting a sub-image list.
Referring to fig. 4 and 5, in a specific embodiment, the HSV color space image is segmented by OpenCV, mainly traversing the image and then segmenting according to lines and columns, and in this embodiment, the HSV color space image is segmented mainly by the following steps:
1): setting the initial values of the dividing rows, i is 1, and j is 1;
2): segmenting the HSV color space image according to the current row number i and column number j, and storing segmented sub-images into a current image list;
3): if i is less than or equal to 5 and j is less than or equal to 5, then i is equal to i +1, j is equal to j +1, and the step 2) is returned, otherwise, an empty list is returned, and the step 4) is carried out;
4): and outputting the current image list.
In this embodiment, the HSV color space image is divided into 25 sub-images, and the image sizes of the 25 sub-images are all equal
S5: based on the preset upper and lower limit threshold values of the color to be recognized, performing binarization color gamut segmentation on the subimage in the subimage list, setting the color part meeting the color gamut range of the color to be recognized as white, and obtaining a plurality of binarization MASKs;
referring to fig. 6 and 7, in a specific embodiment, the binarization gamut segmentation of the sub-image is performed by a threshold operation function cv2.inrange in OpenCV, which is a threshold operation function in the OpenCV computer vision open source library, and this function has the effect of extracting a desired color and setting an area of the color to white and the rest to black.
S6: calculating the proportion of the pixel value of the white part in the binarization MASK of the current sub-image to the whole pixel value of the binarization MASK;
in a specific embodiment, the proportion of the pixel value of the white part in the sub-image binarization MASK to the total pixel values of the binarization MASK is calculated based on an OpenCV visual library, and the area can be calculated according to the contour after the contour is extracted.
S7: if the proportion is larger than a second threshold value, counting effective scores for the current sub-image, and counting the total score of white parts in all binaryzation MASKs in the sub-image list;
in a specific embodiment, if the proportion of the pixel value of the white portion in the sub-image binarization MASK to the total pixel values of the binarization MASK is greater than 0.5, the current sub-image color is effectively divided into 1, and if the proportion of the pixel value of the white portion in the sub-image binarization MASK to the total pixel values of the binarization MASK is less than or equal to 0.5, the current sub-image color is effectively divided into 0.
S8: and comparing the total score based on a preset third threshold and outputting a recognition result, wherein if the total score is greater than the third threshold, the output result is that the respirator is invalid, and if the total score is less than the third threshold, the output result is that the respirator is valid.
In a specific embodiment, the preset third threshold value is 5, if the total score is greater than 5, it is determined that the current color of the respirator is red, and a result that the respirator is invalid is output, and if the total score is less than 5, it is determined that the current color of the respirator is white, and a result that the respirator is valid is output.
With further reference to fig. 8, as an implementation of the foregoing method, the present application provides an embodiment of a substation respirator identification apparatus based on color gamut extraction segmentation, the system embodiment corresponds to the method embodiment shown in fig. 1, and the system may be applied to various electronic devices, and the apparatus includes:
the image acquisition module 201, the image acquisition module 201 is used for acquiring an original RGB image;
the preprocessing module 202, the preprocessing module 202 is used for preprocessing the original RGB image and obtaining a preprocessed RGB image;
the image segmentation module 203 is used for segmenting the pre-processing RGB image into a plurality of sub-images;
a binarization segmentation module 204, wherein the binarization segmentation module 204 is used for performing binarization color gamut segmentation on the plurality of sub-images and obtaining a plurality of binarization MASKs;
the output module 205, the output module 205 calculates a total score of the plurality of binarized MASKs by a method of substation ventilator identification based on color gamut extraction and segmentation, then compares the total score with a preset third threshold and outputs an identification result, if the total score is greater than the third threshold, the output result is that the ventilator is invalid, and if the total score is less than the third threshold, the output result is that the ventilator is valid.
When the substation respirator identification device based on color gamut extraction and segmentation is used, an image acquisition module 201 is used for acquiring an original RGB image, then used by the pre-processing module 202 to pre-process the original RGB image and obtain a pre-processed RGB image, then used by the image segmentation module 203 to segment the pre-processed RGB image into sub-images, then, the binarization segmentation module 204 is used for performing binarization color gamut segmentation on the sub-images and obtaining a plurality of binarization MASKs, finally, the output module 205 is used for calculating the total score of the binarization MASKs by a transformer substation respirator identification method based on color gamut extraction segmentation, comparing the total score with a preset third threshold value and outputting an identification result, if the total score is greater than the third threshold value, and if the total score is smaller than the third threshold value, the output result is that the respirator is effective. The device can realize the state recognition of the transformer substation respirator, and the respirator does not need to be checked manually at regular time, so that the working efficiency is improved.
According to embodiments disclosed herein, the process described above with reference to flowchart 1 may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program containing program code for performing the method illustrated in fig. 1. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) and a Graphics Processing Unit (GPU).
It should be noted that the computer readable medium of the present application can be a computer readable signal medium or a computer readable medium or any combination of the two. The computer readable medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus, or any combination of the foregoing. More specific examples of the computer readable medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution apparatus, device, or apparatus. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution apparatus, device, or apparatus. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present application may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module, an analysis module, and an output module. Wherein the names of the modules do not in some cases constitute a limitation of the module itself.
While the principles of the invention have been described in detail in connection with the preferred embodiments thereof, it will be understood by those skilled in the art that the foregoing embodiments are merely illustrative of exemplary implementations of the invention and are not limiting of the scope of the invention. The details of the embodiments are not to be interpreted as limiting the scope of the invention, and any obvious changes, such as equivalent alterations, simple substitutions and the like, based on the technical solution of the invention, can be interpreted without departing from the spirit and scope of the invention.

Claims (10)

1. A transformer substation respirator identification method based on color gamut extraction and segmentation is characterized by comprising the following steps: the method comprises the following steps:
s1: normalizing the original RGB image containing the transformer substation respirator and adjusting the size of the image to be a fixed value to obtain an RGB image with a fixed size;
s2: carrying out contrast enhancement and chroma enhancement on the RGB image with the fixed size to obtain a preprocessed RGB image;
s3: converting the preprocessed RGB image into an HSV color space image;
s4: dividing the HSV color space image to form a plurality of sub-images, and outputting a sub-image list;
s5: based on the preset upper and lower limit threshold values of the color to be recognized, performing binarization color gamut segmentation on the subimage in the subimage list, setting the color part meeting the color gamut range of the color to be recognized as white, and obtaining a plurality of binarization MASKs;
s6: calculating the proportion of the pixel value of the white part in the binarization MASK of the current sub-image to the whole pixel value of the binarization MASK;
s7: if the proportion is larger than a second threshold value, counting effective scores for the current sub-image, and counting the total score of white parts in all binaryzation MASKs in the sub-image list;
s8: and comparing the total score based on a preset third threshold and outputting a recognition result, if the total score is greater than the third threshold, judging that the current color of the respirator is red, and outputting a recognition result that the respirator is invalid, and if the total score is less than the third threshold, judging that the current color of the respirator is white, and outputting a valid recognition result of the respirator.
2. The transformer substation respirator identification method based on color gamut extraction and segmentation as claimed in claim 1, wherein the image size of the fixed-size RGB image in step S1 is specifically: the height h is 250 and the width w is 450.
3. The transformer substation respirator identification method based on color gamut extraction and segmentation as claimed in claim 1, wherein in the step S3, the original RGB image is converted into an HSV color space image by the following formula:
Max=max(R,G,B);
Min=min(R,G,B);
Figure FDA0003367488850000021
wherein, f (x) is expressed as a function of converting an original RGB image into an HSV color space image, R, G, B respectively expresses the values of red, green and blue components of a color pixel point, Max expresses the maximum value, and Min expresses the minimum value.
4. The substation respirator identification method based on color gamut extraction and segmentation as claimed in claim 1, wherein the method comprises the following steps: the fixed-size RGB image contrast is enhanced in the step S2 using the equalizehost function of OpenCV.
5. The substation respirator identification method based on color gamut extraction and segmentation as claimed in claim 1, wherein the method comprises the following steps: in step S2, the RGB image with the fixed size is first converted into a grayscale image by OpenCV, and then the image is linearly superimposed and fused to realize chroma enhancement.
6. The substation respirator identification method based on color gamut extraction and segmentation as claimed in claim 5, wherein the method comprises the following steps: and carrying out linear superposition fusion on the images by calling an interface function cv2.addweighted in OpenCV.
7. The substation respirator identification method based on color gamut extraction and segmentation as claimed in claim 1, wherein the method comprises the following steps: the image sizes of the sub-images in the step S4 are all equal.
8. The substation respirator identification method based on color gamut extraction and segmentation as claimed in claim 1, wherein the method comprises the following steps: in step S5, the binarization color gamut segmentation of the sub-image is performed through a threshold operation function cv2.inrange in OpenCV.
9. A transformer substation respirator recognition device based on color gamut extraction segmentation is characterized by comprising:
the image acquisition module is used for acquiring an original RGB image;
the preprocessing module is used for preprocessing the original RGB image and obtaining a preprocessed RGB image;
an image segmentation module to segment the pre-processed RGB image into a plurality of sub-images;
the binarization segmentation module is used for carrying out binarization color gamut segmentation on the sub-images and obtaining a plurality of binarization MASKs;
an output module, calculating a total score of the plurality of binarized MASKs by the method according to any one of claims 1 to 8, comparing the total score with a preset third threshold value and outputting a recognition result, wherein if the total score is greater than the third threshold value, the output result is invalid, and if the total score is less than the third threshold value, the output result is valid.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the calculation method according to any one of claims 1 to 8.
CN202111387138.8A 2021-11-22 2021-11-22 Substation respirator identification method and device based on color gamut extraction and segmentation Active CN114067115B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111387138.8A CN114067115B (en) 2021-11-22 2021-11-22 Substation respirator identification method and device based on color gamut extraction and segmentation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111387138.8A CN114067115B (en) 2021-11-22 2021-11-22 Substation respirator identification method and device based on color gamut extraction and segmentation

Publications (2)

Publication Number Publication Date
CN114067115A true CN114067115A (en) 2022-02-18
CN114067115B CN114067115B (en) 2024-09-13

Family

ID=80278990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111387138.8A Active CN114067115B (en) 2021-11-22 2021-11-22 Substation respirator identification method and device based on color gamut extraction and segmentation

Country Status (1)

Country Link
CN (1) CN114067115B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107977959A (en) * 2017-11-21 2018-05-01 武汉中元华电科技股份有限公司 A kind of respirator state identification method suitable for electric operating robot
US20200175943A1 (en) * 2018-06-15 2020-06-04 Beijing Boe Optoelectronics Technology Co., Ltd. Color gamut conversion method, color gamut converter, display device, image signal conversion method, computer device and non-transitory storage medium
CN111523551A (en) * 2020-04-03 2020-08-11 青岛进化者小胖机器人科技有限公司 Binarization method, device and equipment for blue object
CN112069886A (en) * 2020-07-31 2020-12-11 许继集团有限公司 Transformer substation respirator state intelligent identification method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107977959A (en) * 2017-11-21 2018-05-01 武汉中元华电科技股份有限公司 A kind of respirator state identification method suitable for electric operating robot
US20200175943A1 (en) * 2018-06-15 2020-06-04 Beijing Boe Optoelectronics Technology Co., Ltd. Color gamut conversion method, color gamut converter, display device, image signal conversion method, computer device and non-transitory storage medium
CN111523551A (en) * 2020-04-03 2020-08-11 青岛进化者小胖机器人科技有限公司 Binarization method, device and equipment for blue object
CN112069886A (en) * 2020-07-31 2020-12-11 许继集团有限公司 Transformer substation respirator state intelligent identification method and system

Also Published As

Publication number Publication date
CN114067115B (en) 2024-09-13

Similar Documents

Publication Publication Date Title
US8525847B2 (en) Enhancing images using known characteristics of image subjects
US6728401B1 (en) Red-eye removal using color image processing
CN103593830B (en) A kind of low illumination level video image enhancement
CN108876742B (en) Image color enhancement method and device
CN103886565B (en) Nighttime color image enhancement method based on purpose optimization and histogram equalization
CN108230407B (en) Image processing method and device
US9378564B2 (en) Methods for color correcting digital images and devices thereof
CN110780961B (en) Method for adjusting character color of application interface, storage medium and terminal equipment
CN107396079B (en) White balance adjustment method and device
CN113344836B (en) Face image processing method and device, computer readable storage medium and terminal
CN107993209A (en) Image processing method, device, computer-readable recording medium and electronic equipment
CN103839245B (en) The Retinex colour-image reinforcing method at night of Corpus--based Method rule
CN107909542A (en) Image processing method, device, computer-readable recording medium and electronic equipment
CN107623845A (en) A kind of image processing method and device based on priori
CN111311500A (en) Method and device for carrying out color restoration on image
CN114067222B (en) Urban water body remote sensing classification method and device
CN117746806B (en) Driving method, device, equipment and storage medium of mini LED backlight module
CN107580205A (en) White balance adjustment method and device
US20160345887A1 (en) Moisture feeling evaluation device, moisture feeling evaluation method, and moisture feeling evaluation program
CN112699760B (en) Face target area detection method, device and equipment
CN114067115A (en) Transformer substation respirator identification method and device based on color gamut extraction and segmentation
CN111383054A (en) Advertisement checking method and device
CN107424134A (en) Image processing method, device, computer-readable recording medium and computer equipment
CN113591630A (en) Certificate photo automatic processing method, system, terminal equipment and storage medium
KR100488014B1 (en) YCrCb color based human face location detection method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant