CN101813946B - Automatic object distance adjusting method and device of imaging system - Google Patents
Automatic object distance adjusting method and device of imaging system Download PDFInfo
- Publication number
- CN101813946B CN101813946B CN2009100773827A CN200910077382A CN101813946B CN 101813946 B CN101813946 B CN 101813946B CN 2009100773827 A CN2009100773827 A CN 2009100773827A CN 200910077382 A CN200910077382 A CN 200910077382A CN 101813946 B CN101813946 B CN 101813946B
- Authority
- CN
- China
- Prior art keywords
- testee
- object distance
- pallet
- image
- imaging system
- 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.)
- Expired - Fee Related
Links
- 238000003384 imaging method Methods 0.000 title claims abstract description 46
- 238000000034 method Methods 0.000 title claims abstract description 26
- 230000007246 mechanism Effects 0.000 claims abstract description 26
- 238000003709 image segmentation Methods 0.000 claims abstract description 14
- 230000005540 biological transmission Effects 0.000 claims abstract description 6
- 230000011218 segmentation Effects 0.000 claims description 14
- 238000004891 communication Methods 0.000 claims description 8
- 230000003287 optical effect Effects 0.000 claims description 4
- 230000008859 change Effects 0.000 claims description 3
- 239000003973 paint Substances 0.000 claims description 3
- 230000007613 environmental effect Effects 0.000 claims 1
- 239000004922 lacquer Substances 0.000 claims 1
- 239000000126 substance Substances 0.000 claims 1
- 230000000007 visual effect Effects 0.000 abstract description 4
- 238000013500 data storage Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 14
- 238000004364 calculation method Methods 0.000 description 11
- 230000009467 reduction Effects 0.000 description 11
- 230000008569 process Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 7
- 238000012634 optical imaging Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 6
- 238000012360 testing method Methods 0.000 description 5
- 241000699670 Mus sp. Species 0.000 description 4
- 241000699666 Mus <mouse, genus> Species 0.000 description 3
- 238000003379 elimination reaction Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 238000006073 displacement reaction Methods 0.000 description 2
- 230000008030 elimination Effects 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 230000014759 maintenance of location Effects 0.000 description 2
- 206010002091 Anaesthesia Diseases 0.000 description 1
- IGXWBGJHJZYPQS-SSDOTTSWSA-N D-Luciferin Chemical compound OC(=O)[C@H]1CSC(C=2SC3=CC=C(O)C=C3N=2)=N1 IGXWBGJHJZYPQS-SSDOTTSWSA-N 0.000 description 1
- CYCGRDQQIOGCKX-UHFFFAOYSA-N Dehydro-luciferin Natural products OC(=O)C1=CSC(C=2SC3=CC(O)=CC=C3N=2)=N1 CYCGRDQQIOGCKX-UHFFFAOYSA-N 0.000 description 1
- 101100075747 Drosophila melanogaster Lztr1 gene Proteins 0.000 description 1
- BJGNCJDXODQBOB-UHFFFAOYSA-N Fivefly Luciferin Natural products OC(=O)C1CSC(C=2SC3=CC(O)=CC=C3N=2)=N1 BJGNCJDXODQBOB-UHFFFAOYSA-N 0.000 description 1
- DDWFXDSYGUXRAY-UHFFFAOYSA-N Luciferin Natural products CCc1c(C)c(CC2NC(=O)C(=C2C=C)C)[nH]c1Cc3[nH]c4C(=C5/NC(CC(=O)O)C(C)C5CC(=O)O)CC(=O)c4c3C DDWFXDSYGUXRAY-UHFFFAOYSA-N 0.000 description 1
- 241001465754 Metazoa Species 0.000 description 1
- 230000037005 anaesthesia Effects 0.000 description 1
- 230000003444 anaesthetic effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000003153 chemical reaction reagent Substances 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000011503 in vivo imaging Methods 0.000 description 1
- 238000002789 length control Methods 0.000 description 1
- 230000035484 reaction time Effects 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Landscapes
- Studio Devices (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
技术领域 technical field
本发明涉及到光学成像技术、图像分割处理和自动控制技术领域,特别涉及到光学相机成像的定位计算、对图像的基本分割处理以及自动控制系统技术和由以上技术实现的成像装置使得物距自动调整到图像清晰、可视区域准确的技术领域。The present invention relates to the field of optical imaging technology, image segmentation processing and automatic control technology, in particular to the positioning calculation of optical camera imaging, the basic segmentation processing of images and automatic control system technology and the imaging device realized by the above technology to make the object distance automatic Adjust to a technical field where the image is clear and the viewing area is accurate.
背景技术 Background technique
在传统的为获得小动物中间信息的成像系统中,调节物距来改变视场范围是通过手动来完成的,在手动调节的同时观察相机成像的清晰度,直到合适为止;目前美国caliper life sciences公司的IVIS系统采用的是特定的四种位置来分别对小鼠的头部、一只老鼠、三只老鼠或五只老鼠进行成像。可以参见http://www.brainshark.com/brainshark/vu/view.asp?text=Website&pi=169421910&uid=0&sid=31771436&sky=879491595FF0481789681DE6A5A11D68 2008-11-17日检索。这种方式不能适应不同大小的被测物体的需要,当被测物体大小差异很大时,固定的四个位置将很可能无法满足可视区域的准确选取,当感兴趣区域占可视区域很小一部分时CCD的利用效率会比较低,图像的信噪比也相应降低。因此这种系统受被测物体尺寸大小的严格制约。德国Berthold Technologies公司的NightOWL LB 981 NC 100system的可视区域仅为20cm×20cm的情况,该情况可以同时对四只小鼠进行成像,参见应用笔记Luciferin bioavailability in mice during in-vivoimaging第3页和第4页内容,下载链接为http://www.bertholdtech.com/ww/en/pub/bioanalytik/bioprodgroup/overview/applications/notes.cfm 2008-11-17日检索。另外,通过手动或人的观察来过长时间的物距调节使得到清晰的图像并且得到理想的可视区域会受到被研究的被测物体内化学试剂反应时间和麻醉剂麻醉深度的限制。显然,人为的调节时间很难保证,固定位置的几个视场又不能满足不同尺寸被测物体成像的最佳效果,被测物体所占的区域在可视区域中占很小部分时,关注部位的区域分辨率很低;当可视区域仅仅是被测物体的局部时很可能漏掉被测物体上其它部位的有用信息。In the traditional imaging system for obtaining intermediate information of small animals, adjusting the object distance to change the field of view is done manually, and the clarity of the camera imaging is observed while manually adjusting until it is suitable; currently the US caliper life sciences The company's IVIS system uses four specific positions to image a mouse's head, one mouse, three mice, or five mice. See http://www.brainshark.com/brainshark/vu/view.asp? text=Website&pi=169421910&uid=0&sid=31771436&sky=879491595FF0481789681DE6A5A11D68 Retrieved on 2008-11-17. This method cannot adapt to the needs of measured objects of different sizes. When the size of the measured objects is very different, the fixed four positions may not be able to meet the accurate selection of the visible area. When the area of interest occupies a large part of the visible area When it is a small part, the utilization efficiency of the CCD will be relatively low, and the signal-to-noise ratio of the image will also decrease accordingly. Therefore, this system is strictly limited by the size of the measured object. The viewing area of the NightOWL LB 981 NC 100system from Berthold Technologies in Germany is only 20cm×20cm, which can image four mice at the same time, see the application note Luciferin bioavailability in mice during in-vivoimaging on
发明内容 Contents of the invention
为了解决现有技术的问题,本发明的目的在于提供一种成像系统物距的自动调整的方法和装置。In order to solve the problems in the prior art, the object of the present invention is to provide a method and device for automatically adjusting the object distance of an imaging system.
为实现上述目的,本发明提供了一种成像系统物距自动调整的方法,包括以下步骤:In order to achieve the above object, the present invention provides a method for automatically adjusting the object distance of an imaging system, comprising the following steps:
步骤1:在成像系统物距的调整范围内设置物距和正方形可视区域一一对应的二维数据表,物距的分度根据不同被测物体尺寸的差异来确定,选被测物体最小边长变化的10%至20%作为物距的最小分度。Step 1: Set a two-dimensional data table corresponding to the object distance and the square visible area within the adjustment range of the object distance of the imaging system. 10% to 20% of the change in side length is used as the minimum division of the object distance.
步骤2:选择一个已知远场区域和对应的已知物距的特定位置;Step 2: Select a specific location with a known far-field area and a corresponding known object distance;
步骤3:在该特定位置对被测物体托盘和被测物体的外形进行成像;Step 3: Imaging the tray of the object under test and the shape of the object under test at the specific position;
步骤4:利用该幅物体外形图像进行分割,得到被测物体所占区域正方形边长的像素数,参照已知的CCD相机像元边长计算出图像上被测物体所占区域的正方形边长大小;Step 4: Segment the object shape image to obtain the number of pixels of the square side length of the area occupied by the measured object, and calculate the square side length of the area occupied by the measured object on the image with reference to the known CCD camera pixel side length size;
步骤5:根据已知的物距、CCD相机镜头的焦距以及光学成像理论得到像距和图像的缩小倍数,利用图像上被测物体所占区域的正方形边长大小以及图像的缩小倍数计算出实际被测物体在被测物体托盘上所占的正方形区域的边长尺寸;Step 5: According to the known object distance, the focal length of the CCD camera lens and the optical imaging theory, the image distance and image reduction factor are obtained, and the actual square side length of the area occupied by the measured object on the image and the image reduction factor are used to calculate the actual The side length of the square area occupied by the measured object on the measured object tray;
步骤6:在二维数据表中查得计算得到的实际被测物体可视区域对应的物距距离,将被测物体托盘移动到该物距的位置上,为保证被测物体完全在可视区域内部,设置物距为计算得到的物距再加上该计算得到物距的1%至5%的裕量。Step 6: Check the calculated object distance corresponding to the visible area of the actual measured object in the two-dimensional data table, and move the measured object tray to the position of the object distance, in order to ensure that the measured object is completely visible Inside the area, set the object distance as the calculated object distance plus a margin of 1% to 5% of the calculated object distance.
为实现上述目的,本发明提供一种成像系统物距自动调整的装置,其中包括:In order to achieve the above object, the present invention provides a device for automatic adjustment of the object distance of the imaging system, which includes:
计算机分别与控制单元和CCD相机连接;控制单元与驱动机构4连接,控制单元用于接收计算机发来的控制指令,按照指令对驱动机构4执行指令,完成指令后报告计算机物距调整完成;在被测物体托盘上放置被测物体;被测物体托盘和被测物体位于CCD相机的摄像区域内;驱动机构4与被测物体托盘5连接,用于完成驱动机构4的电机到被测物体托盘5的传动功能。The computer is connected with the control unit and the CCD camera respectively; the control unit is connected with the
本发明的有益效果:本发明的方法和装置可以更快捷地调节最佳的物距,得到清晰的图像并且感兴趣区域全部充满CCD;提高被观测部位成像图像的分辨率和信噪比;节约实验中物距调节的时间。本发明能够快速的在最大可视区域和最小可视区域之间任意自动调节物距,使得自动得到被测物体所占区域的尺寸大小,并计算出最清晰成像的位置,自动调节物距同时对被测物体成像。在被测物体外形成像结束后,可以对荧光区域进行成像并得到发射荧光部位的大小,也可以二次调节物距,单独对荧光区域成像。Beneficial effects of the present invention: the method and device of the present invention can adjust the optimal object distance more quickly, obtain a clear image and the region of interest is completely filled with CCD; improve the resolution and signal-to-noise ratio of the imaging image of the observed part; save The time for object distance adjustment in the experiment. The invention can quickly and automatically adjust the object distance between the maximum visible area and the minimum visible area, so that the size of the area occupied by the measured object can be automatically obtained, and the clearest imaging position can be calculated, and the object distance can be automatically adjusted at the same time. Image the object under test. After the shape imaging of the measured object is completed, the fluorescent area can be imaged and the size of the fluorescent emitting part can be obtained, and the object distance can also be adjusted twice to image the fluorescent area alone.
本发明的其它特点和优点可结合附图从下面通过举例对本发明的原理进行解释的优选实施方式的描述中变得更加清楚。Other features and advantages of the present invention will become apparent from the following description of preferred embodiments, taken in conjunction with the accompanying drawings, to explain the principles of the invention by way of example.
附图说明 Description of drawings
图1是根据本发明的成像系统物距自动调整方法和装置工作过程的流程图。Fig. 1 is a flow chart of the working process of the method and device for automatically adjusting the object distance of the imaging system according to the present invention.
图2是本发明的成像系统物距自动调整装置的结构示意图。FIG. 2 is a structural schematic diagram of the automatic adjustment device for the object distance of the imaging system of the present invention.
图3是控制单元内部的结构框图。Figure 3 is a block diagram of the internal structure of the control unit.
图4计算机中图像分割处理与物距计算框图的相应模块。Fig. 4 The corresponding modules of the block diagram of image segmentation processing and object distance calculation in the computer.
图5是控制单元中的电机驱动电路图。Fig. 5 is a motor drive circuit diagram in the control unit.
图6是不同物距和视场的示意图。Figure 6 is a schematic diagram of different object distances and fields of view.
图7是分割检测的示意图。Fig. 7 is a schematic diagram of segmentation detection.
具体实施方式 Detailed ways
下面结合附图详细说明本发明技术方案中所涉及的各个细节问题。应指出的是,所描述的实施例仅旨在便于对本发明的理解,而对其不起任何限定作用。Various details involved in the technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be pointed out that the described embodiments are only intended to facilitate the understanding of the present invention, rather than limiting it in any way.
图1是根据本发明成像系统物距自动调整方法的流程图和图2是本发明的成像系统物距自动调整装置的结构示意图。其方法步骤包括:FIG. 1 is a flow chart of the method for automatically adjusting the object distance of the imaging system according to the present invention and FIG. 2 is a schematic structural diagram of the device for automatically adjusting the object distance of the imaging system according to the present invention. Its method steps include:
步骤101:在成像系统物距的可调整范围内设置物距和正方形可视区域一一对应的二维数据表,二维数据表的生成是将不同的物距对应唯一的、不同的可视区域,且物距的分度间距可以根据不同被测物体6尺寸的差异来确定;这里选被测物体6最小边长变化的10%或20%来确定。如被测量物体最小边长的差异为10mm,则可以选择物距的分度为1mm或2mm。Step 101: Set a two-dimensional data table corresponding to the object distance and the square visible area within the adjustable range of the imaging system object distance. The generation of the two-dimensional data table is to correspond different object distances to unique and different visual area, and the scale interval of the object distance can be determined according to the difference in size of different measured
步骤102:选择一个已知远场区域和已知物距的特定位置;所述已知远场区域的成像选择是恰好看到整个被测物体托盘5的物距位置,这个物距D0作为已知量并将被测物体托盘5首先移动到这个位置上;在这个位置上捕获一张被测物体托盘5和被测物体6的图像。Step 102: Select a specific position of a known far-field area and a known object distance; the imaging selection of the known far-field area is to just see the object distance position of the entire measured object tray 5, and this object distance D is used as The quantity is known and the measured object tray 5 is first moved to this position; an image of the measured object tray 5 and the measured
步骤103:在该物距为D0的特定位置对被测物体托盘5和被测物体6的外形进行成像。将被测物体6放到被测物体托盘5上以后,自动控制系统(包括图3所示内容)及机械连接结构(图2中驱动机构4和电机驱动丝杠41)驱动被测物体托盘5到指定的物距位置D0,拍摄第一张图像I0。由计算机1对图像I0进行基本的分割处理并根据光学成像技术的计算后可以得到被测物体6所占区域的尺寸大小L0×L0;对分割出来的区域外部的噪声点用图像上每个像元8个相邻位置像素灰度差异进行统计分析,并做剔除和保留的处理。Step 103: Imaging the outlines of the measured object tray 5 and the measured
根据L0×L0的尺寸计算机1可以计算出最佳的物距D1和可视区域大小L1×L1。According to the size of L 0 ×L 0 , the computer 1 can calculate the optimal object distance D 1 and the size of the visible area L 1 ×L 1 .
自动控制系统驱动被测物体托盘5移动到D1位置。根据需要也同样可以对被测物体6上的感兴趣部位调节物距进行相同过程的局部区域成像。The automatic control system drives the measured object tray 5 to move to the D1 position. According to the requirement, the local area imaging of the same process can also be performed on the part of interest on the measured
步骤104:利用被测物体6的该幅物体外形图像进行分割,得到被测物体6所占区域正方形边长的像素数,参照已知的CCD相机2像元边长计算出图像上被测物体6所占区域的正方形边长大小;图像分割时利用漆有黑色无光漆的被测物体托盘5再由CCD相机2的参数和拍摄环境光线决定的合适曝光时间内捕获图像的像素灰度的先验知识来选取分割的阈值;对被测物体6区域外的噪声点的剔除采用像元8个相邻位置像素灰度差异进行统计分析。Step 104: Segment the object shape image of the measured
步骤105:根据已知的物距、CCD相机2的镜头21的焦距以及光学成像理论可以得到像距和图像的缩小倍数,利用图像上被测物体6所占区域的正方形边长大小以及图像的缩小倍数计算出实际被测物体6在被测物体托盘5上所占的正方形区域边长尺寸;所述实际被测物体6所占区域尺寸的计算,是利用光学成像公式和已知的物距和焦距来得到像距和缩小倍数,再根据CCD相机2的像元边长计算出图像上被测物体6所占区域的边长,最后根据缩小倍数来计算出实际被测物体6在被测物体托盘5上所占区域的尺寸。Step 105: According to the known object distance, the focal length of the
步骤106:在二维数据表中查得计算得到的实际被测物体6可视区域对应的物距距离,将被测物体托盘5移动到该物距的位置上,为保证被测物体6完全在可视区域内部,设置物距为计算得到的对应物距再加上该物距的1%至5%的裕量。Step 106: Find the calculated object distance corresponding to the visible area of the actual measured
步骤107:判断是否移动到指定的位置,如果是则执行步骤108,如果否则执行步骤102;Step 107: Judging whether to move to the designated location, if yes, execute
步骤108:则结束。Step 108: then end.
在系统的研制中,为节约成本和使用方便系统中CCD相机2配套使用的一般是定焦镜头,焦距选用50mm,光圈选择大的通光口径的产品,如光圈为1或0.8,这样可以满足生物体微弱荧光在长曝光时间内尽量多的通过光栏。在系统设计中要对驱动机构4的电机驱动丝杠41的行程与CCD相机2在被测物体托盘5上的可视区域之间的关系得到一个一一对应的二维数据表。In the development of the system, in order to save cost and use conveniently, the
间距分度确定后,距离与可视区域大小的对应个数也就随之确定。这里实施例中根据实验的需求,装置的物距最大变化范围是400mm,每变动2mm对应一个可视区域,即一共200个可视区域,这样的精度已经可以满足需要。对应关系如图6所示,在每一台装置中都要先将该对应的二维数据表写入计算机1处理软件的数据存储器13中。驱动机构4的电机驱动丝杠41在最大可视区域和最小可视区域内移动,这样控制单元3发出的每一个控制指令所对应的位置都对应唯一确定的可视区域。流程开始于步骤101,将被测量物体6放入到采集暗箱的被测物体托盘5的中央,关闭暗箱门。根据流程图中步骤102,计算机1发出自动调节物距的指令后,控制单元3将被测物体托盘5移动到远场位置(此时的可视区域为整个被测物体托盘5,同时驱动机构4的电机驱动丝杠41也是最大行程,物距为D0)。此时根据步骤103,在开暗箱内的照明灯的情况下拍被测物体托盘5及被测物体6的外形图像I0,将所得到的图像根据流程中的步骤104,用图像分割处理器11进行阈值分割,具体方法是根据本发明的实施例中使用的CCD相机2对黑色无光漆的被测物体托盘5在暗箱的均匀灯光环境下,曝光时间为1秒的情况下成像的像素灰度值一般在4000至6000之间,而被测物体6为小白鼠时的所获得图像灰度信息在10000至50000之间(CCD相机2为真16位动态范围的情况下),对图像I0进行逐行逐列扫描并按阈值8000进行分割后,最后对得到的分割结果按坐标最外边缘取最大的区域,边长取最长的一边形成的正方形为被测物体6所占的区域。并对被测物体托盘5上的孤立点进行剔除,采用像元周围8个相邻像元灰度差异统计的方法进行剔除,当8个相邻像元差异有5个大于6000时做剔除处理,否则认为是被测物体6区域(这里阈值的选择可以通过不同批次的被测物体6特性获取并保存到分割阈值数据存储器13中)。分割后取一只或几只被测物体6的最长边长所形成的正方形作为被测物体6所占区域,因为在这个区域内可以看到所有的被测物体6的外形,如图6所示。根据流程中的步骤105可以计算出被测物体6区域的尺寸,计算方法是根据在远场位置的已知物距和可视区域,该可视区域为被测物体托盘5的正方形最大尺寸。根据光学成像公式:After the interval division is determined, the corresponding number of the distance and the size of the visible area is determined accordingly. In this embodiment, according to the experimental requirements, the maximum variation range of the object distance of the device is 400mm, and every 2mm variation corresponds to a visible area, that is, a total of 200 visible areas, and such accuracy can already meet the needs. The corresponding relationship is shown in FIG. 6 . In each device, the corresponding two-dimensional data table must first be written into the
在公式(1)中已知焦距f,物距u此时为D0也是已知的。根据公式(1)可以求得像距v,同时用物距u除以像距v也就得到了缩小倍数n0。再根据所分割得到的被测物体6所占区域的正方形图像边长L1V,图像边长L1V是通过分割出来的被测物体6的边长所占的像素数m乘以像元边长a0得到的,即图像边长L1V=m×a0,如公式(2)所示。图像边长L1V乘以缩小倍数n0就得到了被测物体6所占正方形区域的实际边长L1。同时可以用公式(3)来做一次验证,其中L0R为被测物体托盘5的实际边长,L0V为远场情况下所捕获图像中的边长;当用被测物体托盘5的实际尺寸和它的远场图像中的长度、缩小倍数计算得到的尺寸之差在允许的误差范围δ(根据实验调试来确定具体数值,本发明的实施例中取δ为2mm)内时,则认为计算得到的被测物体6所占正方形区域的边长L1是正确的。该过程由计算机程序自动完成。The focal length f is known in the formula (1), and the object distance u is also known as D 0 at this time. The image distance v can be obtained according to the formula (1), and the reduction factor n 0 can be obtained by dividing the object distance u by the image distance v. According to the square image side length L 1V of the area occupied by the measured
L1V=m×a0 (2)L 1V =m×a 0 (2)
|L0R-L0v×n0|≤δ (3)|L 0R -L 0v ×n 0 |≤δ (3)
根据被测物体6所占区域的尺寸大小L1×L1,可以通过查询预先设置好的二维数据表,选择对应的物距距离D1,为保证被测物体6所占的区域完全被CCD相机2拍摄到,计算机1发给控制单元3的物距距离为D1+ΔD,ΔD为物距的裕量,可以选择D1的1%至5%,即4mm至20mm。实施例中为5mm。此时根据流程图中步骤106控制单元3驱动电机将被测物体托盘5移动到物距为D1+ΔD的位置。驱动机构4的电机采用步进电机,在启动加速和减速停止过程通过DSP控制器32输出可变的脉宽调制(PWM)信号来调整。当电机驱动电路图5中的继电器K1中的LED指示灯接通时,被测物体托盘5开始移动,当到达指定的位置时停止运行,指示灯关闭;同时将给DSP控制器32输出一个停止信号,DSP控制器32通过USB通讯接口31发送执行结果,根据图1中的流程107可以判断被测物体托盘5移动到了指定位置,并向计算机1传回被测物体托盘5已到指定位置的指示信号。若没有移动到指定的位置将按流程图重新执行移动的指令过程。According to the size L 1 ×L 1 of the area occupied by the measured
图2是本发明的成像系统物距自动调整装置的结构示意图。整个装置主要由计算机1,CCD相机2、CCD相机2的镜头21、控制单元3,驱动机构4、电机驱动丝杠41及被测物体托盘5、被测物体6组成。计算机1分别与控制单元3和CCD相机2连接;控制单元3与驱动机构4连接,控制单元3用于接收计算机1发来的控制指令,按照指令对驱动机构4执行指令,完成指令后报告计算机1物距调整完成;在被测物体托盘5上放置被测物体6;被测物体托盘5和被测物体6位于CCD相机2的摄像区域内;驱动机构4与被测物体托盘5连接,用于完成驱动机构4的电机到被测物体托盘5的传动功能,所述驱动机构4是以步进电机为动力的电机驱动丝杠41位移机构,用于推动被测物体托盘5向上移动或推动被测物体托盘5向下移动。FIG. 2 is a structural schematic diagram of the automatic adjustment device for the object distance of the imaging system of the present invention. The whole device is mainly composed of a computer 1, a
计算机1中的模块包括:图像分割处理器11、计算处理器12和数据存储器13,集成到成像系统物距自动调整装置的软件环境中。图像分割处理器11,用于对被测物体6在被测物体托盘5上所占区域的分割,所述图像分割处理器11是利用具有先验知识的分割阈值,对被测物体托盘5上的被测物体6区域进行分割,同时对被测物体托盘5上的噪声点利用像元相邻区域的统计差异进行判断,并做相应的保留或剔除;计算处理器12,完成对可视区域和物距的计算;数据存储器13,用于存储二维数据表和先验知识阈值,并对二维数据表和先验知识阈值进行更新。所述的数据存储器13是在装置调试期间写入需要的物距和可视区域相对应的二维数据表,以及需要的先验的分割阈值,该数据存储器13能够更新存储的数据,也能够增加需要扩展的内容。所述物距和可视区域计算处理器12,是利用光学成像公式和已知的物距和焦距来得到像距和缩小倍数,再根据CCD相机2的像元边长计算出图像上被测物体6所占区域的边长,并根据缩小倍数来计算出实际被测物体6在被测物体托盘5上所占区域的尺寸,这里取最长的边长作为被测物体6所占区域正方形的边长。The modules in the computer 1 include: an image segmentation processor 11, a calculation processor 12 and a
计算机1上的控制软件可以向控制单元3发出自动调整的指令,调整好后控制软件会显示物距自动调整成功,可以进行成像。计算机1和CCD相机2之间可以进行数据的传输,增益的调节和传输速率的设置。控制单元3可以对CCD相机2扩展镜头的控制功能,在本发明的实施例中没有加镜头焦距控制,但添加了拍摄距离的电机驱动调节。但这部分不是本发明的重点,因此这里不做详细说明。The control software on the computer 1 can send an automatic adjustment command to the
图3是控制单元3内部的结构框图。主要包括控制器32、USB通讯接口31、电机驱动电路33以及电源模块34等主要组成部分。该结构框图也给出了几个组成结构的信号流向关系。所述控制单元3:具有一个核心DSP控制器32;具有一个USB通讯接口31与核心DSP控制器32连接,用来实现与计算机1的通讯;具有电机驱动电路33与核心DSP控制器32连接,用于核心DSP控制器32通过电机驱动电路33对电机发出控制指令;电机驱动电路33是基于脉宽调制的电机控制电路;具有电源模块与USB通讯接口31、核心DSP控制器32和电机驱动电路33连接。FIG. 3 is a block diagram of the internal structure of the
图4是根据本人发明的成像系统物距自动调整装置的计算机1中图像分割和物距等计算的处理框图。如图4,标号11表示图像分割处理器,标号12表示计算处理器,标号13表示数据存储器。图像分割处理器11根据数据存储器13中预先存放的阈值对被测物体6和被测物体托盘5进行分割;计算处理器12通过数据存储器13中预先调试时存入的二维数据表可以计算出实际被测物体6大小的可视区域所对应的物距大小,从而可以驱动电机使其将被测物体托盘5移动到指定的位置。所述二维数据表的生成是将不同的物距对应唯一的、不同的可视区域,且物距的分度根据不同被测物体6尺寸的差异来确定;这里选被测物体6最小边长变化的10%或20%来确定。本实施例中被测物体6最小边长的差异约为10mm,则可以选择物距的分度为1mm或2mm;再通过查找二维数据表就找到了可视区域对应的物距,被测物体托盘5移动的距离由该对应的物距再加上该物距的1%或5%的裕量。Fig. 4 is a processing block diagram of image segmentation and object distance calculation in the computer 1 of the imaging system object distance automatic adjustment device according to my invention. As shown in Fig. 4, reference numeral 11 represents an image segmentation processor, reference numeral 12 represents a calculation processor, and
图5是控制单元3中的电机驱动电路33结构示意图。上半部分主要是调制电路,N1是用模拟开关对输入的DJ_PWM信号进行调制,所得到的信号再经过仪表放大器N2和功率放大器后驱动电机。继电器K1对电机的运转和停止进行控制,DSP控制器发出的对继电器K1的控制信号DJ_CON通过三极管对继电器的电磁线圈进行控制。实验表明电机的控制精度可以满足位移误差小于1mm的要求。图5中所需的+2.5V和-2.5V以及+15V和-15V电源由图3中的电源模块34提供。FIG. 5 is a schematic structural diagram of the motor drive circuit 33 in the
图6是不同物距和视场的示意图。从图1的分析中我们已经清楚了图6中不同的物距距离所一一对应的视场区域,由图6可以看到,物距D0对应可视区域L0×L0,物距D1对应可视区域L1×L1,而物距Di对应可视区域Li×Li。其中i可以为1至200中的任意一个确定的数字。Figure 6 is a schematic diagram of different object distances and fields of view. From the analysis in Figure 1, we have already known the field of view areas corresponding to different object distances in Figure 6. From Figure 6, we can see that the object distance D 0 corresponds to the visible area L 0 ×L 0 , and the object distance D 1 corresponds to the visible area L 1 ×L 1 , and the object distance D i corresponds to the visible area L i ×L i . Wherein i can be any certain number from 1 to 200.
图7是分割检测的示意图。在图1的流程图中已经阐述了在远场即最大的物距距离上时被测物体托盘5边缘的长度L0和分割得到的被测物体6所占区域正方形的边长L1。Fig. 7 is a schematic diagram of segmentation detection. In the flow chart of FIG. 1 , the length L 0 of the edge of the tray 5 of the measured object and the side length L 1 of the square area occupied by the measured
以上所述,仅为本发明中的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉该技术的人在本发明所揭露的技术范围内,可理解想到的变换或替换,都应涵盖在本发明的包含范围之内,因此,本发明的保护范围应该以权利要求书的保护范围为准。The above is only a specific implementation mode in the present invention, but the scope of protection of the present invention is not limited thereto. Anyone familiar with the technology can understand the conceivable transformation or replacement within the technical scope disclosed in the present invention. All should be covered within the scope of the present invention, therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2009100773827A CN101813946B (en) | 2009-02-19 | 2009-02-19 | Automatic object distance adjusting method and device of imaging system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2009100773827A CN101813946B (en) | 2009-02-19 | 2009-02-19 | Automatic object distance adjusting method and device of imaging system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN101813946A CN101813946A (en) | 2010-08-25 |
| CN101813946B true CN101813946B (en) | 2011-11-16 |
Family
ID=42621221
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2009100773827A Expired - Fee Related CN101813946B (en) | 2009-02-19 | 2009-02-19 | Automatic object distance adjusting method and device of imaging system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN101813946B (en) |
Families Citing this family (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6021466B2 (en) * | 2012-06-26 | 2016-11-09 | ソニーセミコンダクタソリューションズ株式会社 | Solid-state imaging device, driving method, and electronic apparatus |
| CN106373156A (en) | 2015-07-20 | 2017-02-01 | 小米科技有限责任公司 | Method and apparatus for determining spatial parameter by image and terminal device |
| CN105589495B (en) * | 2016-03-25 | 2017-10-20 | 苏州昇特智能科技有限公司 | The control method of multi-function clip |
| CN106292003B (en) * | 2016-08-16 | 2019-08-16 | 凌云光技术集团有限责任公司 | A kind of automatic adjusting method for optical detection LCD screen, apparatus and system |
| CN109960669A (en) * | 2017-12-26 | 2019-07-02 | 金洁 | Computer management system |
| CN108572178A (en) * | 2018-04-10 | 2018-09-25 | 苏州久越金属科技有限公司 | A kind of high-accuracy high stability detection method |
| CN109087354A (en) * | 2018-08-29 | 2018-12-25 | 浙江霖研精密科技有限公司 | A kind of position algorithm of the best object distance of automatic search and image distance |
| CN112040122B (en) * | 2020-08-24 | 2025-03-28 | 珠海得尔塔科技有限公司 | Method, medium and electronic device for calculating shrinkage compensation amount of camera module |
| WO2025230377A1 (en) * | 2024-04-29 | 2025-11-06 | 주식회사 오로스테크놀로지 | System and method for measuring alignment error |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4123695A (en) * | 1974-10-04 | 1978-10-31 | U.S. Philips Corporation | Pattern recognition system |
| JP2000293687A (en) * | 1999-02-02 | 2000-10-20 | Minolta Co Ltd | Three-dimensional shape data processor and three- dimensional shape data processing method |
| US6151406A (en) * | 1997-10-09 | 2000-11-21 | Cognex Corporation | Method and apparatus for locating ball grid array packages from two-dimensional image data |
| CN101154264A (en) * | 2006-09-27 | 2008-04-02 | 中国科学院自动化研究所 | Large depth of field iris image acquisition system and method based on multiple fixed-focus cameras |
| CN101551237A (en) * | 2009-05-20 | 2009-10-07 | 大庆油田有限责任公司 | Imaging mechanism used in photoelectric detector of oil tube external thread |
-
2009
- 2009-02-19 CN CN2009100773827A patent/CN101813946B/en not_active Expired - Fee Related
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4123695A (en) * | 1974-10-04 | 1978-10-31 | U.S. Philips Corporation | Pattern recognition system |
| US6151406A (en) * | 1997-10-09 | 2000-11-21 | Cognex Corporation | Method and apparatus for locating ball grid array packages from two-dimensional image data |
| JP2000293687A (en) * | 1999-02-02 | 2000-10-20 | Minolta Co Ltd | Three-dimensional shape data processor and three- dimensional shape data processing method |
| CN101154264A (en) * | 2006-09-27 | 2008-04-02 | 中国科学院自动化研究所 | Large depth of field iris image acquisition system and method based on multiple fixed-focus cameras |
| CN101551237A (en) * | 2009-05-20 | 2009-10-07 | 大庆油田有限责任公司 | Imaging mechanism used in photoelectric detector of oil tube external thread |
Non-Patent Citations (2)
| Title |
|---|
| 张逊等.自动卡片指纹识别系统的设计与实现.《计算机应用》.2004,第24卷(第9期),31-33. * |
| 杨加等.几种图像分割算法在CT图像分割上的实现和比较.《北京理工大学学报》.2000,第20卷(第6期),720-724. * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN101813946A (en) | 2010-08-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101813946B (en) | Automatic object distance adjusting method and device of imaging system | |
| CN201534392U (en) | High-precision detection system of tablet stamping equipment | |
| WO2020088076A1 (en) | Image labeling method, device, and system | |
| US20230326054A1 (en) | Information processing device, information processing method, and program | |
| EP3486837A1 (en) | Method of identifying vehicle, apparatus, inspection system and electronic device using the same, and storage of the same | |
| CN108764257A (en) | A kind of pointer instrument recognition methods of various visual angles | |
| CN109613543A (en) | Method and device for correcting laser point cloud data, storage medium and electronic equipment | |
| CN111860072A (en) | Parking control method, device, computer device, and computer-readable storage medium | |
| CN111372005B (en) | Automatic exposure compensation method and system for TOF camera module | |
| CN108898634A (en) | Pinpoint method is carried out to embroidery machine target pinprick based on binocular camera parallax | |
| CN101919685A (en) | A tongue diagnosis intelligent control and diagnosis system and its diagnosis method | |
| US20180024049A1 (en) | Method and device for performing colorimetric analysis of a test fluid to evaluate physiological parameters | |
| EP3672223A1 (en) | Data processing method, apparatus, electronic device, and computer-readable storage medium | |
| WO2022163002A1 (en) | Imaging condition setting system, imaging condition setting method, and program | |
| CN112037150A (en) | Hole repairing model training and repairing method, device and system | |
| CN110345886A (en) | A kind of plant embryos surface area measurement device and method | |
| CN105466889A (en) | An acquisition method for surface illuminance of a complex organization in spatial frequency domain imaging | |
| CN115994954A (en) | A calibration device and calibration method for a high-precision large-field-of-view near-infrared optical camera | |
| Yilmaz et al. | FahamecV1: A Low Cost Automated Metaphase Detection System. | |
| CN106413280B (en) | Automatic correction device and automatic correction method for component position of placement machine feeder | |
| CN110260889A (en) | Automatic verification device and verification method for a handheld distance meter | |
| CN116736259B (en) | A method and device for calibrating laser point cloud coordinates for automatic tower crane driving | |
| Deng et al. | Automatic vison-based volume estimation of dump loading for real-time earthwork productivity assessment | |
| CN117858297B (en) | Distance induction control method based on controllable LED array | |
| CN117409278A (en) | Training methods, devices and electronic equipment for two-dimensional position labeling models |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20111116 Termination date: 20210219 |