CN109819242A - A kind of flare test method, system and readable storage medium storing program for executing - Google Patents

A kind of flare test method, system and readable storage medium storing program for executing Download PDF

Info

Publication number
CN109819242A
CN109819242A CN201910020545.1A CN201910020545A CN109819242A CN 109819242 A CN109819242 A CN 109819242A CN 201910020545 A CN201910020545 A CN 201910020545A CN 109819242 A CN109819242 A CN 109819242A
Authority
CN
China
Prior art keywords
pixel
area
bright
test method
flare test
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
CN201910020545.1A
Other languages
Chinese (zh)
Other versions
CN109819242B (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.)
Truly Opto Electronics Ltd
Original Assignee
Truly Opto Electronics 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 Truly Opto Electronics Ltd filed Critical Truly Opto Electronics Ltd
Priority to CN201910020545.1A priority Critical patent/CN109819242B/en
Publication of CN109819242A publication Critical patent/CN109819242A/en
Application granted granted Critical
Publication of CN109819242B publication Critical patent/CN109819242B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses a kind of flare test methods, comprising: step 1: camera to be measured shooting array light source, obtains dot matrix light image;Step 2: in the dot matrix light image of acquisition, calculating the farthest bright spot distance value of each bright area.The flare test method can carry out flare test to camera to be measured, to screen qualified product, carry out quality control.Invention additionally discloses a kind of flare test macro and readable storage medium storing program for executing.

Description

A kind of flare test method, system and readable storage medium storing program for executing
Technical field
The present invention relates to field of photography more particularly to a kind of flare test methods, system and readable storage medium storing program for executing.
Background technique
In photographic light sources or strong light object, edge will appear some halation, shadow or to external radiation camera to be measured Solar flare, these are referred to as flare.Flare can seriously affect the quality of image, it is therefore desirable to before factory, it is necessary to treat The flare for surveying camera is tested, and to screen qualified product, carries out quality control.
Summary of the invention
In order to solve above-mentioned the deficiencies in the prior art, the present invention provides a kind of flare test method, can be to camera to be measured Flare tested, to screen qualified product, carry out quality control.
The present invention also provides a kind of flare test macro and readable storage medium storing program for executing.
The technical problems to be solved by the invention are achieved by the following technical programs:
A kind of flare test method, comprising:
Step 1: camera to be measured shooting array light source, obtains dot matrix light image;
Step 2: in the dot matrix light image of acquisition, calculating the farthest bright spot distance value of each bright area.
Further, step 2 includes:
Step 2.1: in the dot matrix light image of acquisition, calculating the neighborhood contrast of each pixel;
Step 2.2: according to the neighborhood contrast of each pixel, binaryzation being carried out to each pixel, obtains binary image;
Step 2.3: in the binary image of acquisition, the farthest bright spot distance value of each binaryzation bright area is calculated, as The maximum centrifugal distance of corresponding bright area.
Further, step 2.1 includes:
Step 2.1.1: choosing comprising the first area including it as its corresponding prospect each pixel, choose comprising its As its corresponding background, the second area of same pixel includes and is greater than first area interior second area;
Step 2.1.2: calculating the first average brightness value of the first area of each pixel and the second of second area Y2 is averaged Brightness value;
Step 2.1.3: the neighborhood contrast of each pixel is calculated, wherein (i, j) For the coordinate of each pixel, Ave_Y1 is pixel (i, j) corresponding first average brightness value, and Ave_Y2 is pixel (i, j) corresponding the Two average brightness values.
Further, in step 2.2, the neighborhood contrast of each pixel is compared with default contrast, if adjacent Domain contrast is greater than default contrast, then sets 255 for the brightness value of respective pixel, if neighborhood contrast is less than or equal in advance If contrast, then 0 is set by the brightness value of respective pixel.
Further, step 2.3 includes:
Step 2.3.1: it in the binary image of acquisition, calculates between each binaryzation bright spot and the mass center of corresponding bright area Distance value;
Step 2.3.2: in same binaryzation bright area, being compared calculated each distance value, obtain it is maximum away from Farthest bright spot distance value from value, as corresponding bright area.
Further, before carrying out step 2 further include:
In the dot matrix light image of acquisition, the mass center of each bright area is obtained.
Further, the mass center for obtaining each bright area, includes the following steps:
S1: each bright area is extracted in the dot matrix light image of acquisition according to predetermined luminance threshold value;
S2: it in each bright area extracted, obtains each bright area and corresponds to mass center.
Further, after carrying out step 2, further includes:
Step 3: if any farthest bright spot distance value is greater than pre-determined distance value, judging that the flare test of camera to be measured does not conform to Lattice.
A kind of flare test macro, comprising:
Array light source obtains dot matrix light image for being shot for camera to be measured;
Computing module, the dot matrix light image for obtaining to camera to be measured are handled, to carry out the above-mentioned test side flare Step 2 in method.
A kind of readable storage medium storing program for executing, stores the computer program executed for processor, and the computer program is processed When device executes, the step 2 in above-mentioned flare test method is carried out.
The invention has the following beneficial effects: the flare test methods to carry out camera to be measured to the array light source It shoots to obtain the dot matrix light image of test, then calculates the farthest bright spot distance of each bright area according to dot matrix light image Value, the flare performance of camera to be measured is measured with farthest bright spot distance value, flare test is carried out to camera to be measured, with screening Qualified product carries out quality control.
Detailed description of the invention
Fig. 1 is the step block diagram of test method provided by the invention;
Fig. 2 is the step block diagram of step 2 in test method shown in FIG. 1;
Fig. 3 is the schematic diagram of the dot matrix light image obtained;
Fig. 4 is the schematic diagram of prospect and background when calculating the neighborhood contrast of pixel;
Fig. 5 is the schematic diagram of the binary image obtained;
Fig. 6 is the front schematic view of array light source provided by the invention;
Fig. 7 is the side schematic view of array light source provided by the invention.
Specific embodiment
The present invention will be described in detail with reference to the accompanying drawings and examples.
Embodiment one
As shown in Figure 1, a kind of flare test method, comprising:
Step 1: camera to be measured shooting array light source, obtains dot matrix light image;
In the step 1, as shown in Figures 6 and 7, the array light source includes a substrate 11 and is arranged in 11 one side of substrate Several point light sources 12, several point light sources 12 on the substrate 11 in uniform dot matrix way arrange;The point light source 12 is excellent It selects but is not limited to LED light.The driving mould for driving each point light source 12 to switch is provided on the another side of the substrate 11 Block 13, the output end of the drive module 13 are electrically connected at the input of each point light source 12 by the circuit of the substrate 11 End.
As shown in figure 3, having several bright areas in the dot matrix light image obtained, several bright areas are in dot matrix light image Uniform dot matrix way arrangement, a bright area correspond to a point light source on the array light source.
Step 2: in the dot matrix light image of acquisition, calculating the farthest bright spot distance value of each bright area;
In the step 2, the farthest bright spot distance value of each bright area refers to farthest each of the mass center apart from place bright area The distance between a bright spot and corresponding mass center value.
Therefore, before carrying out step 2 further include:
In the dot matrix light image of acquisition, the mass center of each bright area is obtained.
Wherein, the mass center for obtaining each bright area, includes the following steps:
S1: each bright area is extracted in the dot matrix light image of acquisition according to predetermined luminance threshold value;
In step S1, the size of predetermined luminance threshold value can choose biggish numerical value (this reality by tester's manual setting Apply predetermined luminance threshold value=200 in example);In the dot matrix light image of acquisition, the bright spot that brightness value is greater than predetermined luminance threshold value is mentioned It takes out combination and forms each bright area.
S2: it in each bright area extracted, obtains each bright area and corresponds to mass center;
In step S2, in the dot matrix light image of acquisition, using i axis as horizontal axis, j axis as the longitudinal axis, rectangular co-ordinate is established It is ij, obtains the coordinate (i, j) of each pixel, then the coordinate value according to each bright spot extracted calculates each bright area Center-of-mass coordinate.
As shown in Fig. 2, the step 2 specifically includes:
Step 2.1: in the dot matrix light image of acquisition, calculating the neighborhood contrast of each pixel;
Wherein, which includes:
Step 2.1.1: as shown in figure 4, each pixel is chosen comprising the first area Y1 including it as its corresponding prospect, It chooses comprising the second area Y2 including it as its corresponding background, the second area Y2 of same pixel includes and is greater than first Region Y1;
In step 2.1.1, the present embodiment chooses first area Y1 of the region of 6*6 pixel formation as each pixel, Choose second area Y2 of the region of 30*30 pixel formation as each pixel.
Step 2.1.2: the first average brightness value Ave_Y1 and second area of the first area Y1 of each pixel are calculated The second average brightness value Ave_Y1 of Y2;
In step 2.1.2, the brightness value according to all pixels in the Y1 of first area calculates its first average brightness value Ave_Y1, the brightness value according to all pixels in second area Y2 calculate its second average brightness value Ave_Y2.
Step 2.1.3: the neighborhood contrast of each pixel is calculated, wherein (i, j) is the coordinate of each pixel, and Ave_Y1 is pixel (i, j) corresponding first average brightness value, and Ave_Y2 is that pixel (i, j) is right Answer the second average brightness value.
Step 2.2: according to the neighborhood contrast of each pixel, binaryzation being carried out to each pixel, obtains binary image;
In the step 2.2, the numerical value of default contrast thres is empirically preset (in embodiment by testing staff Thres=2.2), the neighborhood contrast of each pixel is compared with default contrast thres, if neighborhood contrast is greater than in advance If contrast thres then sets 255 for the brightness value of respective pixel, if neighborhood contrast is less than or equal to default contrast Thres then sets 0 for the brightness value of respective pixel.
As shown in figure 5, having several binaryzation bright areas on the binary image obtained, several binaryzation bright areas are two It is arranged on value image in uniform dot matrix way, a binaryzation bright area corresponds to a clear zone in dot matrix light image Domain.
Step 2.3: in the binary image of acquisition, the farthest bright spot distance value of each binaryzation bright area is calculated, Maximum centrifugal distance as corresponding bright area;
In the step 2.3, before calculating farthest bright spot distance value, first remove the discrete bright area in binary image;? When removing discrete bright area, the binaryzation bright area that 4 connected regions or 8 connected regions are met in binary image is screened Remove as discrete bright area.
Likewise, the farthest bright spot distance value of each binaryzation bright area refers to distance and place binaryzation bright area The distance between the farthest each binaryzation bright spot of the mass center of corresponding bright area and corresponding mass center are worth.
Wherein, which includes:
Step 2.3.1: it in the binary image of acquisition, calculates between each binaryzation bright spot and the mass center of corresponding bright area Distance value;
In step 2.3.1, calculated by the coordinate of each binaryzation bright spot and mass center in rectangular coordinate system ij The distance between each binaryzation bright spot and corresponding mass center value.
Step 2.3.2: in same binaryzation bright area, being compared calculated each distance value, obtains maximum Distance value, the farthest bright spot distance value as corresponding bright area.
In addition, after carrying out step 2, further includes:
Step 3: if any farthest bright spot distance value is greater than pre-determined distance value, judging that the flare test of camera to be measured does not conform to Lattice;
In the step 3, pre-determined distance value (the present embodiment uses 140 pixels) is needed according to each on the array light source The shooting distance of the light emitting region size of point light source and camera to be measured determines.
The flare test method shoots camera to be measured to the array light source to obtain the array light of test Image, then calculate the farthest bright spot distance value of each bright area according to dot matrix light image, with farthest bright spot distance value measure to The flare performance for surveying camera carries out flare test to camera to be measured, to screen qualified product, carries out quality control.
Embodiment two
A kind of flare test macro, comprising:
Array light source obtains dot matrix light image for being shot for camera to be measured;
Computing module, the dot matrix light image for obtaining to camera to be measured are handled, to carry out described in embodiment one Step 2 in flare test method.
Embodiment three
A kind of readable storage medium storing program for executing, stores the computer program executed for processor, which is held by processor When row, the step 2 in flare test method described in embodiment one is carried out.
Embodiments of the present invention above described embodiment only expresses, the description thereof is more specific and detailed, but can not Therefore limitations on the scope of the patent of the present invention are interpreted as, as long as skill obtained in the form of equivalent substitutions or equivalent transformations Art scheme should all be fallen within the scope and spirit of the invention.

Claims (10)

1. a kind of flare test method characterized by comprising
Step 1: camera to be measured shooting array light source, obtains dot matrix light image;
Step 2: in the dot matrix light image of acquisition, calculating the farthest bright spot distance value of each bright area.
2. flare test method according to claim 1, which is characterized in that step 2 includes:
Step 2.1: in the dot matrix light image of acquisition, calculating the neighborhood contrast of each pixel;
Step 2.2: according to the neighborhood contrast of each pixel, binaryzation being carried out to each pixel, obtains binary image;
Step 2.3: in the binary image of acquisition, the farthest bright spot distance value of each binaryzation bright area is calculated, as The maximum centrifugal distance of corresponding bright area.
3. flare test method according to claim 2, which is characterized in that step 2.1 includes:
Step 2.1.1: choosing comprising the first area including it as its corresponding prospect each pixel, choose comprising its As its corresponding background, the second area of same pixel includes and is greater than first area interior second area;
Step 2.1.2: calculate the first area of each pixel the first average brightness value and second area it is second average bright Angle value;
Step 2.1.3: the neighborhood contrast of each pixel is calculated, wherein (i, j) For the coordinate of each pixel, Ave_Y1 is pixel (i, j) corresponding first average brightness value, and Ave_Y2 is pixel (i, j) corresponding the Two average brightness values.
4. flare test method according to claim 2, which is characterized in that in step 2.2, by the neighbour of each pixel Domain contrast is compared with default contrast, if neighborhood contrast is greater than default contrast, by the brightness value of respective pixel 255 are set as, if neighborhood contrast is less than or equal to default contrast, sets 0 for the brightness value of respective pixel.
5. flare test method according to claim 2, which is characterized in that step 2.3 includes:
Step 2.3.1: it in the binary image of acquisition, calculates between each binaryzation bright spot and the mass center of corresponding bright area Distance value;
Step 2.3.2: in same binaryzation bright area, being compared calculated each distance value, obtain it is maximum away from Farthest bright spot distance value from value, as corresponding bright area.
6. any flare test method in -5 according to claim 1, which is characterized in that also wrapped before carrying out step 2 It includes:
In the dot matrix light image of acquisition, the mass center of each bright area is obtained.
7. flare test method according to claim 6, which is characterized in that obtain the mass center of each bright area, including such as Lower step:
S1: each bright area is extracted in the dot matrix light image of acquisition according to predetermined luminance threshold value;
S2: it in each bright area extracted, obtains each bright area and corresponds to mass center.
8. any flare test method in -5 according to claim 1, which is characterized in that after carrying out step 2, and also Include:
Step 3: if any farthest bright spot distance value is greater than pre-determined distance value, judging that the flare test of camera to be measured does not conform to Lattice.
9. a kind of flare test macro characterized by comprising
Array light source obtains dot matrix light image for being shot for camera to be measured;
Computing module, the dot matrix light image for obtaining to camera to be measured are handled, any in claim 1-8 to carry out Step 2 in the flare test method.
10. a kind of readable storage medium storing program for executing stores the computer program executed for processor, which is characterized in that the computer When program is executed by processor, the step 2 in flare test method described in any one of claims 1-8 is carried out.
CN201910020545.1A 2019-01-09 2019-01-09 Flare testing method and system and readable storage medium Active CN109819242B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910020545.1A CN109819242B (en) 2019-01-09 2019-01-09 Flare testing method and system and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910020545.1A CN109819242B (en) 2019-01-09 2019-01-09 Flare testing method and system and readable storage medium

Publications (2)

Publication Number Publication Date
CN109819242A true CN109819242A (en) 2019-05-28
CN109819242B CN109819242B (en) 2020-08-25

Family

ID=66603234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910020545.1A Active CN109819242B (en) 2019-01-09 2019-01-09 Flare testing method and system and readable storage medium

Country Status (1)

Country Link
CN (1) CN109819242B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111951322A (en) * 2020-07-16 2020-11-17 昆山丘钛光电科技有限公司 Camera module quality detection method and device and computer storage medium
CN111988604A (en) * 2020-08-19 2020-11-24 威海世高光电子有限公司 Flare automatic checking system
CN113473110A (en) * 2021-03-25 2021-10-01 广州得尔塔影像技术有限公司 Lens detection method and device and terminal equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080239117A1 (en) * 2007-04-02 2008-10-02 Hon Hai Precision Industry Co., Ltd. Shading detecting method and shading detecting apparatus for camera module
TW201137509A (en) * 2010-04-30 2011-11-01 Hon Hai Prec Ind Co Ltd Lens flare testing device and method for testing lens flare
CN102937774A (en) * 2012-11-30 2013-02-20 信利光电(汕尾)有限公司 Lens module detecting device
CN106534841A (en) * 2016-11-10 2017-03-22 宁波舜宇车载光学技术有限公司 Lens detection method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080239117A1 (en) * 2007-04-02 2008-10-02 Hon Hai Precision Industry Co., Ltd. Shading detecting method and shading detecting apparatus for camera module
TW201137509A (en) * 2010-04-30 2011-11-01 Hon Hai Prec Ind Co Ltd Lens flare testing device and method for testing lens flare
CN102937774A (en) * 2012-11-30 2013-02-20 信利光电(汕尾)有限公司 Lens module detecting device
CN106534841A (en) * 2016-11-10 2017-03-22 宁波舜宇车载光学技术有限公司 Lens detection method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111951322A (en) * 2020-07-16 2020-11-17 昆山丘钛光电科技有限公司 Camera module quality detection method and device and computer storage medium
CN111988604A (en) * 2020-08-19 2020-11-24 威海世高光电子有限公司 Flare automatic checking system
CN113473110A (en) * 2021-03-25 2021-10-01 广州得尔塔影像技术有限公司 Lens detection method and device and terminal equipment
CN113473110B (en) * 2021-03-25 2024-04-16 广州得尔塔影像技术有限公司 Lens detection method and device and terminal equipment

Also Published As

Publication number Publication date
CN109819242B (en) 2020-08-25

Similar Documents

Publication Publication Date Title
TWI674804B (en) Video dehazing device and method
CN108492776B (en) Intelligent external optical compensation method for AMOLED screen brightness unevenness
CN109819242A (en) A kind of flare test method, system and readable storage medium storing program for executing
WO2019100675A1 (en) Partition-based backlight control method and device
CN103841401B (en) For revising the apparatus and method of the depth map of 3-D view
CN107820069B (en) Video monitoring equipment ISP debugging method
CN109856164A (en) A kind of machine vision acquires the optimization device and its detection method of a wide range of image
JP2013197918A5 (en)
CN106210712A (en) A kind of dead pixel points of images detection and processing method
KR101941801B1 (en) Image processing method and device for led display screen
JP2020518018A (en) Brightness adjustment system
CN110660060B (en) OLED screen color mixing defect detection method, terminal equipment and computer readable medium
KR20180035863A (en) Image contrast enhancement method
CN103377474A (en) Camera lens shadow correction coefficient determination method and device, and camera lens shadow correction method and device
CN104836968A (en) Information processing method and electronic device
CN113191988B (en) Brightness correction method and device, storage medium and electronic device
CN111256950A (en) Uneven correction data generation method and uneven correction data generation system
TWI414181B (en) Dimming control apparatus and dimming control method
CN112419950B (en) Display difference judging method and system of display device and display device
JP6232933B2 (en) Radiation distortion correction apparatus, road environment recognition apparatus, radial distortion correction method and program
CN106534708A (en) Wide dynamic range imaging method
CN112102762A (en) Method and device for identifying abnormal light points of LED screen
KR20100089301A (en) White balance adjusting apparatus and method considering effect of single tone image
CN112381896B (en) Brightness correction method and system for microscopic image and computer equipment
CN114078426B (en) Method for eliminating influence of camera curve on lamp point image and display screen correction 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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Lin Ting

Inventor after: Li Shanmeng

Inventor after: Liu Xing

Inventor after: Zheng Huaixi

Inventor after: Shi Shijie

Inventor after: Fan Jie

Inventor after: Zheng Ruijian

Inventor before: Lin Ting

GR01 Patent grant
GR01 Patent grant