CN107085344B - Intelligent device and method for fully automatic setting of backlight in imaging system - Google Patents
Intelligent device and method for fully automatic setting of backlight in imaging system Download PDFInfo
- Publication number
- CN107085344B CN107085344B CN201710357201.0A CN201710357201A CN107085344B CN 107085344 B CN107085344 B CN 107085344B CN 201710357201 A CN201710357201 A CN 201710357201A CN 107085344 B CN107085344 B CN 107085344B
- Authority
- CN
- China
- Prior art keywords
- backlight
- module
- light
- light emitting
- array
- 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.)
- Active
Links
- 238000003384 imaging method Methods 0.000 title claims abstract description 29
- 238000000034 method Methods 0.000 title claims abstract description 24
- 238000003491 array Methods 0.000 claims abstract description 20
- 238000012937 correction Methods 0.000 claims description 16
- 238000007689 inspection Methods 0.000 claims description 7
- 230000002159 abnormal effect Effects 0.000 claims description 6
- 239000011159 matrix material Substances 0.000 claims description 6
- 230000032683 aging Effects 0.000 claims description 3
- 238000013461 design Methods 0.000 claims description 3
- 238000012986 modification Methods 0.000 claims description 2
- 230000004048 modification Effects 0.000 claims description 2
- 208000034423 Delivery Diseases 0.000 claims 1
- 230000000694 effects Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- NIXOWILDQLNWCW-UHFFFAOYSA-N acrylic acid group Chemical group C(C=C)(=O)O NIXOWILDQLNWCW-UHFFFAOYSA-N 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001066 destructive effect Effects 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 238000009659 non-destructive testing Methods 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G03—PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
- G03B—APPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
- G03B15/00—Special procedures for taking photographs; Apparatus therefor
- G03B15/02—Illuminating scene
- G03B15/03—Combinations of cameras with lighting apparatus; Flash units
- G03B15/05—Combinations of cameras with electronic flash apparatus; Electronic flash units
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G3/00—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
- G09G3/20—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
- G09G3/22—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources
- G09G3/30—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels
- G09G3/32—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED]
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Studio Devices (AREA)
Abstract
本发明公开了一种全自动设置成像系统中背光的智能装置及方法,该装置,控制板与电脑控制连接,采集和分析相机的图像信息,控制发光阵列的工作状态;总控制器模块用于接受电脑的操作指令后,发出指令给分控制器,使得分控制器驱动模块驱动各个发光阵列的运行。该方法包括步骤1.初始化;步骤2.判断背光区域的成像;步骤3.配对图像和发光阵列;步骤4.电脑发送信息给总控制器模块;步骤5.采集图像;步骤6.计算,步骤7.调整,步骤8.结束。本发明自动计算出区域亮度信息,然后驱动单个区域的发光二极管,改变亮度,使得面对一张色度完全一致的图像,呈现出各个区域的亮度一致的正确效果。
The invention discloses an intelligent device and method for fully automatic setting of backlight in an imaging system. In the device, a control board is controlled and connected with a computer to collect and analyze image information of a camera, and to control the working state of a light-emitting array; a general controller module is used for After accepting the operation instruction of the computer, it sends an instruction to the sub-controller, so that the sub-controller driving module drives the operation of each light-emitting array. The method includes steps 1. initialization; step 2. judging the imaging of the backlight area; step 3. pairing images and light-emitting arrays; step 4. sending information from the computer to the general controller module; 7. Adjust, step 8. End. The invention automatically calculates the regional brightness information, and then drives the light-emitting diodes in a single region to change the brightness, so that facing an image with completely consistent chromaticity, the correct effect of consistent brightness of each region is presented.
Description
技术领域technical field
本发明涉及一种全自动设置成像系统中背光的智能装置及方法,属于成像系统使用时的辅助设备技术领域。The invention relates to an intelligent device and a method for automatically setting a backlight in an imaging system, and belongs to the technical field of auxiliary equipment when the imaging system is used.
背景技术Background technique
使用相机和背光构成的成像系统是人们用于拍摄例如液晶屏等可以透射的产品图像,继而实现对产品进行无损分析的主要设备,它提供一种很好的无损检测手段,使得人们能够快速的分析产品的质量。The imaging system composed of a camera and a backlight is the main equipment used by people to take pictures of products that can transmit such as LCD screens, and then realize non-destructive analysis of products. It provides a good non-destructive testing method, which enables people to quickly Analyze the quality of the product.
目前,背光板是由一个控制器驱动多个发光二极管构成、表面是亚克力的面板构成,不能够分别控制某个区域亮度的工作。而由于相机的镜头的畸变、及镜头与相机内部感应阵列不一致,以及一些其他原因,使得相机成像时,即使是面对一张色度完全一致的图像,也会呈现出各个区域的亮度不一致的错误效果,这种效果对下一步的处理有着严重的影响,而现有的方案就是人肉眼观察出错误,并且不能调整背光,这样,就严重制约了这种图像检测产品的应用。At present, the backlight panel is composed of a controller driving a plurality of light-emitting diodes, and the surface is composed of an acrylic panel, which cannot individually control the brightness of a certain area. Due to the distortion of the lens of the camera, the inconsistency between the lens and the sensor array inside the camera, and some other reasons, when the camera is imaging, even if it faces an image with completely consistent chromaticity, the brightness of each area will be inconsistent. Error effect, this effect has a serious impact on the next processing, and the existing solution is that the human eye observes the error, and the backlight cannot be adjusted, which seriously restricts the application of this image detection product.
如果有一款设备能够全自动调整成像系统中背光,使得面对一张色度完全一致的图像,也会呈现出各个区域的亮度一致的正确效果,那么即可以给成像系统一个正确的初始值,同时,它还能自检,分析错误来源,自动报错。那么就可以对下一步的处理有着良好的影响,从而推动这种图像检测产品的应用。If there is a device that can automatically adjust the backlight in the imaging system, so that in the face of an image with exactly the same chromaticity, it will also show the correct effect of the same brightness in each area, then the imaging system can be given a correct initial value, At the same time, it can also self-check, analyze the source of errors, and automatically report errors. Then it can have a good influence on the next processing, thereby promoting the application of this image detection product.
经广泛的调查研究,现有的论文、专利均无此类产品。After extensive investigation and research, there are no such products in existing papers and patents.
发明内容SUMMARY OF THE INVENTION
为了解决上述存在的问题,本发明公开了一种全自动设置成像系统中背光的智能装置及方法,其具体技术方案如下:In order to solve the above-mentioned problems, the present invention discloses an intelligent device and method for automatically setting the backlight in an imaging system, and its specific technical solutions are as follows:
一种全自动设置成像系统中背光的智能装置,包括电源、发光模块、发音模块、总控制器模块、分控制器驱动模块、发光阵列、相机和电脑,An intelligent device for automatically setting backlight in an imaging system, comprising a power supply, a light-emitting module, a sounding module, a main controller module, a sub-controller driving module, a light-emitting array, a camera and a computer,
所述电源、发光模块、发音模块、总控制器模块和分控制器驱动模块集中在一个控制板内,所述控制板与电脑控制连接,采集和分析相机的图像信息,控制发光阵列的工作状态;The power supply, the light-emitting module, the pronunciation module, the main controller module and the sub-controller drive module are integrated in a control board, and the control board is connected to the computer for control, collecting and analyzing the image information of the camera, and controlling the working state of the light-emitting array ;
所述电源给发光模块、发音模块、总控制器模块、分控制器驱动模块、发光阵列、相机和电脑供电;The power supply supplies power to the light-emitting module, the pronunciation module, the main controller module, the sub-controller driving module, the light-emitting array, the camera and the computer;
所述发光模块用于显示发光阵列的工作状态;The light-emitting module is used to display the working state of the light-emitting array;
所述发音模块用于在发光阵列工作异常时发出报警声;The sounding module is used to issue an alarm sound when the light-emitting array works abnormally;
所述总控制器模块用于接受电脑的操作指令后,发出指令给分控制器驱动模块,使得分控制器驱动模块驱动各个发光阵列的运行,总控制器模块还驱动发音模块和发光模块的工作;The general controller module is used to issue an instruction to the sub-controller driving module after receiving the operation instruction of the computer, so that the sub-controller driving module drives the operation of each light-emitting array, and the main controller module also drives the work of the pronunciation module and the light-emitting module. ;
所述分控制器驱动模块用于接受总控制器模块的指令,控制各个发光阵列的工作;The sub-controller driving module is used for accepting the instructions of the main controller module to control the work of each light-emitting array;
所述发光阵列用于构成背光的发光部分,构成了背光的主体;The light-emitting array is used to form the light-emitting part of the backlight, and constitutes the main body of the backlight;
所述相机用于在电脑的操作下,拍摄需要检测的对象;The camera is used for photographing the object to be detected under the operation of the computer;
所述电脑用于获得相机的拍摄结果,用于分析和保存相机拍摄的照片,用于驱动总控制器模块来改变背光中各个发光阵列的工作,用于记录这些参数以备下次同批产品直接使用,分析各种状态,分析错误可能情况并报警。The computer is used to obtain the shooting results of the camera, to analyze and save the photos taken by the camera, to drive the master controller module to change the work of each light-emitting array in the backlight, and to record these parameters for the next batch of products. Use directly, analyze various states, analyze possible errors and report to the police.
所述电源选用220V的交流电源,并转换成两路5V的模块电源,其中一路是供给发光模块、发音模块、总控制器模块和分控制器驱动模块,另一路用于驱动发光阵列。The power source selects 220V AC power supply, and converts it into two 5V module power sources, one of which is used to supply the light-emitting module, the pronunciation module, the main controller module and the sub-controller drive module, and the other is used to drive the light-emitting array.
所述电源设置有按钮,所述按钮用于控制电源打开和关闭,所述按钮选用轻触自锁的微动开关。The power supply is provided with a button, the button is used to control the power on and off, and the button is a micro-switch with light touch and self-locking.
所述总控制器采用的是STM32F107芯片,分控制器采用的是STM32F103芯片。The main controller adopts STM32F107 chip, and the sub-controller adopts STM32F103 chip.
所述发光阵列选用Risym的5mm高亮白光发光二极管,构成了4*3的发光矩阵,所述发音模块选用蜂鸣器。The light-emitting array uses Risym's 5mm high-brightness white light-emitting diodes to form a 4*3 light-emitting matrix, and the sounding module uses a buzzer.
所述相机选用大恒水星MER-1070-10GM/C型1070万像素的工业相机,所述电脑选用戴尔T5810型图形工作站。The camera is a Daheng Mercury MER-1070-10GM/C 10.7-megapixel industrial camera, and the computer is a Dell T5810 graphics workstation.
一种全自动设置成像系统中背光的智能方法,包括如下操作步骤:An intelligent method for fully automatic setting of backlight in an imaging system, comprising the following operation steps:
步骤1.初始化:电脑发送信息给驱动总控制器模块,来改变背光中各个发光阵列的状态,全部变为最亮值,设置正常工作状态下的目标平均亮度比例设可以容忍的比例误差范围Gert,即理想亮度为设置发光阵列初始修正比例中的其中i代表的是第i次修正迭代,设置最大修正迭代次数imax;Step 1. Initialization: The computer sends information to the drive master controller module to change the state of each light-emitting array in the backlight, all of which become the brightest value, and set the target average brightness ratio under normal working conditions Set the tolerable scale error range Gert, that is, the ideal brightness as Set the initial correction scale of the light-emitting array middle where i represents the ith correction iteration, and sets the maximum number of correction iterations imax;
步骤2.判断背光区域的成像:在没有待检物体,仅有背光的情况下,电脑驱动相机,采集图像,获得图像后,寻找图像中的待检目标区域,即背光区域的成像,背光是由若干个发光阵列构成的,且设计为一个矩形阵列,在步骤1的设置全部发光阵列为最亮值的情况下,如果无法检测到一个矩阵,那么说明该背光硬件出现异常,或者相机出现问题,那么就停止检查,驱动发光模块、发音模块,进行报警工作,进入步骤8;Step 2. Determine the imaging of the backlight area: when there is no object to be inspected and only the backlight, the computer drives the camera, collects the image, and after obtaining the image, finds the target area to be inspected in the image, that is, the imaging of the backlight area, and the backlight is It consists of several light-emitting arrays and is designed as a rectangular array. In the case where all light-emitting arrays are set to the brightest value in step 1, if a matrix cannot be detected, it means that the backlight hardware is abnormal, or the camera has a problem , then stop the inspection, drive the light-emitting module and the sound-emitting module, perform alarm work, and go to step 8;
步骤3.配对图像和发光阵列:在获得一个正确的背光成像图像后,获得背光区域长像素值Him、宽像素值Wim以后,将之与实际的发光阵列一一配对,Step 3. Pairing the image and the light-emitting array: After obtaining a correct backlight imaging image, after obtaining the long pixel value H im and the wide pixel value W im of the backlight area, pair them with the actual light-emitting array one by one,
其原理是,由于已知真实背光下,长方向有mm个发光阵列,宽方向有nn个发光阵列,那么就知道每个发光阵列在图像上显示区域的像素长度Hma、像素宽度Wma,The principle is that, since it is known that under the real backlight, there are mm light-emitting arrays in the long direction and nn light-emitting arrays in the width direction, then the pixel length H ma and the pixel width W ma of the display area of each light-emitting array on the image are known,
即:which is:
Hma=Him/mmH ma = H im /mm
Wma=Wim/nnW ma =W im /nn
这样,就把整个背光区域在图像的显示区域分割成若干个单独的区域,即Im(m,n),其中m代表的是长方向第m个阵列,m=1,…,mm,n代表的是宽方向的第n个阵列,n=1,…,nn,In this way, the entire backlight area is divided into several separate areas in the image display area, namely Im(m, n), where m represents the mth array in the long direction, m=1,...,mm, n represents is the nth array in the width direction, n=1,...,nn,
然后,根据电路设计时的发光阵列排列的顺序,那么就使得每个图像区域Im(m,n)与发光阵列LED(m,n)一一配对起来;Then, according to the order in which the light-emitting arrays are arranged in the circuit design, each image area Im(m, n) is paired with the light-emitting array LED(m, n) one by one;
步骤4.电脑发送信息给总控制器模块,驱动其来改变背光中各个发光阵列LED(m,n)的显示,即目标亮度为 Step 4. The computer sends information to the main controller module, and drives it to change the display of each light-emitting array LED (m, n) in the backlight, that is, the target brightness is
步骤5.采集图像,分析每个图像区域Im(m,n)平均亮度亮度方差S(m,n)、整个图像的平均亮度Gavg,即:
其中,代表的是长方向第m个阵列、宽方向的第n个阵列中的长方向第i个、宽方向第j个像素的像素值,in, Represents the pixel value of the mth array in the length direction, the nth array in the width direction, the ith pixel in the length direction, and the jth pixel in the width direction,
步骤6.每个图像区域Im(m,n)的亮度方差S(m,n),计算出它们的平均值Savg和方差SS,Step 6. Calculate the brightness variance S (m, n) of each image area Im(m, n) , and calculate their average value S avg and variance SS,
由于背光的发光阵列使用时,会产生老化和个别发光二极管损坏,导致不发光,故在此,采用Savg和SS,使用阈值法快速分析出是否有该类型问题出现,When the light-emitting array of the backlight is used, it will cause aging and damage to individual light-emitting diodes, resulting in no light-emitting, so here, using S avg and SS, use the threshold method to quickly analyze whether there is such a type of problem.
如果存在if it exists
Savg≥T(Savg)S avg ≥T(S avg )
那么说明整个背光的有很多区域都有严重的发光不均匀的现象了,需要更换整个背光,进入步骤8,Then it means that many areas of the entire backlight have serious uneven lighting, and the entire backlight needs to be replaced. Go to step 8.
如果存在if it exists
SS≥T(SS)SS≥T(SS)
那么说明背光的个别区域存在严重的与其他区域不同的现象了,需要对该区域的发光阵列进行修理,进入步骤8,Then it means that some areas of the backlight are seriously different from other areas, and the light-emitting array in this area needs to be repaired. Go to step 8.
如果存在以上两种问题中的一个,那么就停止检查,驱动发光模块、发音模块,进行报警工作,如果没有,那么就进入步骤7,进行下一步工作;If there is one of the above two problems, then stop the inspection, drive the light-emitting module and the sound-emitting module, and perform the alarm work; if not, then go to step 7 and proceed to the next step;
步骤7.调整:计算每个图像区域平均亮度与整个图像的平均亮度的区别程度,Step 7. Adjustment: Calculate the difference between the average brightness of each image area and the average brightness of the entire image,
区分出每个图像区域Im(m,n)是否符合误差范围,即|D(m,n)|是否在Gert以内,如果在,那么就不需要调整;如果不在,那么就需要对其进行调整,即:Distinguish whether each image area Im(m, n) conforms to the error range, that is, whether |D(m, n)| is within Gert, if it is, then it does not need to be adjusted; if it is not, then it needs to be adjusted ,which is:
如果存在|D(m,n)|>Gert,那么说明系统还需要进一步修正,If there is |D(m,n)|>Gert, then the system needs to be further revised,
此时,如果存在:At this point, if there is:
i≥imaxi≥imax
那么说明该装置通过imax修正,仍无法正常工作,说明系统出现问题,如果还未达到,那么进入步骤4,Then it means that the device has been corrected by imax and still cannot work normally, which means that there is a problem with the system. If it has not been reached, then go to step 4.
如果所有的那么说明系统一开始就是正常无需调整,可以正常输出了,这也作为整个智能装置出厂时的标准,进入步骤8,if all Then it means that the system is normal at the beginning without adjustment, and can output normally. This is also the standard for the entire smart device when it leaves the factory. Go to step 8.
如果所有的D(m,n)=0,那么说明系统经过调整正常输出了,这也作为整个智能装置正常工作的标准,进入步骤8;If all D(m, n)=0, it means that the system has been adjusted to output normally, which is also used as the standard for the normal operation of the entire smart device, and then go to step 8;
步骤8.结束:Step 8. End:
保存修正值分析系统状态,停止检查,驱动发光模块、发音模块,进行报警工作,并输出以下几种信息之一:save correction value Analyze system status, stop inspection, drive light-emitting module, sound module, alarm, and output one of the following information:
(1)出厂正常;(1) The factory is normal;
(2)经修正后工作正常;(2) It works normally after correction;
(3)错误类型:(3) Error type:
·整个背光的很多区域都有严重的发光不均匀的现象了,需要更换整个背光;There are serious uneven lighting in many areas of the entire backlight, and the entire backlight needs to be replaced;
·背光的个别区域存在严重的与其他区域不同的现象了,显示该区域的编号,提醒需要对该区域的发光阵列进行修理,Some areas of the backlight are seriously different from other areas. The number of the area is displayed to remind that the light-emitting array in this area needs to be repaired.
·该装置通过imax修正,仍无法正常工作,说明系统出现问题,·The device is corrected by imax, but still can't work normally, indicating that there is a problem with the system,
·无法检测到背光区域,那么说明该背光硬件整体出现异常,或者相机出现问题。If the backlight area cannot be detected, it means that the backlight hardware is abnormal as a whole, or there is a problem with the camera.
本发明的有益效果是:The beneficial effects of the present invention are:
本发明装置基于现有的电子技术和机器视觉技术,提出了一种全自动设置成像系统中背光的智能装置,它能够自动计算出区域亮度信息,然后驱动单个区域的发光二极管,改变亮度,使得面对一张色度完全一致的图像,呈现出各个区域的亮度一致的正确效果。同时,它还能自检,分析错误来源,自动报错。这样的装置不仅客观,而且节省了操作人员的精力,减少劳动力,降低成本,还提高了下一步图像处理的准确率。The device of the invention is based on the existing electronic technology and machine vision technology, and proposes an intelligent device for automatically setting the backlight in the imaging system, which can automatically calculate the regional brightness information, and then drive the light-emitting diodes in a single region to change the brightness, so that the In the face of an image with exactly the same chromaticity, the correct effect of uniform brightness in each area is presented. At the same time, it can also self-check, analyze the source of errors, and automatically report errors. Such a device is not only objective, but also saves the operator's energy, labor, and cost, and also improves the accuracy of the next image processing.
本发明方法分割各个发光阵列对应的图像区域,自动计算出区域亮度,然后驱动单个区域的发光二极管,改变亮度,使得面对一张色度完全一致的图像,呈现出各个区域的亮度一致的正确效果。同时,可以分析本智能装置的各种状态,分析错误可能情况并报警。The method of the invention divides the image area corresponding to each light-emitting array, automatically calculates the regional brightness, and then drives the light-emitting diodes in a single area to change the brightness, so that facing an image with completely consistent chromaticity, the brightness of each area is consistent and correct. Effect. At the same time, various states of the smart device can be analyzed, possible errors can be analyzed, and an alarm can be issued.
附图说明Description of drawings
图1为本发明装置的连接状态结构示意图;1 is a schematic structural diagram of the connection state of the device of the present invention;
图2为本发明装置的电路控制关系示意图;2 is a schematic diagram of a circuit control relationship of the device of the present invention;
图3为本发明方法的程序流程示意图。FIG. 3 is a schematic flow chart of the program of the method of the present invention.
1、待测物体;2、背光;3、置物平台;4、控制板;5、电脑;6、摄像机。1. Object to be measured; 2. Backlight; 3. Object storage platform; 4. Control panel; 5. Computer; 6. Camera.
具体实施方式Detailed ways
下面结合附图和具体实施方式,进一步阐明本发明。应理解下述具体实施方式仅用于说明本发明而不用于限制本发明的范围。The present invention will be further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and not to limit the scope of the present invention.
图1为本发明装置的连接状态结构示意图,结合附图可见,本发明装置在使用时,待检物体摆放在置物平台上的背光区域,摄像机与电脑连接,电脑通过控制板调控背光区域的发光阵列。1 is a schematic diagram of the connection state structure of the device of the present invention. It can be seen in conjunction with the accompanying drawings that when the device of the present invention is in use, the object to be inspected is placed in the backlight area on the storage platform, the camera is connected to the computer, and the computer controls the backlight area through the control panel. Illuminated array.
图2为本发明装置的电路控制关系示意图;结合附图可见,一种全自动设置成像系统中背光的智能装置,包括电源、发光模块、发音模块、总控制器模块、分控制器驱动模块、发光阵列、相机和电脑,2 is a schematic diagram of the circuit control relationship of the device of the present invention; it can be seen in conjunction with the accompanying drawings that a kind of intelligent device for automatically setting the backlight in the imaging system, including a power supply, a light-emitting module, a pronunciation module, a general controller module, a sub-controller drive module, light-emitting arrays, cameras and computers,
所述电源、发光模块、发音模块、总控制器模块、分控制器驱动模块集中在一个控制板内,所述控制板与电脑控制连接,采集和分析相机的图像信息,控制发光阵列的工作状态;The power supply, the light-emitting module, the pronunciation module, the main controller module and the sub-controller drive module are concentrated in one control board, and the control board is connected with the computer to collect and analyze the image information of the camera and control the working state of the light-emitting array. ;
所述电源给发光模块、发音模块、总控制器模块、分控制器驱动模块、发光阵列、相机和电脑供电;The power supply supplies power to the light-emitting module, the pronunciation module, the main controller module, the sub-controller driving module, the light-emitting array, the camera and the computer;
所述发光模块用于显示发光阵列的工作状态;The light-emitting module is used to display the working state of the light-emitting array;
所述发音模块用于在发光阵列工作异常时发出报警声;The sounding module is used to issue an alarm sound when the light-emitting array works abnormally;
所述总控制器模块用于接受电脑的操作指令后,发出指令给分控制器驱动模块,使得分控制器驱动模块驱动各个发光阵列的运行,总控制器模块还驱动发音模块和发光模块的工作;The general controller module is used to issue an instruction to the sub-controller driving module after receiving the operation instruction of the computer, so that the sub-controller driving module drives the operation of each light-emitting array, and the main controller module also drives the work of the pronunciation module and the light-emitting module. ;
所述分控制器驱动模块用于接受总控制器模块的指令,控制各个发光阵列的工作;The sub-controller driving module is used for accepting the instructions of the main controller module to control the work of each light-emitting array;
所述发光阵列用于构成背光的发光部分,构成了背光的主体;The light-emitting array is used to form the light-emitting part of the backlight, and constitutes the main body of the backlight;
所述相机用于在电脑的操作下,拍摄需要检测的对象;The camera is used for photographing the object to be detected under the operation of the computer;
所述电脑用于获得相机的拍摄结果,用于分析和保存相机拍摄的照片,用于驱动总控制器模块来改变背光中各个发光阵列的工作,用于记录这些参数以备下次同批产品直接使用,分析各种状态,分析错误可能情况并报警。The computer is used to obtain the shooting results of the camera, to analyze and save the photos taken by the camera, to drive the master controller module to change the work of each light-emitting array in the backlight, and to record these parameters for the next batch of products. Use directly, analyze various states, analyze possible errors and report to the police.
所述电源选用220V的交流电源,并转换成两路5V的模块电源,其中一路是供给发光模块、发音模块、总控制器模块和分控制器驱动模块,另一路用于驱动发光阵列。The power source selects 220V AC power supply, and converts it into two 5V module power sources, one of which is used to supply the light-emitting module, the pronunciation module, the main controller module and the sub-controller drive module, and the other is used to drive the light-emitting array.
所述电源设置有按钮,所述按钮用于控制电源打开和关闭,所述按钮选用轻触自锁的微动开关。The power supply is provided with a button, the button is used to control the power on and off, and the button is a micro-switch with light touch and self-locking.
所述总控制器采用的是STM32F107芯片,分控制器采用的是STM32F103芯片。所述发光阵列选用Risym的5mm高亮白光发光二极管,构成了4*3的发光矩阵,所述发音模块选用蜂鸣器。The main controller adopts STM32F107 chip, and the sub-controller adopts STM32F103 chip. The light-emitting array uses Risym's 5mm high-brightness white light-emitting diodes to form a 4*3 light-emitting matrix, and the sounding module uses a buzzer.
所述相机选用大恒水星MER-1070-10GM/C型1070万像素的工业相机,所述电脑选用戴尔T5810型图形工作站。The camera is a Daheng Mercury MER-1070-10GM/C 10.7-megapixel industrial camera, and the computer is a Dell T5810 graphics workstation.
图3为本发明方法的程序流程示意图,结合附图可见,一种全自动设置成像系统中背光的智能方法,包括如下操作步骤:Fig. 3 is the program flow schematic diagram of the method of the present invention, it can be seen in conjunction with the accompanying drawings that an intelligent method for automatically setting the backlight in the imaging system includes the following operation steps:
步骤1.初始化:电脑发送信息给驱动总控制器模块,来改变背光中各个发光阵列的状态,全部变为最亮值,设置正常工作状态下的目标平均亮度比例设可以容忍的比例误差范围Gert,即理想亮度为设置发光阵列初始修正比例中的其中i代表的是第i次修正迭代,设置最大修正迭代次数imax;Step 1. Initialization: The computer sends information to the drive master controller module to change the state of each light-emitting array in the backlight, all of which become the brightest value, and set the target average brightness ratio under normal working conditions Set the tolerable scale error range Gert, that is, the ideal brightness as Set the initial correction scale of the light-emitting array middle where i represents the ith correction iteration, and sets the maximum number of correction iterations imax;
步骤2.判断背光区域的成像:在没有待检物体,仅有背光的情况下,电脑驱动相机,采集图像,获得图像后,寻找图像中的待检目标区域,即背光区域的成像,背光是由若干个发光阵列构成的,且设计为一个矩形阵列,在步骤1的设置全部发光阵列为最亮值的情况下,如果无法检测到一个矩阵,那么说明该背光硬件出现异常,或者相机出现问题,那么就停止检查,驱动发光模块、发音模块,进行报警工作,进入步骤8;Step 2. Determine the imaging of the backlight area: when there is no object to be inspected and only the backlight, the computer drives the camera, collects the image, and after obtaining the image, finds the target area to be inspected in the image, that is, the imaging of the backlight area, and the backlight is It consists of several light-emitting arrays and is designed as a rectangular array. In the case where all light-emitting arrays are set to the brightest value in step 1, if a matrix cannot be detected, it means that the backlight hardware is abnormal, or the camera has a problem , then stop the inspection, drive the light-emitting module and the sound-emitting module, perform alarm work, and go to step 8;
步骤3.配对图像和发光阵列:在获得一个正确的背光成像图像后,获得背光区域长像素值Him、宽像素值Wim以后,将之与实际的发光阵列一一配对,Step 3. Pairing the image and the light-emitting array: After obtaining a correct backlight imaging image, after obtaining the long pixel value H im and the wide pixel value W im of the backlight area, pair them with the actual light-emitting array one by one,
其原理是,由于已知真实背光下,长方向有mm个发光阵列,宽方向有nn个发光阵列,那么就知道每个发光阵列在图像上显示区域的像素长度Hma、像素宽度Wma,The principle is that, since it is known that under the real backlight, there are mm light-emitting arrays in the long direction and nn light-emitting arrays in the width direction, then the pixel length H ma and the pixel width W ma of the display area of each light-emitting array on the image are known,
即:which is:
Hma=Him/mmH ma = H im /mm
Wma=Wim/nnW ma =W im /nn
这样,就把整个背光区域在图像的显示区域分割成若干个单独的区域,即Im(m,n),其中m代表的是长方向第m个阵列,m=1,…,mm,n代表的是宽方向的第n个阵列,n=1,…,nn,In this way, the entire backlight area is divided into several separate areas in the image display area, namely Im(m, n), where m represents the mth array in the long direction, m=1,...,mm, n represents is the nth array in the width direction, n=1,...,nn,
然后,根据电路设计时的发光阵列排列的顺序,那么就使得每个图像区域Im(m,n)与发光阵列LED(m,n)一一配对起来;Then, according to the order in which the light-emitting arrays are arranged in the circuit design, each image area Im(m, n) is paired with the light-emitting array LED(m, n) one by one;
步骤4.电脑发送信息给总控制器模块,驱动其来改变背光中各个发光阵列LED(m,n)的显示,即目标亮度为 Step 4. The computer sends information to the main controller module, and drives it to change the display of each light-emitting array LED (m, n) in the backlight, that is, the target brightness is
步骤5.采集图像,分析每个图像区域Im(m,n)平均亮度亮度方差S(m,n)、整个图像的平均亮度Gavg,即:
其中,代表的是长方向第m个阵列、宽方向的第n个阵列中的长方向第i个、宽方向第j个像素的像素值,in, Represents the pixel value of the mth array in the length direction, the nth array in the width direction, the ith pixel in the length direction, and the jth pixel in the width direction,
步骤6.每个图像区域Im(m,n)的亮度方差S(m,n),计算出它们的平均值Savg和方差SS,Step 6. Calculate the brightness variance S (m, n) of each image area Im(m, n) , and calculate their average value S avg and variance SS,
由于背光的发光阵列使用时,会产生老化和个别发光二极管损坏,导致不发光,故在此,采用Savg和SS,使用阈值法快速分析出是否有该类型问题出现,When the light-emitting array of the backlight is used, it will cause aging and damage to individual light-emitting diodes, resulting in no light-emitting, so here, using S avg and SS, use the threshold method to quickly analyze whether there is such a type of problem.
如果存在if it exists
Savg≥T(Savg)S avg ≥T(S avg )
那么说明整个背光的有很多区域都有严重的发光不均匀的现象了,需要更换整个背光,进入步骤8,Then it means that many areas of the entire backlight have serious uneven lighting, and the entire backlight needs to be replaced. Go to step 8.
如果存在if it exists
SS≥T(SS)SS≥T(SS)
那么说明背光的个别区域存在严重的与其他区域不同的现象了,需要对该区域的发光阵列进行修理,进入步骤8,Then it means that some areas of the backlight are seriously different from other areas, and the light-emitting array in this area needs to be repaired. Go to step 8.
如果存在以上两种问题中的一个,那么就停止检查,驱动发光模块、发音模块,进行报警工作,如果没有,那么就进入步骤7,进行下一步工作;If there is one of the above two problems, then stop the inspection, drive the light-emitting module and the sound-emitting module, and perform the alarm work; if not, then go to step 7 and proceed to the next step;
步骤7.调整:计算每个图像区域平均亮度与整个图像的平均亮度的区别程度,Step 7. Adjustment: Calculate the difference between the average brightness of each image area and the average brightness of the entire image,
区分出每个图像区域Im(m,n)是否符合误差范围,即|D(m,n)|是否在Gert以内,如果在,那么就不需要调整;如果不在,那么就需要对其进行调整,即:Distinguish whether each image area Im(m, n) conforms to the error range, that is, whether |D(m, n)| is within Gert, if it is, then it does not need to be adjusted; if it is not, then it needs to be adjusted ,which is:
如果存在|D(m,n)|>Gert,那么说明系统还需要进一步修正,If there is |D(m,n)|>Gert, then the system needs to be further revised,
此时,如果存在:At this point, if there is:
i≥imaxi≥imax
那么说明该装置通过imax修正,仍无法正常工作,说明系统出现问题,如果还未达到,那么进入步骤4,Then it means that the device has been corrected by imax and still cannot work normally, which means that there is a problem with the system. If it has not been reached, then go to step 4.
如果所有的那么说明系统一开始就是正常无需调整,可以正常输出了,这也作为整个智能装置出厂时的标准,进入步骤8,if all Then it means that the system is normal at the beginning without adjustment, and can output normally. This is also the standard for the entire smart device when it leaves the factory. Go to step 8.
如果所有的D(m,n)=0,那么说明系统经过调整正常输出了,这也作为整个智能装置正常工作的标准,进入步骤8;If all D(m, n)=0, it means that the system has been adjusted to output normally, which is also used as the standard for the normal operation of the entire smart device, and then go to step 8;
步骤8.结束:Step 8. End:
保存修正值分析系统状态,停止检查,驱动发光模块、发音模块,进行报警工作,并输出以下几种信息之一:save correction value Analyze the system status, stop inspection, drive the light-emitting module and sound module, perform alarm work, and output one of the following information:
(1)出厂正常;(1) The factory is normal;
(2)经修正后工作正常;(2) It works normally after correction;
(3)错误类型:(3) Error type:
·整个背光的很多区域都有严重的发光不均匀的现象了,需要更换整个背光;There are serious uneven lighting in many areas of the entire backlight, and the entire backlight needs to be replaced;
·背光的个别区域存在严重的与其他区域不同的现象了,显示该区域的编号,提醒需要对该区域的发光阵列进行修理,Some areas of the backlight are seriously different from other areas. The number of the area is displayed to remind that the light-emitting array in this area needs to be repaired.
·该装置通过imax修正,仍无法正常工作,说明系统出现问题,·The device is corrected by imax, but still can't work normally, indicating that there is a problem with the system,
无法检测到背光区域,那么说明该背光硬件整体出现异常,或者相机出现问题。If the backlight area cannot be detected, it means that the backlight hardware is abnormal as a whole, or there is a problem with the camera.
本发明方案所公开的技术手段不仅限于上述技术手段所公开的技术手段,还包括由以上技术特征任意组合所组成的技术方案。The technical means disclosed in the solution of the present invention are not limited to the technical means disclosed by the above-mentioned technical means, but also include technical solutions composed of any combination of the above-mentioned technical features.
以上述依据本发明的理想实施例为启示,通过上述的说明内容,相关工作人员完全可以在不偏离本项发明技术思想的范围内,进行多样的变更以及修改。本项发明的技术性范围并不局限于说明书上的内容,必须要根据权利要求范围来确定其技术性范围。Taking the above ideal embodiments according to the present invention as inspiration, and through the above description, relevant personnel can make various changes and modifications without departing from the technical idea of the present invention. The technical scope of the present invention is not limited to the contents in the specification, and the technical scope must be determined according to the scope of the claims.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710357201.0A CN107085344B (en) | 2017-05-19 | 2017-05-19 | Intelligent device and method for fully automatic setting of backlight in imaging system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710357201.0A CN107085344B (en) | 2017-05-19 | 2017-05-19 | Intelligent device and method for fully automatic setting of backlight in imaging system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107085344A CN107085344A (en) | 2017-08-22 |
CN107085344B true CN107085344B (en) | 2020-02-18 |
Family
ID=59608527
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710357201.0A Active CN107085344B (en) | 2017-05-19 | 2017-05-19 | Intelligent device and method for fully automatic setting of backlight in imaging system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107085344B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108761877A (en) * | 2018-05-24 | 2018-11-06 | 京东方科技集团股份有限公司 | Display panel, display device and the control method based on it |
CN110277069B (en) * | 2019-06-27 | 2021-09-14 | 广东海信电子有限公司 | Television screen backlight control method and device and television |
CN114927110B (en) * | 2022-06-27 | 2024-03-15 | 青岛信芯微电子科技股份有限公司 | Backlight control method, display equipment, chip system and medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101541120A (en) * | 2008-03-19 | 2009-09-23 | 牧德科技股份有限公司 | Intelligent LED Lighting System |
CN102411909A (en) * | 2011-12-20 | 2012-04-11 | 彩虹集团公司 | Flatting method of backlight partition of direct type white light LED (Light-emitting Diode) backlight source |
CN204808830U (en) * | 2015-06-26 | 2015-11-25 | 昆山龙腾光电有限公司 | Luminance detection device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6892029B2 (en) * | 2002-06-06 | 2005-05-10 | Olympus Optical Co., Ltd. | Strobe light emitting apparatus and camera |
-
2017
- 2017-05-19 CN CN201710357201.0A patent/CN107085344B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101541120A (en) * | 2008-03-19 | 2009-09-23 | 牧德科技股份有限公司 | Intelligent LED Lighting System |
CN102411909A (en) * | 2011-12-20 | 2012-04-11 | 彩虹集团公司 | Flatting method of backlight partition of direct type white light LED (Light-emitting Diode) backlight source |
CN204808830U (en) * | 2015-06-26 | 2015-11-25 | 昆山龙腾光电有限公司 | Luminance detection device |
Also Published As
Publication number | Publication date |
---|---|
CN107085344A (en) | 2017-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107085344B (en) | Intelligent device and method for fully automatic setting of backlight in imaging system | |
EP3531114B1 (en) | Visual inspection device and illumination condition setting method of visual inspection device | |
US20200202505A1 (en) | Display panel detection method, apparatus and system | |
US8872924B1 (en) | Imaging based auto display grid configuration system and method | |
CN104034516B (en) | Machine vision based LED detection device and detection method thereof | |
TW200534676A (en) | Test system for portable electronic apparatus and test method there of | |
US10169855B2 (en) | Method and device for detecting defects on a display subtrate | |
CN110267031B (en) | Method and system for testing delay time of output image of camera | |
CN104330749A (en) | Front-side-illuminating LED light strip test device and method | |
CN108873399A (en) | A kind of detection method and system of LCD display module backlight luminescence uniformity | |
CN104101614B (en) | A kind of detection method and device | |
CN106102217A (en) | A kind of polychromatic source automatic regulating system being applied to vision-based detection and method | |
TW201824180A (en) | Inspection device, inspection method, and program | |
CN219104709U (en) | Tunnel type mirror-like workpiece surface defect detection system | |
CN104062099A (en) | Testing device and method for LED light strips with side luminance | |
CN105588598A (en) | Automobile instrument automatic detection equipment based on machine vision | |
CN210119209U (en) | An outer diameter detection structure in a bamboo cutting system | |
CN205157729U (en) | Detection apparatus for photosensitive sensor | |
CN104180772A (en) | Visual inspection device | |
CN104658461A (en) | Method for testing light emission uniformity of display | |
CN206421116U (en) | LCD liquid crystal screen detection device | |
CN109946859B (en) | Backlight module detection method and device | |
CN107727664B (en) | Metal plate visual detection acquisition terminal and method | |
KR20110130572A (en) | Block base inspection apparatus of probe unit, and block base inspection method of probe unit using same | |
CN115575399A (en) | Surface defect detection method and surface defect detection system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210806 Address after: 210046 Building 2, No. 1, Kechuang Road, Qixia District, Nanjing City, Jiangsu Province Patentee after: JIANGSU AUSTIN PHOTOELECTRIC TECHNOLOGY Co.,Ltd. Address before: 219 ningliu Road, Nanjing, Jiangsu 210000 Patentee before: NANJING University OF INFORMATION SCIENCE & TECHNOLOGY |