CN114445627A - Charging gun detection method and device for operation charging pile - Google Patents

Charging gun detection method and device for operation charging pile Download PDF

Info

Publication number
CN114445627A
CN114445627A CN202111637645.2A CN202111637645A CN114445627A CN 114445627 A CN114445627 A CN 114445627A CN 202111637645 A CN202111637645 A CN 202111637645A CN 114445627 A CN114445627 A CN 114445627A
Authority
CN
China
Prior art keywords
channel
charging gun
pixel value
target detection
detected
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.)
Pending
Application number
CN202111637645.2A
Other languages
Chinese (zh)
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.)
Guochuang Mobile Energy Innovation Center Jiangsu Co Ltd
Original Assignee
Guochuang Mobile Energy Innovation Center Jiangsu 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 Guochuang Mobile Energy Innovation Center Jiangsu Co Ltd filed Critical Guochuang Mobile Energy Innovation Center Jiangsu Co Ltd
Priority to CN202111637645.2A priority Critical patent/CN114445627A/en
Publication of CN114445627A publication Critical patent/CN114445627A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (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)

Abstract

The invention provides a charging gun detection method and a charging gun detection device for operating a charging pile, wherein the method comprises the following steps: the method comprises the steps of positioning the position of a charging gun to be detected, and collecting a first target detection image corresponding to the charging gun to be detected, wherein the first target detection image comprises the charging gun to be detected and a background environment where the charging gun to be detected is located; processing the first target detection image through an OPENCV library function to segment a second target detection image of the charging gun to be detected from the first target detection image; judging whether the appearance of the charging gun to be detected is damaged or not according to the second target detection image; and if the appearance of the charging gun to be detected is damaged, reporting corresponding fault information to the platform end. According to the charging gun detection method for the operation charging pile, the appearance of the charging gun can be automatically detected without manual participation, so that the operation and maintenance efficiency is greatly improved, and the use safety of a user is improved to a certain extent.

Description

Charging gun detection method and device for operation charging pile
Technical Field
The invention relates to the technical field of charging gun detection, in particular to a charging gun detection method for operating a charging pile and a charging gun detection device for operating the charging pile.
Background
Because new energy automobile begins to popularize gradually at present, the facility of charging such as electric automobile operation stake of charging also tends to perfect gradually, and the operation stake of charging generally fills electric pile for the direct current, because the rifle line that charges that fills electric pile is heavier, has partial charging user directly to throw away the rifle head that charges on the ground after finishing charging, and the rifle head is mostly plastic products, can lead to the rifle head to break, and the inside contact pin of rifle head exposes outside.
In the correlation technique, the rifle head damage often only can be found in the fortune dimension personnel are patrolled and examined or the user reports after finding, very big reduction user's use experience and the availability factor who fills electric pile, draw down fortune dimension personnel's fortune dimension efficiency. And some users can use the damaged charging gun to charge, and the safety cannot be reliably guaranteed.
Disclosure of Invention
The invention aims to solve the technical problems and provides a charging gun detection method for operating a charging pile, which can automatically detect the appearance of the charging gun without manual participation, thereby greatly improving the operation and maintenance efficiency and improving the use safety of users to a certain extent.
The technical scheme adopted by the invention is as follows:
a charging gun detection method for operating a charging pile is characterized by comprising the following steps:
the method comprises the steps of positioning the position of a charging gun to be detected, and collecting a first target detection image corresponding to the charging gun to be detected, wherein the first target detection image comprises the charging gun to be detected and a background environment where the charging gun to be detected is located;
processing the first target detection image through an OPENCV library function to segment a second target detection image of the charging gun to be detected from the first target detection image;
judging whether the appearance of the charging gun to be detected is damaged or not according to the second target detection image;
and if the appearance of the charging gun to be detected is damaged, reporting corresponding fault information to a platform end.
Processing the first target detection image through the OPENCV library function to segment a second target detection image of the charging gun to be detected from the first target detection image, comprising the steps of: splitting the first target detection image by three channels in an RGB color space through a split cv channel separation function of the OPENCV to obtain a first pixel value of an R channel, a second pixel value of a G channel and a third pixel value of a B channel corresponding to the first target detection image; converting a first target detection image from the RGB color space to an HSV color space, and splitting three channels of the first target detection image in the HSV color space through the splitcv channel separation function of the OPENCV to obtain a fourth pixel value of an H channel, a fifth pixel value of an S channel and a sixth pixel value of a V channel corresponding to the first target detection image; respectively obtaining segmentation threshold values of the R channel, the G channel, the B channel, the H channel, the S channel and the V channel; segmenting the second target detection image from the first target detection image according to the first pixel value, the second pixel value, the third pixel value, the fourth pixel value, the fifth pixel value, the sixth pixel value, and segmentation thresholds of the R channel, the G channel, the B channel, the H channel, the S channel, and the V channel.
Respectively obtaining the segmentation threshold values of the R channel, the G channel, the B channel, the H channel, the S channel and the V channel, and the method comprises the following steps: acquiring a first sample image of the charging gun and a second sample image of a background environment where the charging gun is located; splitting the first sample image and the second sample image by three channels in an RGB color space through a splitcv channel separation function of the OPENCV to obtain a seventh pixel value of an H channel, an eighth pixel value of an S channel and a ninth pixel value of a V channel corresponding to the first sample image, and a tenth pixel value of the H channel, an eleventh pixel value of the S channel and a twelfth pixel value of the V channel corresponding to the second sample image; respectively converting the first sample image and the second sample image from the RGB color space to an HSV color space, and respectively splitting the first sample image and the second sample image in the HSV color space through the splitcv channel separation function of the OPENCV to obtain a thirteenth pixel value of an H channel, a fourteenth pixel value of an S channel and a fifteenth pixel value of a V channel corresponding to the first sample image, and a sixteenth pixel value of an H channel, a seventeenth pixel value of an S channel and an eighteenth pixel value of a V channel corresponding to the second sample image; training an improved GBDT machine learning algorithm with seventh to eighteenth pixel values as inputs to obtain segmentation thresholds for the R, G, B, H, S, and V channels, respectively.
The utility model provides an operation fills rifle detection device that charges of electric pile, includes: the image acquisition module is used for positioning the position of a charging gun to be detected and acquiring a first target detection image corresponding to the charging gun to be detected, wherein the first target detection image comprises the charging gun to be detected and a background environment where the charging gun to be detected is located; the image segmentation module is used for processing the first target detection image through an OPENCV library function so as to segment a second target detection image of the charging gun to be detected from the first target detection image; the judging module is used for judging whether the appearance of the charging gun to be detected is damaged or not according to the second target detection image; and the fault reporting module is used for reporting corresponding fault information to a platform end when the appearance of the charging gun to be detected is damaged.
A computer device comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the computer program, the charging gun detection method for operating the charging pile is realized.
A non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the charging gun detection method of an operational charging pile described above.
The invention has the beneficial effects that:
the invention can automatically detect the appearance of the charging gun without manual intervention, thereby greatly improving the operation and maintenance efficiency and improving the use safety of users to a certain extent.
Drawings
Fig. 1 is a flowchart of a charging gun detection method for operating a charging pile according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of segmenting a second target detection image of a charging gun to be tested from a first target detection image in accordance with one embodiment of the present invention;
fig. 3 is a schematic block diagram of a charging gun detection device for operating a charging pile according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and 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.
Fig. 1 is a flowchart of a charging gun detection method of an operation charging pile according to an embodiment of the present invention.
As shown in fig. 1, the charging gun detection method for the operation charging pile according to the embodiment of the present invention may include the following steps:
and S1, positioning the position of the charging gun to be detected, and acquiring a first target detection image corresponding to the charging gun to be detected. The first target detection image comprises a charging gun to be detected and a background environment where the charging gun to be detected is located.
Specifically, the position of the charging gun to be detected is located through the industrial camera fixed at the top of the operation charging pile, and a first target detection image of the charging gun to be detected is acquired. The target detection image can be composed of a charging gun to be detected and a background environment where the charging gun to be detected is located.
S2, the first target detection image is processed through OPENCV library functions to segment a second target detection image of the charging gun to be detected from the first target detection image.
According to an embodiment of the present invention, as shown in fig. 2, processing the first target detection image by a Library function of opensource Vision Library (Open Source Computer Vision Library) to segment the second target detection image of the charging gun to be detected from the first target detection image may include the following steps:
s201, splitting three channels of the first target detection image in an RGB color space through a split cv channel separation function of the OPENCV to obtain a first pixel value of an R channel, a second pixel value of a G channel and a third pixel value of a B channel corresponding to the first target detection image.
First, the first target detection image may be split into three channels (R channel, G channel, and B channel) by a splitcv channel separation function of OPENCV in an RGB color space to obtain pixel values of the R channel, G channel, and B channel corresponding to the first target detection image, that is, a first pixel value, a second pixel value, and a third pixel value.
S202, converting the first target detection image from the RGB color space to the HSV color space, and splitting three channels of the first target detection image in the HSV color space through a splitcv channel separation function of the OPENCV to obtain a fourth pixel value of an H channel, a fifth pixel value of an S channel and a sixth pixel value of a V channel corresponding to the first target detection image.
Secondly, converting the first target detection image from an RGB (Red Green Blue Red, Green and Blue) color space to an HSV (Hue, Saturation and brightness) color space image through a cvcvcvvtcolor function and a CV _ BGR2HSV parameter, and splitting three channels (an H channel, an S channel and a V channel) of the first target detection image through a split CV channel splitting function of OPENCV to respectively acquire pixel values of the H channel, the S channel and the V channel corresponding to the first target detection image, namely a fourth pixel Value, a fifth pixel Value and a sixth pixel Value.
S203, respectively obtaining the segmentation threshold values of the R channel, the G channel, the B channel, the H channel, the S channel and the V channel.
Further, since the color and the light reflection degree of the charging gun are different from the ground background, the segmentation threshold values of the R channel, the G channel, the B channel, the H channel, the S channel, and the V channel can be set to segment the charging gun to be detected from the first target detection image, so as to generate the second target detection image.
It can be understood that to segment the second target detection image, the segmentation thresholds of the R channel, the G channel, the B channel, the H channel, the S channel, and the V channel need to be set first, and how to obtain the segmentation thresholds of the R channel, the G channel, the B channel, the H channel, the S channel, and the V channel is described in detail below with reference to specific embodiments.
According to an embodiment of the present invention, the method for obtaining the segmentation thresholds of the R channel, the G channel, the B channel, the H channel, the S channel, and the V channel includes the following steps: acquiring a first sample image of a charging gun and a second sample image of a background environment where the charging gun is located; splitting three channels of a first sample image and a second sample image in an RGB color space through a split cv channel separation function of OPENCV to obtain a seventh pixel value of an H channel, an eighth pixel value of an S channel and a ninth pixel value of a V channel corresponding to the first sample image, and a tenth pixel value of the H channel, an eleventh pixel value of the S channel and a twelfth pixel value of the V channel corresponding to the second sample image; respectively converting the first sample image and the second sample image from an RGB color space to an HSV color space, and respectively splitting the first sample image and the second sample image in the HSV color space through a splitcv channel separation function of OPENCV to obtain a thirteenth pixel value of an H channel, a fourteenth pixel value of an S channel and a fifteenth pixel value of a V channel corresponding to the first sample image, and a sixteenth pixel value of the H channel, a seventeenth pixel value of the S channel and an eighteenth pixel value of the V channel corresponding to the second sample image; training an improved GBDT (Gradient Boosting Decision Tree) machine learning algorithm by taking the seventh to eighteenth pixel values as input so as to respectively obtain the segmentation threshold values of the R channel, the G channel, the B channel, the H channel, the S channel and the V channel.
Specifically, a first sample image of the charging gun and a second sample image of the background environment where the charging gun is located may be obtained first, and pixel values of the R channel, the G channel, and the B channel corresponding to the first sample image in the RGB color space, that is, a seventh pixel value, an eighth pixel value, and a ninth pixel value, and pixel values of the R channel, the G channel, and the B channel corresponding to the second sample image, that is, a tenth pixel value, an eleventh pixel value, and a twelfth pixel value, may be extracted respectively by a splitcv channel splitting function of the OPENCV, and pixel values of the H channel, the S channel, and the V channel corresponding to the first sample image in the HSV color space, that is, a thirteenth pixel value, a fourteenth pixel value, and a fifteenth pixel value, and pixel values of the H channel, the S channel, and the V channel corresponding to the second sample image, that is, a sixteenth pixel value, A seventeenth pixel value and an eighteenth pixel value.
And then, training the improved GBDT machine learning algorithm by taking the seventh to eighteenth pixel values as input, selecting the pixel values of the R channel, the G channel, the B channel, the H channel, the S channel and the V channel as characteristic values for segmenting the charging gun and other contents in the image, and determining segmentation thresholds of the R channel, the G channel, the B channel, the H channel, the S channel and the V channel through training.
It should be noted that the specific improvement method of the improved GBDT machine learning algorithm adopted by the present invention is as follows: before iterative training is performed each time by adopting a GBDT machine learning algorithm, corresponding processing can be performed on training samples, and specifically, a training sample data set with a large absolute value of gradient (namely large deviation) is completely reserved; for a training sample data set with a small absolute value of the gradient (i.e. a small deviation), a subset of the training sample data set is selected and given a weight as a final training sample set. Therefore, the training sample size can be reduced, the training speed is improved, and the training precision is ensured.
And S204, segmenting a second target detection image from the first target detection image according to the first pixel value, the second pixel value, the third pixel value, the fourth pixel value, the fifth pixel value, the sixth pixel value and the segmentation threshold values of the R channel, the G channel, the B channel, the H channel, the S channel and the V channel.
And comparing the first pixel value, the second pixel value, the third pixel value, the fourth pixel value, the fifth pixel value and the sixth pixel value with the segmentation threshold values of the R channel, the G channel, the B channel, the H channel, the S channel and the V channel to segment the foreground and the background of the first target detection image, so as to segment the second target detection image of the charging gun to be detected from the first target detection image.
And S3, judging whether the appearance of the charging gun to be detected is damaged or not according to the second target detection image.
Specifically, an image of a good product charging gun (the appearance of the good product charging gun is not damaged) corresponding to the charging gun to be detected, that is, a good product image, may be obtained through a template matching function, then pixel values of the good product image and a second target detection image are obtained, and then a difference between the two images is compared, if the difference is greater than a preset value (for example, greater than 5%), it is determined that the appearance of the charging gun to be detected is faulty, and if the difference is less than or equal to the preset value, it is determined that the appearance of the charging gun to be detected is not faulty.
And S4, if the appearance of the charging gun to be detected is damaged, reporting corresponding fault information to the platform end.
When judging that the outward appearance of waiting to detect the rifle that charges takes place to damage, the inside 4G network module of accessible charging pile reports fault information to platform end, and the platform end is locked should fill electric pile and is the maintenance state to the fortune dimension task is distributed for corresponding fortune dimension personnel.
In summary, according to the charging gun detection method for operating a charging pile in the embodiment of the present invention, the position of the charging gun to be detected is located, the first target detection image corresponding to the charging gun to be detected is acquired, the first target detection image is processed through the OPENCV library function, so as to segment the second target detection image of the charging gun to be detected from the first target detection image, and determine whether the appearance of the charging gun to be detected is damaged according to the second target detection image, and when the appearance of the charging gun to be detected is damaged, corresponding fault information is reported to the platform end. From this, can detect the outward appearance of rifle that charges automatically, need not artifical the participation to the fortune dimension efficiency has been promoted greatly, and the security that the user used has been improved to a certain extent.
Corresponding to the embodiment, the invention further provides a charging gun detection device for operating the charging pile.
As shown in fig. 3, the charging gun detection device for operating a charging pile according to an embodiment of the present invention may include: the image acquisition module 100, the image segmentation module 200, the judgment module 300 and the fault reporting module 400.
The acquisition module 100 is configured to locate a position of a charging gun to be detected, and acquire a first target detection image corresponding to the charging gun to be detected, where the first target detection image includes the charging gun to be detected and a background environment where the charging gun to be detected is located; the image segmentation module 200 is configured to process the first target detection image through a library function of OPENCV, so as to segment a second target detection image of the charging gun to be detected from the first target detection image; the judging module 300 is configured to judge whether the appearance of the charging gun to be detected is damaged according to the second target detection image; the fault reporting module 400 is configured to report corresponding fault information to the platform end when the appearance of the charging gun to be detected is damaged.
According to an embodiment of the present invention, the image segmentation module 200 is specifically configured to: splitting three channels of a first target detection image in an RGB color space through a split cv channel separation function of the OPENCV to obtain a first pixel value of an R channel, a second pixel value of a G channel and a third pixel value of a B channel corresponding to the first target detection image; converting the first target detection image from an RGB color space to an HSV color space, and splitting three channels of the first target detection image in the HSV color space through a split cv channel separation function of OPENCV to obtain a fourth pixel value of an H channel, a fifth pixel value of an S channel and a sixth pixel value of a V channel corresponding to the first target detection image; respectively obtaining segmentation threshold values of an R channel, a G channel, a B channel, an H channel, an S channel and a V channel; and segmenting a second target detection image from the first target detection image according to the first pixel value, the second pixel value, the third pixel value, the fourth pixel value, the fifth pixel value, the sixth pixel value and segmentation threshold values of the R channel, the G channel, the B channel, the H channel, the S channel and the V channel.
According to an embodiment of the present invention, the image segmentation module 200 is further specifically configured to: acquiring a first sample image of a charging gun and a second sample image of a background environment where the charging gun is located; splitting three channels of a first sample image and a second sample image in an RGB color space through a split cv channel separation function of OPENCV to obtain a seventh pixel value of an H channel, an eighth pixel value of an S channel and a ninth pixel value of a V channel corresponding to the first sample image, and a tenth pixel value of the H channel, an eleventh pixel value of the S channel and a twelfth pixel value of the V channel corresponding to the second sample image; respectively converting the first sample image and the second sample image from an RGB color space to an HSV color space, and respectively splitting the first sample image and the second sample image in the HSV color space through a splitcv channel separation function of OPENCV to obtain a thirteenth pixel value of an H channel, a fourteenth pixel value of an S channel and a fifteenth pixel value of a V channel corresponding to the first sample image, and a sixteenth pixel value of the H channel, a seventeenth pixel value of the S channel and an eighteenth pixel value of the V channel corresponding to the second sample image; and training the improved GBDT machine learning algorithm by taking the seventh to eighteenth pixel values as input so as to respectively obtain the segmentation threshold values of the R channel, the G channel, the B channel, the H channel, the S channel and the V channel.
It should be noted that, in a more specific implementation manner of the charging gun detection device for operating a charging pile according to the embodiment of the present invention, reference may be made to the above-mentioned embodiment of the charging gun detection method for operating a charging pile, which is not described herein again.
According to the charging gun detection device for operating the charging pile, the position of the charging gun to be detected is located through the acquisition module, the first target detection image corresponding to the charging gun to be detected is acquired, the first target detection image is processed through the OPENCV library function through the image segmentation module, the second target detection image of the charging gun to be detected is segmented from the first target detection image, whether the appearance of the charging gun to be detected is damaged or not is judged through the judgment module according to the second target detection image, and corresponding fault information is reported to the platform end through the fault reporting module when the appearance of the charging gun to be detected is damaged. From this, can detect the outward appearance of rifle that charges automatically, need not artifical the participation to the fortune dimension efficiency has been promoted greatly, and the security that the user used has been improved to a certain extent.
The invention further provides a computer device corresponding to the embodiment.
The computer equipment comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and when the processor executes the program, the charging gun detection method for operating the charging pile is realized.
According to the computer equipment provided by the embodiment of the invention, the appearance of the charging gun can be automatically detected without manual participation, so that the operation and maintenance efficiency is greatly improved, and the use safety of a user is improved to a certain extent.
The invention also provides a non-transitory computer readable storage medium corresponding to the above embodiment.
The non-transitory computer-readable storage medium of the embodiment of the present invention stores a computer program, and the computer program, when executed by a processor, implements the charging gun detection method for operating a charging pile.
According to the non-transitory computer-readable storage medium provided by the embodiment of the invention, the appearance of the charging gun can be automatically detected without manual participation, so that the operation and maintenance efficiency is greatly improved, and the use safety of a user is improved to a certain extent.
In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The meaning of "plurality" is two or more unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware that is related to instructions of a program, and the program may be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (6)

1. A charging gun detection method for operating a charging pile is characterized by comprising the following steps:
the method comprises the steps of positioning the position of a charging gun to be detected, and collecting a first target detection image corresponding to the charging gun to be detected, wherein the first target detection image comprises the charging gun to be detected and a background environment where the charging gun to be detected is located;
processing the first target detection image through an OPENCV library function to segment a second target detection image of the charging gun to be detected from the first target detection image;
judging whether the appearance of the charging gun to be detected is damaged or not according to the second target detection image;
and if the appearance of the charging gun to be detected is damaged, reporting corresponding fault information to a platform end.
2. The charging gun detection method for operating the charging pile according to claim 1, wherein the first target detection image is processed through a library function of the OPENCV to segment a second target detection image of the charging gun to be detected from the first target detection image, and the method comprises the following steps:
splitting the first target detection image by three channels in an RGB color space through a split cv channel separation function of the OPENCV to obtain a first pixel value of an R channel, a second pixel value of a G channel and a third pixel value of a B channel corresponding to the first target detection image;
converting a first target detection image from the RGB color space to an HSV color space, and splitting three channels of the first target detection image in the HSV color space through the split cv channel separation function of the OPENCV to obtain a fourth pixel value of an H channel, a fifth pixel value of an S channel and a sixth pixel value of a V channel corresponding to the first target detection image;
respectively obtaining segmentation threshold values of the R channel, the G channel, the B channel, the H channel, the S channel and the V channel;
segmenting the second target detection image from the first target detection image according to the first pixel value, the second pixel value, the third pixel value, the fourth pixel value, the fifth pixel value, the sixth pixel value, and segmentation thresholds of the R channel, the G channel, the B channel, the H channel, the S channel, and the V channel.
3. The charging gun detection method for operating a charging pile according to claim 2, wherein the dividing threshold values of the R channel, the G channel, the B channel, the H channel, the S channel, and the V channel are obtained respectively, and the method comprises the following steps:
acquiring a first sample image of the charging gun and a second sample image of a background environment where the charging gun is located;
splitting the first sample image and the second sample image by three channels in an RGB color space through a splitcv channel separation function of the OPENCV to obtain a seventh pixel value of an H channel, an eighth pixel value of an S channel and a ninth pixel value of a V channel corresponding to the first sample image, and a tenth pixel value of the H channel, an eleventh pixel value of the S channel and a twelfth pixel value of the V channel corresponding to the second sample image;
respectively converting the first sample image and the second sample image from the RGB color space to an HSV color space, and respectively splitting the first sample image and the second sample image in the HSV color space through the splitcv channel separation function of the OPENCV to obtain a thirteenth pixel value of an H channel, a fourteenth pixel value of an S channel and a fifteenth pixel value of a V channel corresponding to the first sample image, and a sixteenth pixel value of an H channel, a seventeenth pixel value of an S channel and an eighteenth pixel value of a V channel corresponding to the second sample image;
training a modified GBDT machine learning algorithm with seventh through eighteenth pixel values as inputs to obtain segmentation thresholds for the R, G, B, H, S, and V channels, respectively.
4. The utility model provides an operation fills rifle detection device that charges of electric pile which characterized in that includes:
the image acquisition module is used for positioning the position of a charging gun to be detected and acquiring a first target detection image corresponding to the charging gun to be detected, wherein the first target detection image comprises the charging gun to be detected and a background environment where the charging gun to be detected is located;
the image segmentation module is used for processing the first target detection image through an OPENCV library function so as to segment a second target detection image of the charging gun to be detected from the first target detection image;
the judging module is used for judging whether the appearance of the charging gun to be detected is damaged or not according to the second target detection image;
and the fault reporting module is used for reporting corresponding fault information to a platform end when the appearance of the charging gun to be detected is damaged.
5. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the computer program, implements the charging gun detection method for operating a charging pile according to any one of claims 1 to 3.
6. A non-transitory computer-readable storage medium having stored thereon a computer program, wherein the program, when executed by a processor, implements the charging gun detection method for operating a charging pile according to any one of claims 1 to 3.
CN202111637645.2A 2021-12-29 2021-12-29 Charging gun detection method and device for operation charging pile Pending CN114445627A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111637645.2A CN114445627A (en) 2021-12-29 2021-12-29 Charging gun detection method and device for operation charging pile

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111637645.2A CN114445627A (en) 2021-12-29 2021-12-29 Charging gun detection method and device for operation charging pile

Publications (1)

Publication Number Publication Date
CN114445627A true CN114445627A (en) 2022-05-06

Family

ID=81366181

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111637645.2A Pending CN114445627A (en) 2021-12-29 2021-12-29 Charging gun detection method and device for operation charging pile

Country Status (1)

Country Link
CN (1) CN114445627A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117388263A (en) * 2023-11-27 2024-01-12 东莞市羿通实业有限公司 Hardware terminal quality detection method for charging gun

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117388263A (en) * 2023-11-27 2024-01-12 东莞市羿通实业有限公司 Hardware terminal quality detection method for charging gun
CN117388263B (en) * 2023-11-27 2024-04-02 东莞市羿通实业有限公司 Hardware terminal quality detection method for charging gun

Similar Documents

Publication Publication Date Title
CN110544258B (en) Image segmentation method and device, electronic equipment and storage medium
CN108489996B (en) Insulator defect detection method and system and terminal equipment
CN110599484B (en) Defect detection method, device and storage medium
CN106937114A (en) Method and apparatus for being detected to video scene switching
CN113610773B (en) Gasket hole quality detection method, system, device and storage medium
CA2326631A1 (en) Representative color designating method using reliability
WO2013135967A1 (en) Method, arrangement and computer program product for recognizing videoed objects
CN114091620A (en) Template matching detection method, computer equipment and storage medium
CN108805872B (en) Product detection method and device
CN114445627A (en) Charging gun detection method and device for operation charging pile
CN112580600A (en) Dust concentration detection method and device, computer equipment and storage medium
CN112070749A (en) Paper defect detection method and device
CN110599453A (en) Panel defect detection method and device based on image fusion and equipment terminal
CN112070750A (en) Leather product defect detection method and device
CN112232246A (en) Garbage detection and classification method and device based on deep learning
CN115496794A (en) Concrete crack width calculation method and system, computer device and storage medium
CN108198182B (en) Method and device for evaluating performance of composite insulator mandrel sheath interface
CN112070748A (en) Metal oil pipe defect detection method and device
CN112085724A (en) Cabinet temperature measuring method and device based on BIM and thermal image
CN115861315A (en) Defect detection method and device
CN111275045B (en) Image main body recognition method and device, electronic equipment and medium
CN112070847A (en) Wood floor color sorting method and device
CN112132139A (en) Character recognition method and device
CN109785292B (en) Core wire sequence judging method based on machine vision
US20240020845A1 (en) Image Shadow Detection Method and System, and Image Segmentation Device and Readable Storage Medium

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