CN101482445A - Test method and apparatus for status indication lamp - Google Patents
Test method and apparatus for status indication lamp Download PDFInfo
- Publication number
- CN101482445A CN101482445A CNA2009100078556A CN200910007855A CN101482445A CN 101482445 A CN101482445 A CN 101482445A CN A2009100078556 A CNA2009100078556 A CN A2009100078556A CN 200910007855 A CN200910007855 A CN 200910007855A CN 101482445 A CN101482445 A CN 101482445A
- Authority
- CN
- China
- Prior art keywords
- image
- rgb value
- catching
- pixels
- working station
- 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
Links
Images
Landscapes
- Spectrometry And Color Measurement (AREA)
Abstract
The invention discloses a state indicator lamp testing method and apparatus for solving the problem that whether the equipment work state indicator lamp is normal can not be tested. The method in the invention comprises: setting the work state of the tested equipment and determining the RGB value corresponding to the expected color of the work state indicator lamp in the work state; performing image capture to the work state indicator lamp of the tested equipment under working state, and generating a figure file according to the captured image; analyzing the generated figure file, and acquiring the RGB value of the pixel at the work state indicator lamp position; and comparing the acquired RGB value and the RGB value corresponding to the expected color to obtain the testing result. For obtaining the testing result by comparing the acquired RGB value and the RGB value corresponding to the expected color, the invention can test out whether the display of the work state indicator lamp is normal.
Description
Technical field
The invention belongs to image processing field, the method for testing of a kind of status indicator lamp particularly and device.
Background technology
The status indicator lamp of equipment can show different colors so that whether managerial personnel normally judge the duty of equipment according to the different conditions of equipment, be shown as the link state indicator of Ethernet switch and yellowly represent 10,000,000, shown in greenly be represented as 100,000,000, lamp goes out and represents link not have connection.
And may be because the software existing problems of equipment in the practical work process, or other problem and cause virtual condition and inconsistent situation is set, after being transformed to 100,000,000 as ethernet switch port speed by 10,000,000, the status lamp color does not change, and it still is bright that link disconnects the rear port status lamp.
Therefore the port status beacon lamp can operate as normal when dispatching from the factory in order to ensure its product for the equipment business men, so need test the various states and the demonstration situation of port state index lamp.And also do not have a kind of good method in the prior art, whether the demonstration of testing apparatus working station indicator is normal.
Summary of the invention
For solve in the prior art also can't the testing apparatus working station indicator demonstration normal problem whether, the embodiment of the invention provides a kind of method of testing of status indicator lamp, comprise: the duty of equipment under test is set, and determines the rgb value of working station indicator expection color correspondence under this duty;
Under the duty after being provided with the equipment under test working station indicator is carried out image capturing, and generate graphic file according to the image of catching;
The graphic file that generates is analyzed, in the image of catching, obtained the rgb value of working station indicator place location of pixels;
The rgb value that the rgb value that obtains is corresponding with the expection color compares and draws test result.
The embodiment of the invention also provides a kind of proving installation of status indicator lamp simultaneously, comprising:
Module is set: be used to be provided with the duty of equipment under test, and determine the rgb value of working station indicator expection color correspondence under this duty;
Image capture module: be used under the duty after being provided with the equipment under test status indicator lamp being carried out image capturing, and generate graphic file according to the image of catching;
Acquisition module: be used for the graphic file that generates is analyzed, in the image of catching, obtain the rgb value of working station indicator place location of pixels;
Comparison module: the rgb value rgb value corresponding with the expection color that is used for obtaining compares and draws test result.
The specific embodiments that is provided by the invention described above compares just because of the rgb value that will the obtain rgb value corresponding with the expection color and to draw test result as can be seen, makes whether the demonstration that can test out working station indicator is normal.
Description of drawings
Fig. 1 is the first embodiment method flow provided by the invention;
Fig. 2 is the synoptic diagram of the image of catching among first embodiment provided by the invention;
Fig. 3 is the second embodiment device structural drawing provided by the invention.
Embodiment
First embodiment provided by the invention is a kind of method of testing of status indicator lamp, and method flow comprises as shown in Figure 1:
Step 101: the port status that equipment under test is set is 10,000,000, determines that the state of port was set at 10,000,000 o'clock, the yellow corresponding rgb value of the expection of this port status pilot lamp correspondence.
Step 102: catch be set to 10,000,000 after, the image of equipment under test port status pilot lamp, and save as the graphic file of BMP (Bitmap, bitmap format) form.
Step 103: analyze by graphic file, in the image of catching, obtain the rgb value of port status pilot lamp place location of pixels to the BMP form preserved.
Step 104: compare according to the yellow corresponding rgb value of the rgb value of the port status pilot lamp place location of pixels that gets access to and expection and to draw test result.
Wherein in the step 101 only be state with the port of equipment under test to be set to 10,000,000 be that example describes, this port was set to 10,000,000 o'clock, corresponding status indicator lamp be yellow, if this port was set to 100,000,000 o'clock, then Dui Ying status indicator lamp is a green.Be not limited to the status indicator lamp of port, be equally applicable to indicator of the power supply status, other similar working station indicators such as integrated circuit board status indicator lamp.
Wherein can adopt following method to catch the image of equipment under test port status pilot lamp in the step 102:
Control is caught all images of equipment under test status indicator lamp place panel or is comprised the part panel image of status indicator lamp as image capture devices such as video camera, cameras.To catch the panel all images is example, as shown in Figure 2, all images zone that catch for image capture device in zone 1, zone 2 is the image-region of equipment under test status indicator lamp place panel.
When the image of catching is preserved, present embodiment only is that the graphic file with the BMP form describes, can also adopt the graphic file of forms such as GIF or JPEG equally, it is concrete picture format difference, during concrete enforcement to can be slightly different in the processing of the graphic file of different-format, but the image of the sort of form no matter all can be represented the color of each pixel by rgb value, and method is similar on the whole repeats no more herein.
In order in step 103, in the image of catching, to obtain the rgb value of port status pilot lamp place location of pixels, need measure the width W and the height H of equipment state pilot lamp place panel in advance, and measure the relative position of status indicator lamp, calculate the status indicator lamp relativity shift, as the distance on the status indicator lamp and the panel left side is that the distance of w and top is h, calculate w/W and h/H, obtain the relativity shift of Width and the relativity shift of short transverse.
In step 103, read the BMP graphic file according to binary format, from image, read the rgb value of each pixel from top to down by bitmap format, when the rgb value of the rgb value that reads and equipment under test coboundary color is identical is the coboundary, simultaneously the number of the pixel that reads is confirmed as the coboundary location of pixels, in like manner can draw left margin, right margin, the location of pixels of lower boundary.So just can determine the location of pixels of equipment under test border in image by the graphic file that reads the BMP form, determine status indicator lamp place location of pixels according to fixed relativity shift more afterwards, read rgb value according to the location of pixels of status indicator lamp in image.
Describe with concrete numerical value below, the width of measuring equipment under test is 20cm, highly be 4cm, A point in the status indicator lamp is 2cm apart from the distance on the equipment under test left side, the distance of top is 1cm, then the relativity shift of equipment under test Width is 2cm/20cm=0.1, and the relativity shift of equipment under test short transverse is 1cm/4cm=0.25.The image size is 800 (wide) *, 600 (height), top margin, bottom margin, left side distance, rightmargin all are 100 pixels, relativity shift=100+ (800-100-100) * 0.1=160 of the X coordinate of virtual condition pilot lamp A point respective pixel=left side distance+plant width * Width then, relativity shift=100+ (600-100-100) * 0.25=200 of the Y coordinate=top margin+device height * short transverse of A point respective pixel.
To how to read rgb value describe below according to location of pixels.Need to prove that at first the required figure place (biBitCount) of each pixel in the BMP file can be 1 (monochrome bitmap), 4 (16 color bitmaps), 8 (256 color bitmaps) or 24 (24 bitmaps) etc., when biBitCount=1,8 pixels account for 1 byte; When biBitCount=4,2 pixels account for 1 byte; When biBitCount=8,1 pixel accounts for 1 byte; When biBitCount=24, it is true color image that 1 pixel accounts for 3 byte images this moment.
In the graphic file of BMP form, be the rgb value of determining each pixel by data bitmap, determine the rgb value of each pixel of bitmap according to the record of data bitmap, record is to be from left to right in scan line in proper order, is from top to bottom between the scan line.From the file header of graphic file, obtain the reference position of data bitmap, determine the data bitmap of status indicator lamp respective pixel position correspondence again according to the reference position of data bitmap, data bitmap can be represented the rgb value difference in different ways according to the required figure place difference of each pixel in the BMP file, in 24 bitmaps, directly represent rgb value by data bitmap, and other less than color index value in 24 the use palette.With 16 color bitmaps is example, and a data bitmap is only represented color index value in the palette, obtains the RBG value by this index value in palette.The required figure place of each pixel is 4 in 16 color bitmaps, promptly 2 pixels account for 1 byte, adjacent pixels point used color index value in the palette on the right of first pixel of the 1st the byte representation bitmap lower left corner of data bitmap reference position and this pixel were gone together, last 1 first pixel of the byte representation bitmap upper right corner of data bitmap end position and this pixel color index value in the left side adjacent pixels point use palette of going together, other each pixel record is to be from left to right in scan line in proper order, is from top to bottom between the scan line.
Palette has been pointed out the component value of the red, green, blue of each color.Each index in the data bitmap group is all corresponding to a palette list item, and the list item number of palette is determined by biBitCount, works as biBitCount=1,, 2,16,256 list items is arranged at 4,8 o'clock respectively; When biBitCount=24, there is not the palette item.Also be, picture format is the simultaneous mode difference not, when being monochrome, 16 looks, read palette (also claiming color table) during 256 looks and obtain RGB information, when picture format is true color, directly read data bitmap and obtain RGB information,, do not have palette as when the time for true color, directly read data bitmap #1D5863 and correspond to corresponding BGR value this moment, 63 be the component of red color promptly also, 58 is the component of green color, and 1d is the component of blue color.
In actual applications, the rgb value that reads according to the location of pixels of status indicator lamp in image is a set, as comprise the rgb value of 100 pixels, in the step 104, the rgb value of these 100 pixels and the yellow corresponding rgb value of expection are compared, have the rgb value of 81 pixels identical, greater than preset threshold 80% with yellow corresponding rgb value, confirm that status indicator lamp is normal, otherwise confirm that status indicator lamp is undesired.Certainly can also when determining each border of equipment, remove noise using median filtering algorithm, make the border more clear through producing.
In practical operation, if the color of the color of device panel and status indicator lamp is approaching, then can use a test panel of specializing in the test use that differs far away with the status indicator lamp color to cover on the device panel, on test panel, draw and device panel boundary shape, the identical border of size, and make a call to a hole in the position at status indicator lamp place and get final product with the identical size of status indicator lamp with obvious lines.
Second embodiment provided by the invention is a kind of proving installation of status indicator lamp, and its structure comprises as shown in Figure 3:
Image capture module 202: be used under the duty after being provided with the equipment under test working station indicator being carried out image capturing, and generate graphic file according to the image of catching;
Acquisition module 203: be used for the graphic file that generates is analyzed, in the image of catching, obtain the rgb value of working station indicator place location of pixels;
Comparison module 204: the rgb value rgb value corresponding with the expection color that is used for obtaining compares and draws test result.
Further, acquisition module 203: the graphic file that also is used for reading generation is determined the location of pixels of equipment under test border at the image of catching, relativity shift according to working station indicator and equipment border, determine the location of pixels of working station indicator in the image of catching, obtain the rgb value of the location of pixels of status indicator lamp in the image of catching.
Further, acquisition module 203: the graphic file that also is used for reading the bitmap format of generation is determined the location of pixels of equipment under test border at the image of catching, relativity shift according to working station indicator and equipment border, determine the location of pixels of working station indicator in the image of catching, obtain the rgb value of the location of pixels of status indicator lamp in the image of catching.
Further, acquisition module 203: also be used for determining corresponding data bitmap at the location of pixels of the image of catching according to working station indicator, from the data bitmap of determining, obtain the index value of rgb value, from the palette of graphic file, obtain corresponding rgb value according to the index value that obtains.
Further, acquisition module 203: also be used for determining corresponding data bitmap at the location of pixels of the image of catching, from the data bitmap of determining, directly obtain the RBG value according to working station indicator.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.
Claims (10)
1, a kind of method of testing of status indicator lamp is characterized in that, comprising:
The duty of equipment under test is set, and determines the rgb value of working station indicator expection color correspondence under this duty;
Under the duty after being provided with the equipment under test working station indicator is carried out image capturing, and generate graphic file according to the image of catching;
The graphic file that generates is analyzed, in the image of catching, obtained the rgb value of working station indicator place location of pixels;
The rgb value that the rgb value that obtains is corresponding with the expection color compares and draws test result.
2, the method for claim 1 is characterized in that, the graphic file that generates is analyzed, and obtains the rgb value of working station indicator place location of pixels in the image of catching, and is specially:
Read the graphic file of generation and determine the location of pixels of equipment under test border in the image of catching;
According to the relativity shift on working station indicator and equipment border, determine the location of pixels of working station indicator in the image of catching;
Obtain the rgb value of the location of pixels of working station indicator in the image of catching.
3, method as claimed in claim 2 is characterized in that, described graphic file is a bitmap format.
4, method as claimed in claim 3 is characterized in that, obtains the rgb value of the location of pixels of working station indicator in the image of catching, and is specially:
Determine corresponding data bitmap according to the location of pixels of working station indicator in the image of catching;
From the data bitmap of determining, obtain the index value of rgb value, from the palette of graphic file, obtain corresponding rgb value according to the index value that obtains.
5, method as claimed in claim 3 is characterized in that, the rgb value that obtains the location of pixels of working station indicator in the image of catching is specially:
Determine corresponding data bitmap according to the location of pixels of working station indicator in the image of catching;
From the data bitmap of determining, directly obtain the RBG value.
6, a kind of proving installation of status indicator lamp is characterized in that, comprising:
Module is set: be used to be provided with the duty of equipment under test, and determine the rgb value of working station indicator expection color correspondence under this duty;
Image capture module: be used under the duty after being provided with the equipment under test working station indicator being carried out image capturing, and generate graphic file according to the image of catching;
Acquisition module: be used for the graphic file that generates is analyzed, in the image of catching, obtain the rgb value of working station indicator place location of pixels;
Comparison module: the rgb value rgb value corresponding with the expection color that is used for obtaining compares and draws test result.
7, device as claimed in claim 6, it is characterized in that, acquisition module: also be used for reading the graphic file of generation and determine the location of pixels of equipment under test border at the image of catching, relativity shift according to working station indicator and equipment border, determine the location of pixels of working station indicator in the image of catching, obtain the rgb value of the location of pixels of status indicator lamp in the image of catching.
8, device as claimed in claim 7, it is characterized in that, acquisition module: the graphic file that also is used for reading the bitmap format of generation is determined the location of pixels of equipment under test border at the image of catching, relativity shift according to working station indicator and equipment border, determine the location of pixels of working station indicator in the image of catching, obtain the rgb value of the location of pixels of working station indicator in the image of catching.
9, device as claimed in claim 8, it is characterized in that, acquisition module: also be used for determining corresponding data bitmap at the location of pixels of the image of catching according to working station indicator, from the data bitmap of determining, obtain the index value of rgb value, from the palette of graphic file, obtain corresponding rgb value according to the index value that obtains.
10, device as claimed in claim 8 is characterized in that, acquisition module: also be used for determining corresponding data bitmap according to working station indicator at the location of pixels of the image of catching, directly obtain the RBG value from the data bitmap of determining.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2009100078556A CN101482445A (en) | 2009-02-23 | 2009-02-23 | Test method and apparatus for status indication lamp |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2009100078556A CN101482445A (en) | 2009-02-23 | 2009-02-23 | Test method and apparatus for status indication lamp |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101482445A true CN101482445A (en) | 2009-07-15 |
Family
ID=40879656
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2009100078556A Pending CN101482445A (en) | 2009-02-23 | 2009-02-23 | Test method and apparatus for status indication lamp |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101482445A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102184070A (en) * | 2010-06-22 | 2011-09-14 | 上海盈方微电子有限公司 | Method and device for displaying cursor of hardware support |
WO2017117875A1 (en) * | 2016-01-07 | 2017-07-13 | 中兴通讯股份有限公司 | Light source state detection system and method |
CN108318806A (en) * | 2018-02-13 | 2018-07-24 | 中山职业技术学院 | A kind of control panel working station indicator detection device |
CN109688672A (en) * | 2018-12-25 | 2019-04-26 | 北京铁路信号有限公司 | A kind of equipment indicating lamp processing method and system |
CN110849588A (en) * | 2018-08-21 | 2020-02-28 | 通用汽车环球科技运作有限责任公司 | Method for automatically detecting deterioration of vehicle lamp |
CN111239589A (en) * | 2020-01-20 | 2020-06-05 | 福建宏泰智能工业互联网有限公司 | Electronic lock circuit board testing method, device and system |
-
2009
- 2009-02-23 CN CNA2009100078556A patent/CN101482445A/en active Pending
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102184070A (en) * | 2010-06-22 | 2011-09-14 | 上海盈方微电子有限公司 | Method and device for displaying cursor of hardware support |
WO2017117875A1 (en) * | 2016-01-07 | 2017-07-13 | 中兴通讯股份有限公司 | Light source state detection system and method |
CN108318806A (en) * | 2018-02-13 | 2018-07-24 | 中山职业技术学院 | A kind of control panel working station indicator detection device |
CN110849588A (en) * | 2018-08-21 | 2020-02-28 | 通用汽车环球科技运作有限责任公司 | Method for automatically detecting deterioration of vehicle lamp |
CN110849588B (en) * | 2018-08-21 | 2021-11-09 | 通用汽车环球科技运作有限责任公司 | Method for automatically detecting deterioration of vehicle lamp |
CN109688672A (en) * | 2018-12-25 | 2019-04-26 | 北京铁路信号有限公司 | A kind of equipment indicating lamp processing method and system |
CN111239589A (en) * | 2020-01-20 | 2020-06-05 | 福建宏泰智能工业互联网有限公司 | Electronic lock circuit board testing method, device and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108681690B (en) | Assembly line personnel standard operation detection system based on deep learning | |
CN101482445A (en) | Test method and apparatus for status indication lamp | |
CN105868722A (en) | Identification method and system of abnormal power equipment images | |
CN104749184A (en) | Automatic optical detection method and automatic optical detection system | |
CN112136139A (en) | Method and system for improving quality inspection | |
CN108683907A (en) | Optics module picture element flaw detection method, device and equipment | |
CN107014819A (en) | A kind of solar panel surface defects detection system and method | |
CN102348128A (en) | Surveillance camera system having camera malfunction detection function | |
CN104036707A (en) | Display device detection device and method and display system | |
US20080240546A1 (en) | System and method for measuring digital images of a workpiece | |
CN109196553B (en) | Photovoltaic panel identification method, ground station, control equipment and unmanned aerial vehicle | |
CN102035988A (en) | System and method for testing photographic effect of mobile phone camera | |
CN106231295A (en) | A kind of display screen image quality automatic checkout system, detection method and application thereof | |
CN113034624A (en) | Temperature early warning image identification method, system, equipment and storage medium based on temperature sensing color-changing adhesive tape | |
CN110657949A (en) | LED display screen lamp bead spot inspection device and spot inspection method thereof | |
CN111753645A (en) | Inspection method and inspection device for photovoltaic power station and storage medium | |
KR102286470B1 (en) | LED Digital Signage Defect Detection system through Similarity Analysis of Original Image Information and Displayed Image Information | |
CN110418124A (en) | Projected image detection method, device, equipment and computer readable storage medium | |
CN104749801A (en) | High-precision automatic optical detection method and high-precision automatic optical detection system | |
CN114581760B (en) | Equipment fault detection method and system for machine room inspection | |
CN109447195A (en) | A kind of method for inspecting based on 3-D scanning | |
CN108492395A (en) | A kind of cruising inspection system and method for the power matching network equipment based on RFID | |
CN116778837A (en) | Multifunctional display fault detection platform | |
CN112508022A (en) | Transformer substation anti-misoperation system and method based on operation and inspection operation full process | |
CN104977154A (en) | Defect classification method of spatial light modulator with sub pixel structures |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Open date: 20090715 |