JP2020046381A - Measuring apparatus, laser marking device and measuring method - Google Patents

Measuring apparatus, laser marking device and measuring method Download PDF

Info

Publication number
JP2020046381A
JP2020046381A JP2018176895A JP2018176895A JP2020046381A JP 2020046381 A JP2020046381 A JP 2020046381A JP 2018176895 A JP2018176895 A JP 2018176895A JP 2018176895 A JP2018176895 A JP 2018176895A JP 2020046381 A JP2020046381 A JP 2020046381A
Authority
JP
Japan
Prior art keywords
image
unit
imaging
partial image
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2018176895A
Other languages
Japanese (ja)
Inventor
宮田 悟
Satoru Miyata
悟 宮田
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.)
Nidec Copal Corp
Original Assignee
Nidec Copal Corp
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 Nidec Copal Corp filed Critical Nidec Copal Corp
Priority to JP2018176895A priority Critical patent/JP2020046381A/en
Publication of JP2020046381A publication Critical patent/JP2020046381A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Laser Beam Processing (AREA)
  • Image Analysis (AREA)

Abstract

To accurately measure a position of a target while reducing data volume of image processing.SOLUTION: A measuring apparatus includes: a first irradiation section for irradiating a target with a first laser beam: an imaging section for imaging a first luminescent spot to be a luminescent spot of the first laser beam on the target and generating a first image including the first luminescent spot; a first imaging setting section for performing first imaging setting so that a pixel value of a first target pixel to be a pixel satisfying a predetermined condition out of a plurality of pixels constituting the first luminescent spot is included in a predetermined range; a region setting section for setting a first region including the first luminescent spot in a part of a first set image on the basis of the first target pixel included in the first set image to be the first image to which the first imaging setting is applied; a processing section for processing a first partial image to be the first image included in the first region; and a measurement section for measuring a position of the target on the basis of the processed first partial image.SELECTED DRAWING: Figure 1

Description

本発明の一態様は、レーザ光を用いて対象物の位置を測定する測定装置などに関する。   One embodiment of the present invention relates to a measurement device or the like for measuring a position of an object using laser light.

レーザ光を用いて物体の高さなどを測定する方法がある。このような測定方法は、たとえば特許文献1及び2などに開示されている。   There is a method of measuring the height or the like of an object using laser light. Such a measuring method is disclosed, for example, in Patent Documents 1 and 2.

特開2016−36841号公報JP 2016-36841 A 特開2014−134475号公報JP 2014-134475 A

特許文献1に記載のレーザマーカでは、レーザマーカの筐体下面とワークの印字すべき面との間の距離であるワーキングディスタンスが測定される。詳細には、ワークの表面に向けてポインタ光が出射され、ワーク表面に生成された輝点がポインタ光と異なる方向から撮像される。撮像した画像における輝点の位置がワーキングディスタンスに応じて変化するため、三角測量の原理を用いて、画像における輝点の位置に基づきワーキングディスタンスが求められる。   In the laser marker described in Patent Literature 1, a working distance, which is the distance between the lower surface of the housing of the laser marker and the surface of the work to be printed, is measured. Specifically, the pointer light is emitted toward the surface of the work, and the bright spot generated on the surface of the work is imaged from a direction different from that of the pointer light. Since the position of the bright spot in the captured image changes according to the working distance, the working distance is obtained based on the position of the bright spot in the image using the principle of triangulation.

ワーキングディスタンスなどの測定対象の測定精度を向上させるには、画像における輝点の位置測定の精度向上が求められる。しかしながら、レーザ光の反射率は、ワークの材質に応じて変化することが多く、このような場合、輝点の明るさがワークの材質に応じて変化し、位置の検出誤差が増大することがある。このため、輝点の明るさの変化に基づく測定誤差を抑制することを目的とし、画像処理または撮像設定の調整などが行われる。しかしながら、画像処理は、処理負荷が大きく、処理時間も長くなるため、画像処理のデータ量を削減することが求められる。   In order to improve the measurement accuracy of a measurement target such as a working distance, it is required to improve the measurement accuracy of the position of a bright spot in an image. However, the reflectivity of laser light often changes according to the material of the work, and in such a case, the brightness of the luminescent spot changes according to the material of the work, and the position detection error may increase. is there. Therefore, for the purpose of suppressing the measurement error based on the change in the brightness of the bright spot, image processing or adjustment of the imaging setting is performed. However, image processing has a large processing load and a long processing time, and thus it is required to reduce the data amount of the image processing.

本発明は、上記の課題などを解決するために次のような手段を採る。なお、以下の説明において、発明の理解を容易にするために図面中の符号等を括弧書きで付記するが、本発明の各構成要素はこれらの付記したものに限定されるものではなく、当業者が技術的に理解しうる範囲にまで広く解釈されるべきものである。   The present invention employs the following means in order to solve the above-described problems and the like. In the following description, reference numerals and the like in the drawings are added in parentheses to facilitate understanding of the invention, but each component of the present invention is not limited to these additions, and the present invention is not limited thereto. It should be widely interpreted to a technically understandable range by a trader.

本発明の一の手段は、
第1のレーザ光(LA)を対象物(33)に照射する第1の照射部(11A)と、
前記対象物における前記第1のレーザ光の輝点である第1の輝点(SA)を撮像し、前記第1の輝点を含む第1の画像(IA)を生成する撮像部(12)と、
前記第1の輝点を構成する複数の画素のうち所定の条件(CMA)を満たす画素である第1の対象画素(PEA)の画素値が所定の範囲(MaxA)に含まれるように第1の撮像設定を行う第1の撮像設定部(21)と、
前記第1の撮像設定が行われた前記第1の画像に含まれる前記第1の対象画素に基づき、前記第1の画像の一部を含む領域であって前記第1の輝点を含む第1の領域(RA)を設定する領域設定部(22)と、
前記第1の領域に含まれる画像である第1の部分画像(PIA)を処理する処理部(24)と、
処理後の前記第1の部分画像に基づき、前記対象物の位置を測定する測定部(25)と、を備える、
測定装置(1)である。
One means of the present invention is:
A first irradiator (11A) for irradiating the object (33) with the first laser beam (LA);
An imaging unit configured to capture an image of a first luminescent spot (SA) that is a luminescent spot of the first laser light on the object and generate a first image (IA) including the first luminescent spot; When,
The first target pixel (PEA), which is a pixel satisfying a predetermined condition (CMA), among a plurality of pixels constituting the first luminescent spot, is included in a first range (MaxA) so as to be included in the first range. A first imaging setting unit (21) configured to perform imaging setting of:
A region including a part of the first image and including the first luminescent spot, based on the first target pixel included in the first image on which the first imaging setting is performed; An area setting unit (22) for setting one area (RA);
A processing unit (24) that processes a first partial image (PIA) that is an image included in the first area;
A measurement unit (25) that measures the position of the object based on the processed first partial image.
It is a measuring device (1).

上記構成の測定装置によれば、たとえば最も大きい画素値を有する第1の対象画素の画素値が所定の範囲に含まれるように第1の撮像設定が行われることで、画像における第1の輝点を構成する複数の画素の画素値を一定の範囲内に収めることができる。これにより、対象物の材質が変化して第1の輝点の明るさが変化する場合においても、画像において第1の輝点のイメージを良好に描画することができるので、第1の領域を適切に設定することができる。そして、第1の領域に含まれる第1の部分画像が処理部において処理されることで、画像処理のデータ量を削減することができるので、処理負荷を低減し、処理時間を短くすることができる。また、たとえば、画像における輝点の位置を精度よく測定するための画像処理を第1の部分画像に対して行うことで、画像における第1の輝点の位置を精度よく測定することができる。これにより、対象物の位置の測定精度を向上させることができる。   According to the measuring device having the above-described configuration, for example, the first imaging setting is performed such that the pixel value of the first target pixel having the largest pixel value is included in the predetermined range. Pixel values of a plurality of pixels forming a point can be kept within a certain range. With this, even when the material of the target object changes and the brightness of the first luminescent spot changes, the image of the first luminescent spot can be drawn well in the image. Can be set appropriately. Since the first partial image included in the first area is processed by the processing unit, the data amount of the image processing can be reduced, so that the processing load can be reduced and the processing time can be shortened. it can. Further, for example, by performing image processing for accurately measuring the position of a bright spot in an image on the first partial image, the position of the first bright spot in the image can be accurately measured. Thereby, the measurement accuracy of the position of the object can be improved.

上記測定装置において、好ましくは、
前記撮像部は、前記第1の輝点を撮像して前記第1の部分画像を生成し、
前記第1の部分画像に含まれる画素の画素値の統計値が所定の範囲(AveA)に含まれるように第2の撮像設定を行う第2の撮像設定部(23)をさらに備え、
前記処理部は、前記第2の撮像設定が行われた前記第1の部分画像を処理する。
In the above measuring device, preferably,
The imaging unit captures the first luminescent spot to generate the first partial image,
A second imaging setting unit (23) configured to perform a second imaging setting such that a statistical value of a pixel value of a pixel included in the first partial image is included in a predetermined range (AveA);
The processing unit processes the first partial image on which the second imaging setting has been performed.

上記構成の測定装置によれば、たとえば、撮像部の撮像範囲を第1の領域に対応する範囲に縮小することができるので、撮像部における第1の部分画像の生成に要する時間を短縮することができる。また、第1の部分画像に含まれる画素の画素値の統計値が所定の範囲に含まれるように第2の撮像設定が行われることで、第1の部分画像における第1の輝点の輪郭部分を良好に描画することができる。これにより、たとえば、対象物の材質が変化して第1の輝点の明るさが変化する場合においても、第1の部分画像における第1の輝点のイメージの形状のばらつきを抑制することができる。   According to the measuring device having the above configuration, for example, the imaging range of the imaging unit can be reduced to a range corresponding to the first region, so that the time required for generating the first partial image in the imaging unit is reduced. Can be. Further, the second imaging setting is performed so that the statistic of the pixel value of the pixel included in the first partial image is included in a predetermined range, so that the outline of the first luminescent spot in the first partial image is obtained. The portion can be drawn well. Thereby, for example, even when the material of the target object changes and the brightness of the first bright spot changes, it is possible to suppress the variation in the shape of the image of the first bright spot in the first partial image. it can.

上記測定装置において、好ましくは、
前記測定部は、前記処理後の前記第1の部分画像に含まれる画素の重心の位置(CA)に基づき、前記対象物の位置を測定する。
In the above measuring device, preferably,
The measurement unit measures the position of the object based on the position (CA) of the center of gravity of the pixel included in the processed first partial image.

上記構成の測定装置によれば、第1の部分画像における第1の輝点の周辺に位置する小さい画素値を有する画素は、重心の位置にほとんど影響を与えないので、第1の輝点を構成する複数の画素の画素値の分布に基づき重心の位置を決定することができる。これにより、たとえば、第1の輝点のイメージが第1の部分画像の中心からずれた場合においても、第1の輝点の位置を正しく算出することができるので、対象物の位置の測定精度を向上させることができる。   According to the measuring device having the above configuration, the pixel having a small pixel value located around the first luminescent point in the first partial image has almost no influence on the position of the center of gravity. The position of the center of gravity can be determined based on the distribution of the pixel values of the constituent pixels. Thereby, for example, even when the image of the first luminescent spot is deviated from the center of the first partial image, the position of the first luminescent spot can be correctly calculated. Can be improved.

上記測定装置において、好ましくは、
前記所定の条件は、検知範囲における最大の画素値を有することである。
In the above measuring device, preferably,
The predetermined condition is to have a maximum pixel value in the detection range.

上記構成の測定装置によれば、画像における第1の輝点を構成する複数の画素の画素値の最大値を所定の範囲内に収めることができるので、画素値の上限値に達した画素の発生を抑制することができる。   According to the measuring device having the above configuration, the maximum value of the pixel values of the plurality of pixels constituting the first bright spot in the image can be kept within a predetermined range. Generation can be suppressed.

上記測定装置において、好ましくは、
前記処理部は、前記第1の部分画像に対して2値化処理、収縮処理及び膨張処理の少なくともいずれか1つを行う。
In the above measuring device, preferably,
The processing unit performs at least one of a binarization process, a contraction process, and an expansion process on the first partial image.

上記構成の測定装置によれば、画像における輝点の位置を精度よく測定するための画像処理を行うことで、たとえば、レーザ光のノイズ、及び対象物の材質によって変化する輝点の形状などに基づく、重心の位置の算出誤差を抑制することができる。   According to the measuring device having the above configuration, by performing image processing for accurately measuring the position of the bright spot in the image, for example, noise of laser light, and the shape of the bright spot that changes depending on the material of the target object, etc. The calculation error of the position of the center of gravity based on this can be suppressed.

上記測定装置において、好ましくは、
前記第1の撮像設定は、前記撮像部における露光時間を設定することである。
In the above measuring device, preferably,
The first imaging setting is to set an exposure time in the imaging unit.

上記構成の測定装置によれば、たとえば、第1のレーザ光の強度の調整、または第1のレーザ光へのフィルタ挿入などと比べて、第1の対象画素の画素値を所定の範囲に含める第1の撮像設定を簡易に実現することができる。   According to the measuring device having the above configuration, for example, the pixel value of the first target pixel is included in the predetermined range as compared with the case where the intensity of the first laser light is adjusted or the filter is inserted into the first laser light. The first imaging setting can be easily realized.

上記測定装置において、好ましくは、
前記第2の撮像設定は、前記撮像部における露光時間を設定することである。
In the above measuring device, preferably,
The second imaging setting is to set an exposure time in the imaging unit.

上記構成の測定装置によれば、たとえば、第1のレーザ光の強度の調整、または第1のレーザ光へのフィルタ挿入などと比べて、第1の部分画像に含まれる画素の画素値の統計値を所定の範囲に含める第2の撮像設定を簡易に実現することができる。   According to the measuring device having the above-described configuration, for example, compared with adjustment of the intensity of the first laser light, insertion of a filter into the first laser light, or the like, statistics of the pixel values of the pixels included in the first partial image are obtained. The second imaging setting in which the value is included in the predetermined range can be easily realized.

上記測定装置において、好ましくは、
第2のレーザ光(LB)を前記対象物に照射する第2の照射部(11B)をさらに備え、
前記撮像部は、前記対象物における前記第2のレーザ光の輝点である第2の輝点(SB)を撮像し、前記第2の輝点を含む第2の画像(IB)をさらに生成し、
前記第1の撮像設定部は、前記第2の輝点を構成する複数の画素のうち所定の条件(CMB)を満たす画素である第2の対象画素(PEB)の画素値が所定の範囲(MaxB)に含まれるように第3の撮像設定をさらに行い、
前記領域設定部は、前記第3の撮像設定が行われた前記第2の画像に含まれる前記第2の対象画素に基づき、前記第2の画像の一部を含む領域であって前記第2の輝点を含む第2の領域(RB)をさらに設定し、
前記処理部は、前記第2の領域に含まれる画像である第2の部分画像(PIB)をさらに処理し、
前記測定部は、前記処理後の前記第1の部分画像及び処理後の前記第2の部分画像に基づき、前記対象物の位置を測定する。
In the above measuring device, preferably,
A second irradiation unit (11B) that irradiates the object with a second laser beam (LB);
The imaging unit captures a second bright spot (SB), which is a bright spot of the second laser light, on the object, and further generates a second image (IB) including the second bright spot. And
The first imaging setting unit sets a pixel value of a second target pixel (PEB), which is a pixel satisfying a predetermined condition (CMB), among a plurality of pixels forming the second bright spot in a predetermined range ( Max B) is further set so as to be included in MaxB).
The area setting unit is an area including a part of the second image based on the second target pixel included in the second image on which the third imaging setting is performed, and And further setting a second region (RB) including a bright spot of
The processing unit further processes a second partial image (PIB) that is an image included in the second area,
The measuring unit measures the position of the object based on the processed first partial image and the processed second partial image.

上記構成の測定装置によれば、たとえば、第1の輝点近傍のレーザ光の反射率と第2の輝点近傍のレーザ光の反射率とが異なる場合においても、画像における第1の輝点の位置、及び画像における第2の輝点の位置の両方を精度よく測定することができる。これにより、たとえば、2つのレーザ光を対象物に照射し、画像における第1の輝点と第2の輝点との間の距離に基づき対象物の位置を測定する構成において、対象物の位置の測定精度を向上させることができる。   According to the measuring device having the above configuration, for example, even when the reflectance of the laser light near the first luminescent spot is different from the reflectance of the laser light near the second luminescent spot, the first luminescent spot in the image is different. And the position of the second bright spot in the image can be measured with high accuracy. Thus, for example, in a configuration in which two laser beams are irradiated on the object and the position of the object is measured based on the distance between the first luminescent spot and the second luminescent spot in the image, the position of the object is determined. Measurement accuracy can be improved.

また、本発明の別の手段は、
上記いずれかの測定装置(1)と、
前記測定装置によって測定された結果に基づき、対象物にレーザマーキングを行うマーキング部(32)と、を備える、
レーザマーキング装置である。
Another means of the present invention is:
Any one of the above measuring devices (1);
A marking unit (32) for performing laser marking on the target object based on the result measured by the measurement device,
It is a laser marking device.

上記構成のレーザマーキング装置によれば、たとえば最も大きい画素値を有する第1の対象画素の画素値が所定の範囲に含まれるように第1の撮像設定が行われることで、画像における第1の輝点を構成する複数の画素の画素値を一定の範囲内に収めることができる。これにより、対象物の材質が変化して第1の輝点の明るさが変化する場合においても、画像において第1の輝点のイメージを良好に描画することができるので、第1の領域を適切に設定することができる。そして、第1の領域に含まれる第1の部分画像が処理部において処理されることで、画像処理のデータ量を削減することができるので、処理負荷を低減し、処理時間を短くすることができる。また、たとえば、画像における輝点の位置を精度よく測定するための画像処理を第1の部分画像に対して行うことで、画像における第1の輝点の位置を精度よく測定することができる。これにより、対象物の位置の測定精度を向上させることができるので、たとえば、対象物に段差が設けられている場合においても、測定結果に基づきレーザマーキング用のレーザ光の集光位置を正しく調整し、良好なマーキングパターンを形成することができる。   According to the laser marking device having the above configuration, for example, the first imaging setting is performed such that the pixel value of the first target pixel having the largest pixel value is included in the predetermined range. The pixel values of a plurality of pixels forming the bright spot can be kept within a certain range. With this, even when the material of the target object changes and the brightness of the first luminescent spot changes, the image of the first luminescent spot can be drawn well in the image. Can be set appropriately. Since the first partial image included in the first area is processed by the processing unit, the data amount of the image processing can be reduced, so that the processing load can be reduced and the processing time can be shortened. it can. Further, for example, by performing image processing for accurately measuring the position of a bright spot in an image on the first partial image, the position of the first bright spot in the image can be accurately measured. As a result, the measurement accuracy of the position of the target object can be improved. For example, even when the target object has a step, the focusing position of the laser beam for laser marking is correctly adjusted based on the measurement result. Thus, a good marking pattern can be formed.

また、本発明の別の手段は、
第1のレーザ光を対象物に照射する第1の照射部を備える測定装置における測定方法であって、
前記対象物における前記第1のレーザ光の輝点である第1の輝点を撮像し、前記第1の輝点を含む第1の画像を生成するステップと、
前記第1の輝点を構成する複数の画素のうち所定の条件を満たす画素である第1の対象画素の画素値が所定の範囲に含まれるように第1の撮像設定を行うステップと、
前記第1の撮像設定が行われた前記第1の画像に含まれる前記第1の対象画素に基づき、前記第1の画像の一部を含む領域であって前記第1の輝点を含む第1の領域を設定するステップと、
前記第1の領域に含まれる画像である第1の部分画像を処理するステップと、
処理後の前記第1の部分画像に基づき、前記対象物の位置を測定するステップと、を有する、
測定方法である。
Another means of the present invention is:
A measurement method in a measurement device including a first irradiation unit that irradiates a first laser beam to an object,
Imaging a first luminescent spot, which is a luminescent spot of the first laser light, on the object, and generating a first image including the first luminescent spot;
Performing a first imaging setting so that a pixel value of a first target pixel that is a pixel satisfying a predetermined condition among a plurality of pixels forming the first bright spot is included in a predetermined range;
A region including a part of the first image and including the first luminescent spot, based on the first target pixel included in the first image on which the first imaging setting is performed; Setting an area 1;
Processing a first partial image that is an image included in the first area;
Measuring the position of the object based on the processed first partial image,
It is a measuring method.

上記構成の測定方法によれば、たとえば最も大きい画素値を有する第1の対象画素の画素値が所定の範囲に含まれるように第1の撮像設定が行われることで、画像における第1の輝点を構成する複数の画素の画素値を一定の範囲内に収めることができる。これにより、対象物の材質が変化して第1の輝点の明るさが変化する場合においても、画像において第1の輝点のイメージを良好に描画することができるので、第1の領域を適切に設定することができる。そして、第1の領域に含まれる第1の部分画像が処理部において処理されることで、画像処理のデータ量を削減することができるので、処理負荷を低減し、処理時間を短くすることができる。また、たとえば、画像における輝点の位置を精度よく測定するための画像処理を第1の部分画像に対して行うことで、画像における第1の輝点の位置を精度よく測定することができる。これにより、対象物の位置の測定精度を向上させることができる。   According to the measurement method having the above-described configuration, for example, the first imaging setting is performed so that the pixel value of the first target pixel having the largest pixel value is included in the predetermined range, so that the first brightness in the image is set. Pixel values of a plurality of pixels forming a point can be kept within a certain range. With this, even when the material of the target object changes and the brightness of the first luminescent spot changes, the image of the first luminescent spot can be drawn well in the image. Can be set appropriately. Since the first partial image included in the first area is processed by the processing unit, the data amount of the image processing can be reduced, so that the processing load can be reduced and the processing time can be shortened. it can. Further, for example, by performing image processing for accurately measuring the position of a bright spot in an image on the first partial image, the position of the first bright spot in the image can be accurately measured. Thereby, the measurement accuracy of the position of the object can be improved.

図1は、本実施形態のレーザマーキング装置の構成を示す図である。FIG. 1 is a diagram illustrating a configuration of a laser marking device according to the present embodiment. 図2は、本実施形態のカメラによって生成された第1の画像の一例を示す図である。FIG. 2 is a diagram illustrating an example of a first image generated by the camera according to the present embodiment. 図3は、本実施形態のカメラによって生成された第2の画像の一例を示す図である。FIG. 3 is a diagram illustrating an example of a second image generated by the camera according to the present embodiment. 図4は、本実施形態の測定装置における画像分析部の構成を示す図である。FIG. 4 is a diagram illustrating a configuration of an image analysis unit in the measurement device of the present embodiment. 図5は、本実施形態のカメラによって生成された第1の設定画像の一例を示す図である。FIG. 5 is a diagram illustrating an example of a first setting image generated by the camera according to the present embodiment. 図6は、本実施形態のカメラによって生成された第2の設定画像の一例を示す図である。FIG. 6 is a diagram illustrating an example of the second setting image generated by the camera according to the present embodiment. 図7は、本実施形態のカメラによって生成された第1の部分画像の一例を示す図である。FIG. 7 is a diagram illustrating an example of a first partial image generated by the camera according to the present embodiment. 図8は、本実施形態のカメラによって生成された第2の部分画像の一例を示す図である。FIG. 8 is a diagram illustrating an example of the second partial image generated by the camera according to the present embodiment. 図9は、本実施形態の処理部によって処理された第1の部分画像の一例を示す図である。FIG. 9 is a diagram illustrating an example of a first partial image processed by the processing unit according to the present embodiment. 図10は、本実施形態の処理部によって処理された第2の部分画像の一例を示す図である。FIG. 10 is a diagram illustrating an example of the second partial image processed by the processing unit according to the present embodiment. 図11は、本実施形態の測定部によって求められた重心を含む画像の一例を示す図である。FIG. 11 is a diagram illustrating an example of an image including the center of gravity obtained by the measurement unit according to the present embodiment. 図12は、本実施形態のレーザマーキング装置におけるマーキング処理を示すフローチャートである。FIG. 12 is a flowchart illustrating a marking process in the laser marking device of the present embodiment. 図13は、本実施形態のレーザマーキング装置におけるイメージISAの座標算出処理を示すフローチャートである。FIG. 13 is a flowchart illustrating a coordinate calculation process of the image ISA in the laser marking device of the present embodiment. 図14は、本実施形態のレーザマーキング装置におけるイメージISBの座標算出処理を示すフローチャートである。FIG. 14 is a flowchart illustrating a coordinate calculation process of the image ISB in the laser marking device of the present embodiment.

本発明のレーザマーキング装置は、レーザ光を対象物に照射し、対象物におけるレーザ光の輝点を撮像して画像を生成する構成において、撮像設定が行われた画像の一部を含む領域であって当該輝点を含む領域を設定し、設定した領域に含まれる画像である第1の部分画像を処理し、処理後の部分画像に基づき対象物の位置を測定する構成としている点を特徴のひとつとする。   The laser marking device of the present invention irradiates a target with laser light, and captures a bright spot of the laser light on the target to generate an image. In addition, an area including the luminescent spot is set, a first partial image which is an image included in the set area is processed, and the position of the object is measured based on the processed partial image. And one of them.

本発明に係る実施形態について、以下の構成に従って説明する。ただし、以下で説明する実施形態はあくまで本発明の一例にすぎず、本発明の技術的範囲を限定的に解釈させるものではない。なお、各図面において、同一の構成要素には同一の符号を付しており、その説明を省略する場合がある。
1.実施形態
(1)レーザマーキング装置の構成例
(2)動作例
2.本発明の特徴
3.補足事項
An embodiment according to the present invention will be described according to the following configuration. However, the embodiments described below are merely examples of the present invention, and do not limit the technical scope of the present invention. In the drawings, the same components are denoted by the same reference numerals, and description thereof may be omitted.
1. 1. Embodiment (1) Configuration Example of Laser Marking Apparatus (2) Operation Example 2. Features of the present invention Supplementary information

<1.実施形態>
<(1)レーザマーキング装置の構成例>
本発明の実施形態について、図面を参照しながら説明する。図1は、本実施形態のレーザマーキング装置の構成を示す図である。図1に示されるように、本実施形態のレーザマーキング装置31は、測定装置1及びマーキング部32を含んで構成される。測定装置1は、レーザ光源11A、レーザ光源11B、カメラ12、画像分析部13及び制御部14を含んで構成される。
<1. Embodiment>
<(1) Configuration example of laser marking device>
An embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a diagram illustrating a configuration of a laser marking device according to the present embodiment. As shown in FIG. 1, a laser marking device 31 of the present embodiment includes a measuring device 1 and a marking unit 32. The measurement device 1 includes a laser light source 11A, a laser light source 11B, a camera 12, an image analysis unit 13, and a control unit 14.

本実施形態では、レーザマーキング装置31は、マーキング用のレーザ(図示せず)のレーザ光を用いて対象物33に対してマーキングを行う。詳細には、レーザマーキングを行う場合、マーキング用のレーザを対象物33の表面に集光することで、対象物33にマーキングが施される。たとえば、マーキング対象物の表面に段差が存在しない場合、マーキングを行っている間、マーキング用のレーザと当該表面との間の距離を容易に一定に保つことができる。すなわち、マーキングを行っている間、マーキング用のレーザは当該表面に集光されるので、良好なマーキングが行われる。   In the present embodiment, the laser marking device 31 performs marking on the target 33 using laser light of a marking laser (not shown). Specifically, when performing laser marking, marking is performed on the target 33 by condensing a laser for marking on the surface of the target 33. For example, when there is no step on the surface of the marking object, the distance between the marking laser and the surface can be easily kept constant during marking. That is, while the marking is being performed, the marking laser is focused on the surface, so that good marking is performed.

図1に示されるように、対象物33における表面に段差が存在する場合、マーキング用のレーザと対象物33の表面(以下、測定対象面33Aと称することがある。)との間の距離(以下、ワーク距離と称することがある。)が変化することがある。このため、マーキング用のレーザを測定対象面33Aに集光するために、測定対象面33Aの位置の測定が求められる。なお、マーキングの対象物33に段差がない場合であっても、たとえば対象物33の高さにばらつきがある場合にはワーク距離が変化することがあるため、測定対象面33Aの位置の測定が求められる。ここで、対象物33は、たとえば、表面に段差が存在する製品であり、トレーサビリティを確保するための識別子たとえばマイクロQRコード及びロゴなどが刻印される。   As shown in FIG. 1, when there is a step on the surface of the target 33, the distance between the marking laser and the surface of the target 33 (hereinafter, sometimes referred to as a measurement target surface 33 </ b> A) ( Hereinafter, it may be referred to as a work distance.). Therefore, measurement of the position of the measurement target surface 33A is required in order to focus the marking laser on the measurement target surface 33A. Even when the marking target 33 has no step, for example, when the height of the target 33 varies, the work distance may change. Desired. Here, the target object 33 is, for example, a product having a step on its surface, and is stamped with an identifier for ensuring traceability, such as a micro QR code and a logo.

<レーザ光源11A及び11B>
レーザ光源11Aは、レーザ光LAを対象物33に照射する。レーザ光源11Bは、レーザ光LBを対象物33に照射する。本実施形態では、レーザ光LA及びレーザ光LBの波長、ビーム径、ビーム断面形状、及び強度などの特性は、略同じである。レーザ光源11A及び11Bは、レーザ光LAを法線とする面とレーザ光LBを法線とする面とが、非平行になるように保持部(図示せず)によって固定される。レーザ光源11A及び11Bは、それぞれ本発明でいう「第1の照射部」及び「第2の照射部」の一具体例である。レーザ光LA及びLBは、それぞれ本発明でいう「第1のレーザ光」及び「第2のレーザ光」の一具体例である。
<Laser light sources 11A and 11B>
The laser light source 11A irradiates the object 33 with the laser light LA. The laser light source 11B irradiates the object 33 with the laser light LB. In the present embodiment, characteristics such as the wavelength, the beam diameter, the beam cross-sectional shape, and the intensity of the laser light LA and the laser light LB are substantially the same. The laser light sources 11A and 11B are fixed by a holding unit (not shown) so that a surface having the laser light LA as a normal line and a surface having the laser light LB as a normal line are non-parallel. The laser light sources 11A and 11B are specific examples of the “first irradiation unit” and the “second irradiation unit” in the present invention, respectively. The laser beams LA and LB are specific examples of the “first laser beam” and the “second laser beam” in the present invention, respectively.

本実施形態では、レーザ光源11A及び11Bは、たとえば半導体レーザであり、レーザ光LA及びLBが点で交差し得るように設けられる。ここで、「レーザ光LA及びLBが点で交差し得る」とは、対象物33が設けられない場合において、レーザ光LA及びレーザ光LBが一点で交差する状態になり得ることを意味する。具体的には、レーザ光LA及びLBは、対象物33が設けられない場合において、交点CSにおいて角度γで交差する。角度γを二等分する二等分線Bisと直交する平面であって交点CSを含む平面を「正反射面MRS」と定義する。なお、レーザ光源11A及び11Bは、半導体レーザ以外の他の種類のレーザであってもよい。   In the present embodiment, the laser light sources 11A and 11B are, for example, semiconductor lasers, and are provided so that the laser lights LA and LB can intersect at points. Here, “the laser beams LA and LB may intersect at a point” means that the laser beam LA and the laser beam LB may intersect at one point when the object 33 is not provided. Specifically, the laser beams LA and LB intersect at the intersection CS at an angle γ when the target 33 is not provided. A plane that is orthogonal to the bisector Bis bisecting the angle γ and that includes the intersection point CS is defined as a “specular reflection surface MRS”. The laser light sources 11A and 11B may be other types of lasers than the semiconductor laser.

以下、正反射面MRSに対してレーザ光源11A及び11B側を「光源側」と呼ぶことがある。また、正反射面MRSに対してレーザ光源11A及び11Bの反対側を「非光源側」と呼ぶことがある。対象物33における測定対象面33Aは、正反射面MRSと略平行である。測定対象面33Aでは、レーザ光LA及びLBによって輝点SA及びSBがそれぞれ生成される。輝点SA及びSBは、それぞれ本発明でいう「第1の輝点」及び「第2の輝点」の一具体例である。   Hereinafter, the laser light sources 11A and 11B sides with respect to the regular reflection surface MRS may be referred to as “light source sides”. The opposite sides of the laser light sources 11A and 11B with respect to the regular reflection surface MRS may be referred to as "non-light source side". The measurement target surface 33A of the target 33 is substantially parallel to the regular reflection surface MRS. Bright points SA and SB are generated on the measurement target surface 33A by the laser beams LA and LB, respectively. The bright points SA and SB are specific examples of the “first bright point” and the “second bright point” in the present invention, respectively.

<制御部14>
制御部14は、レーザ光源11A及び11Bに対して、レーザ光LA及びLBを片方ずつ、タイミングをずらして照射させる。本実施形態では、制御部14は、たとえば、マーキング部32から測定命令を受けると、互いに重複しない期間PA及び期間PBを設定する。制御部14は、期間PAにおいて、レーザ光源11Aをオンにしてレーザ光LAを測定対象面33Aへ照射させ、レーザ光源11Bをオフにするとともに、オン情報SAを画像分析部13へ出力する。また、制御部14は、期間PBにおいて、レーザ光源11Aをオフにし、レーザ光源11Bをオンにしてレーザ光LBを測定対象面33Aへ照射させるとともに、オン情報SBを画像分析部13へ出力する。
<Control unit 14>
The control unit 14 irradiates the laser light sources 11A and 11B with the laser beams LA and LB one by one at a different timing. In the present embodiment, for example, when receiving the measurement command from the marking unit 32, the control unit 14 sets a period PA and a period PB that do not overlap each other. In the period PA, the control unit 14 turns on the laser light source 11A, irradiates the laser light LA to the measurement target surface 33A, turns off the laser light source 11B, and outputs on information SA to the image analysis unit 13. In the period PB, the control unit 14 turns off the laser light source 11A, turns on the laser light source 11B, irradiates the laser light LB to the measurement target surface 33A, and outputs on information SB to the image analysis unit 13.

<カメラ12>
図2は、本実施形態のカメラによって生成された第1の画像の一例を示す図である。図3は、本実施形態のカメラによって生成された第2の画像の一例を示す図である。図2及び図3には、測定対象面33Aの位置が、正反射面MRSに対して光源側に距離Dvだけ離れた位置である場合の画像が示される。
<Camera 12>
FIG. 2 is a diagram illustrating an example of a first image generated by the camera according to the present embodiment. FIG. 3 is a diagram illustrating an example of a second image generated by the camera according to the present embodiment. 2 and 3 show images in the case where the position of the measurement target surface 33A is a position separated from the specular reflection surface MRS by the distance Dv toward the light source.

図1〜図3に示されるように、カメラ12は、光源側において、レンズの光軸が二等分線Bisと略一致するように設けられる。カメラ12は、たとえば、テレセンテリック光学系を有しており、撮影可能範囲FRは、カメラ12からの距離によって変化しない。測定可能範囲MRは、光源側において、輝点SAおよびSBが撮影可能範囲FRに収まる範囲である。   As shown in FIGS. 1 to 3, the camera 12 is provided on the light source side such that the optical axis of the lens substantially matches the bisector Bis. The camera 12 has, for example, a telecentric optical system, and the photographable range FR does not change depending on the distance from the camera 12. The measurable range MR is a range in which the bright points SA and SB fall within the photographable range FR on the light source side.

カメラ12は、画像分析部13の制御に従って動作し、輝点SAまたは輝点SBを含むように測定対象面33Aを撮像する。本実施形態では、カメラ12は、たとえば白黒の画像を撮像可能な撮像素子を有する。なお、撮像素子は、カラー画像を撮像可能なセンサを用いてもよい。カメラ12は、期間PAにおいて撮像命令を画像分析部13から受ける。この撮像命令には、たとえば撮像領域及び露光時間が含まれており、カメラ12は、撮像命令を受けると、撮像命令に含まれる撮像領域及び露光時間で撮像する。カメラ12は、たとえば、撮像領域が全範囲である場合、受光素子の全面を用いて、当該露光時間で測定対象面33Aの輝点SAを撮像し、撮像結果に基づき、輝点SAのイメージISAを含む第1の画像(以下、画像IAと称することがある。)を生成する(図2参照)。   The camera 12 operates under the control of the image analysis unit 13 and captures an image of the measurement target surface 33A so as to include the bright spot SA or the bright spot SB. In the present embodiment, the camera 12 has an image sensor capable of capturing a black and white image, for example. Note that a sensor capable of capturing a color image may be used as the image sensor. The camera 12 receives an imaging command from the image analysis unit 13 during the period PA. The imaging instruction includes, for example, an imaging region and an exposure time. When the camera 12 receives the imaging instruction, the camera 12 captures an image in the imaging region and the exposure time included in the imaging instruction. For example, when the imaging region is the entire range, the camera 12 captures an image of the bright spot SA on the measurement target surface 33A at the exposure time using the entire surface of the light receiving element, and based on the captured result, an image ISA of the bright spot SA. Is generated (hereinafter, may be referred to as an image IA) (see FIG. 2).

また、カメラ12は、期間PBにおいて撮像命令を画像分析部13から受ける。カメラ12は、撮像命令を受けると、撮像命令に含まれる撮像領域がたとえば全範囲である場合、受光素子の全面を用いて、撮像命令に含まれる露光時間で測定対象面33Aの輝点SBを撮像し、撮像結果に基づき、輝点SBのイメージISBを含む画像(以下、画像IBと称することがある。)を生成する(図3参照)。カメラ12が生成する画像には、複数の画素が含まれる。画素の画素値は、たとえば0〜255のうちのいずれかの値となる。つまり、カメラ12は、256階調の画像を生成する。カメラ12は、生成した画像を含む画像情報を画像分析部13へ出力する。   Further, the camera 12 receives an imaging command from the image analysis unit 13 during the period PB. When the camera 12 receives the imaging command, if the imaging region included in the imaging command is, for example, the entire range, the camera 12 uses the entire surface of the light receiving element to set the bright spot SB on the measurement target surface 33A with the exposure time included in the imaging command. The image is captured, and an image (hereinafter, sometimes referred to as an image IB) including the image ISB of the bright spot SB is generated based on the imaging result (see FIG. 3). The image generated by the camera 12 includes a plurality of pixels. The pixel value of the pixel is, for example, any one of 0 to 255. That is, the camera 12 generates an image of 256 gradations. The camera 12 outputs image information including the generated image to the image analysis unit 13.

<画像分析部13>
図4は、本実施形態の測定装置における画像分析部の構成を示す図である。図4に示されるように、本実施形態の画像分析部13は、全体画像調整部21、領域設定部22、部分画像調整部23、処理部24及び測定部25を含んで構成される。
<Image analysis unit 13>
FIG. 4 is a diagram illustrating a configuration of an image analysis unit in the measurement device of the present embodiment. As shown in FIG. 4, the image analysis unit 13 of the present embodiment includes an entire image adjustment unit 21, an area setting unit 22, a partial image adjustment unit 23, a processing unit 24, and a measurement unit 25.

<全体画像調整部21>
<画像IAの処理>
図2及び図4に示されるように、全体画像調整部21は、輝点SAのイメージISAを構成する複数の画素のうち、所定の条件CMAを満たす画素である第1の対象画素の画素値が所定の範囲MaxAに含まれるように第1の撮像設定を行う。ここで、条件CMAは、たとえば検知範囲として画像IA全体における最大の画素値を有することである。第1の撮像設定は、たとえばカメラ12における露光時間を設定することである。範囲MaxAは、たとえば50〜250の範囲である。全体画像調整部21は、本発明でいう「第1の撮像設定部」の一具体例である。
<Overall image adjustment unit 21>
<Processing of Image IA>
As shown in FIGS. 2 and 4, the whole image adjustment unit 21 determines a pixel value of a first target pixel which is a pixel satisfying a predetermined condition CMA among a plurality of pixels constituting the image ISA of the bright spot SA. Are set to be included in the predetermined range MaxA. Here, the condition CMA is, for example, to have a maximum pixel value in the entire image IA as a detection range. The first imaging setting is, for example, to set an exposure time in the camera 12. Range MaxA is, for example, a range of 50 to 250. The whole image adjustment unit 21 is a specific example of the “first imaging setting unit” in the present invention.

詳細には、全体画像調整部21は、オン情報SAを制御部14から受けると、たとえば、撮像領域及び露光時間としてそれぞれ全範囲及び初期値ETAを含む撮像命令をカメラ12へ出力することで、カメラ12の撮像領域及び露光時間を初期設定する。全体画像調整部21は、撮像命令の応答として画像情報をカメラ12から取得し、取得した画像情報に基づき、画像IAに含まれる複数の画素から最大の画素値を有する第1の対象画素(以下、最大画素PEAと称することがある。)を特定する。   Specifically, when the entire image adjustment unit 21 receives the ON information SA from the control unit 14, for example, the entire image adjustment unit 21 outputs an imaging command including the entire range and the initial value ETA to the camera 12 as the imaging region and the exposure time, respectively. Initially, the imaging area and exposure time of the camera 12 are set. The whole image adjustment unit 21 acquires image information from the camera 12 as a response to the imaging command, and, based on the acquired image information, a first target pixel (hereinafter, referred to as a first target pixel having a maximum pixel value from a plurality of pixels included in the image IA) , Maximum pixel PEA).

全体画像調整部21は、たとえば、最大画素PEAの画素値が範囲MaxAに含まれる場合、第1の撮像設定が行われた画像IA(以下、第1の設定画像と称することがある。)を含む画像情報を領域設定部22へ出力し、第1の撮像設定を終了する。   For example, when the pixel value of the maximum pixel PEA is included in the range MaxA, the entire image adjustment unit 21 may use the image IA on which the first imaging setting is performed (hereinafter, may be referred to as a first setting image). The included image information is output to the region setting unit 22 and the first imaging setting ends.

一方、全体画像調整部21は、最大画素PEAの画素値が範囲MaxAに含まれない場合、最大画素PEAの画素値が範囲MaxAに含まれるようにカメラ12の露光時間を変更する。具体的には、全体画像調整部21は、たとえば、測定対象面33Aにおける輝点SA近傍の反射率が大きいケースなどで、最大画素PEAの画素値が範囲MaxAより大きい場合、カメラ12の露光時間をより短い時間に変更する。また、全体画像調整部21は、たとえば、測定対象面33Aにおける輝点SA近傍の反射率が小さいケースなどで、最大画素PEAの画素値が範囲MaxAより小さい場合、カメラ12の露光時間をより長い時間に変更する。全体画像調整部21は、カメラ12の露光時間を変更して最大画素PEAの画素値が範囲MaxAに含まれるようになった場合、第1の設定画像を含む画像情報を領域設定部22へ出力し、第1の撮像設定を終了する。   On the other hand, when the pixel value of the maximum pixel PEA is not included in the range MaxA, the entire image adjustment unit 21 changes the exposure time of the camera 12 so that the pixel value of the maximum pixel PEA is included in the range MaxA. Specifically, for example, when the pixel value of the maximum pixel PEA is larger than the range MaxA in a case where the reflectance near the luminescent spot SA on the measurement target surface 33A is large, for example, To a shorter time. When the pixel value of the maximum pixel PEA is smaller than the range MaxA, for example, in a case where the reflectance near the luminescent spot SA on the measurement target surface 33A is small, the overall image adjustment unit 21 sets the exposure time of the camera 12 to be longer. Change to time. When the exposure time of the camera 12 is changed and the pixel value of the maximum pixel PEA is included in the range MaxA, the whole image adjustment unit 21 outputs image information including the first setting image to the region setting unit 22. Then, the first imaging setting ends.

なお、条件CMAは、画像IA全体における最大の画素値を有することであると説明したが、条件CMAは、画像IA全体において2番目に大きい画素値を有すること、または画像IA全体において3番目に大きい画素値を有することなどであってもよい。また、条件CMAの検知範囲は、画像IA全体であると説明したが、検知範囲は、画像IAの一部、たとえばイメージISAが存在し得る範囲などであってもよい。また、第1の撮像設定は、カメラ12における露光時間を設定することであると説明したが、第1の撮像設定は、レーザ光LAの強度を設定すること、またはフィルタのオンもしくはオフの設定を行うことであってもよい。   Although the condition CMA is described as having the largest pixel value in the entire image IA, the condition CMA is described as having the second largest pixel value in the entire image IA or the third condition in the entire image IA. It may have a large pixel value. Although the detection range of the condition CMA has been described as being the entire image IA, the detection range may be a part of the image IA, for example, a range where the image ISA can exist. Also, it has been described that the first imaging setting is to set the exposure time in the camera 12, but the first imaging setting is to set the intensity of the laser beam LA or to set the filter on or off. May be performed.

<画像IBの処理>
図3及び図4に示されるように、全体画像調整部21は、輝点SBのイメージISBを構成する複数の画素のうち、所定の条件CMBを満たす画素である第2の対象画素の画素値が所定の範囲MaxBに含まれるように第3の撮像設定をさらに行う。本実施形態では、条件CMBは、条件CMAと同じであり、検知範囲として画像IB全体における最大の画素値を有することである。第3の撮像設定は、第1の撮像設定と同じであり、カメラ12における露光時間を設定することである。範囲MaxBは、範囲MaxAと同じであり、50〜250の範囲である。なお、条件CMBは、条件CMAと異なってもよい。第3の撮像設定は、第1の撮像設定と異なってもよい。範囲MaxBは、範囲MaxAと異なってもよい。
<Process of Image IB>
As shown in FIGS. 3 and 4, the whole image adjustment unit 21 determines a pixel value of a second target pixel which is a pixel satisfying a predetermined condition CMB among a plurality of pixels constituting the image ISB of the bright spot SB. Are further set so that is included in the predetermined range MaxB. In the present embodiment, the condition CMB is the same as the condition CMA, and has a maximum pixel value in the entire image IB as a detection range. The third imaging setting is the same as the first imaging setting, and is to set an exposure time in the camera 12. The range MaxB is the same as the range MaxA, and is in the range of 50 to 250. Note that the condition CMB may be different from the condition CMA. The third imaging setting may be different from the first imaging setting. The range MaxB may be different from the range MaxA.

詳細には、全体画像調整部21は、オン情報SBを制御部14から受けると、たとえば、撮像領域及び露光時間としてそれぞれ全範囲及び初期値ETBを含む撮像命令をカメラ12へ出力することで、カメラ12の撮像領域及び露光時間を初期設定する。ここで、初期値ETBは、初期値ETAと同じである。なお、初期値ETBは、初期値ETAと異なってもよい。全体画像調整部21は、撮像命令の応答として画像情報をカメラ12から取得し、取得した画像情報に基づき、画像IBに含まれる複数の画素から最大の画素値を有する第2の対象画素(以下、最大画素PEBと称することがある。)を特定する。   Specifically, upon receiving the ON information SB from the control unit 14, the overall image adjustment unit 21 outputs, to the camera 12, for example, an imaging command including the entire range and the initial value ETB as the imaging region and the exposure time, respectively. Initially, the imaging area and exposure time of the camera 12 are set. Here, the initial value ETB is the same as the initial value ETA. Note that the initial value ETB may be different from the initial value ETA. The whole image adjustment unit 21 acquires image information from the camera 12 as a response to the imaging command, and, based on the acquired image information, a second target pixel (hereinafter, referred to as a second target pixel) having a maximum pixel value from a plurality of pixels included in the image IB. , May be referred to as a maximum pixel PEB).

全体画像調整部21は、たとえば、最大画素PEBの画素値が範囲MaxBに含まれる場合、第3の撮像設定が行われた画像IB(以下、第2の設定画像と称することがある。)を含む画像情報を領域設定部22へ出力し、第3の撮像設定を終了する。   For example, when the pixel value of the maximum pixel PEB is included in the range MaxB, the entire image adjustment unit 21 may use the image IB on which the third imaging setting has been performed (hereinafter, may be referred to as a second setting image). The image information including the image information is output to the area setting unit 22 and the third imaging setting ends.

一方、全体画像調整部21は、最大画素PEBの画素値が範囲MaxBに含まれない場合、最大画素PEBの画素値が範囲MaxBに含まれるようにカメラ12の露光時間を変更する。具体的には、全体画像調整部21は、たとえば、測定対象面33Aにおける輝点SB近傍の反射率が大きいケースなどで、最大画素PEBの画素値が範囲MaxBより大きい場合、カメラ12の露光時間をより短い時間に変更する。また、全体画像調整部21は、たとえば、測定対象面33Aにおける輝点SB近傍の反射率が小さいケースなどで、最大画素PEBの画素値が範囲MaxBより小さい場合、カメラ12の露光時間をより長い時間に変更する。全体画像調整部21は、カメラ12の露光時間を変更して最大画素PEBの画素値が範囲MaxBに含まれるようになった場合、第2の設定画像を含む画像情報を領域設定部22へ出力し、第3の撮像設定を終了する。   On the other hand, when the pixel value of the maximum pixel PEB is not included in the range MaxB, the overall image adjustment unit 21 changes the exposure time of the camera 12 so that the pixel value of the maximum pixel PEB is included in the range MaxB. More specifically, if the pixel value of the maximum pixel PEB is larger than the range MaxB, for example, when the reflectance near the bright spot SB on the measurement target surface 33A is large, To a shorter time. When the pixel value of the maximum pixel PEB is smaller than the range MaxB, for example, in a case where the reflectance near the bright spot SB on the measurement target surface 33A is small, the overall image adjustment unit 21 sets the exposure time of the camera 12 to be longer. Change to time. The whole image adjustment unit 21 outputs image information including the second setting image to the region setting unit 22 when the exposure time of the camera 12 is changed so that the pixel value of the maximum pixel PEB is included in the range MaxB. Then, the third imaging setting ends.

なお、条件CMBは、画像IB全体における最大の画素値を有することであると説明したが、条件CMBは、画像IB全体において2番目に大きい画素値を有すること、または画像IB全体において3番目に大きい画素値を有することなどであってもよい。また、条件CMBの検知範囲は、画像IB全体であると説明したが、検知範囲は、画像IBの一部、たとえばイメージISBが存在し得る範囲などであってもよい。また、第3の撮像設定は、カメラ12における露光時間を設定することであると説明したが、第3の撮像設定は、レーザ光LBの強度を設定すること、またはフィルタのオンもしくはオフの設定を行うことであってもよい。   Although the condition CMB has been described as having the largest pixel value in the entire image IB, the condition CMB has the second largest pixel value in the entire image IB, or the third condition in the entire image IB. It may have a large pixel value. Although the detection range of the condition CMB has been described as being the entire image IB, the detection range may be a part of the image IB, for example, a range where the image ISB can exist. Although the third imaging setting is described as setting the exposure time in the camera 12, the third imaging setting is to set the intensity of the laser beam LB or to set the filter on or off. May be performed.

<領域設定部22>
<画像IAの処理>
図5は、本実施形態のカメラによって生成された第1の設定画像の一例を示す図である。図4及び図5に示されるように、領域設定部22は、第1の設定画像に含まれる最大画素PEAに基づき、画像IAの一部を含む領域であって輝点SAのイメージISAを含む領域RAを設定する。詳細には、領域設定部22は、第1の設定画像を含む画像情報を全体画像調整部21から受けると、画像情報に基づき最大画素PEAの座標を取得する。この座標は、たとえば、画像IAの四隅のうちの左上の隅を原点とするピクセル単位の座標(以下、全体画像座標と称することがある。)である。領域設定部22は、取得した全体画像座標に基づき、最大画素PEAを含むように領域RAを設定する。具体的には、領域設定部22は、たとえば、最大画素PEAを中心とし、所定のサイズを有する矩形の領域RAを設定する。領域設定部22は、たとえば、設定した領域RAの四隅の全体画像座標を含む第1の領域情報を部分画像調整部23へ出力する。なお、領域RAが所定のサイズを有する構成について説明したが、領域RAのサイズは、輝点SAのイメージのサイズに応じて変更される構成であってもよい。また、最大画素PEAが領域RAの中心に位置する構成について説明したが、最大画素PEAが領域RAの中心からずれた位置に位置する構成であってもよい。領域RAは、本発明でいう「第1の領域」の一具体例である。
<Area setting unit 22>
<Processing of Image IA>
FIG. 5 is a diagram illustrating an example of a first setting image generated by the camera according to the present embodiment. As shown in FIGS. 4 and 5, the area setting unit 22 is an area including a part of the image IA and includes the image ISA of the bright spot SA based on the maximum pixel PEA included in the first setting image. The area RA is set. Specifically, when the area setting unit 22 receives image information including the first setting image from the whole image adjustment unit 21, the area setting unit 22 acquires the coordinates of the maximum pixel PEA based on the image information. The coordinates are, for example, coordinates in a pixel unit having the origin at the upper left corner of the four corners of the image IA (hereinafter, may be referred to as whole image coordinates). The region setting unit 22 sets the region RA so as to include the maximum pixel PEA based on the acquired whole image coordinates. Specifically, the region setting unit 22 sets, for example, a rectangular region RA having a predetermined size around the maximum pixel PEA. The region setting unit 22 outputs, for example, first region information including the entire image coordinates of the four corners of the set region RA to the partial image adjustment unit 23. Although the configuration in which the area RA has a predetermined size has been described, the size of the area RA may be changed according to the size of the image of the bright spot SA. Further, although the configuration in which the maximum pixel PEA is located at the center of the area RA has been described, a configuration in which the maximum pixel PEA is located off the center of the area RA may be employed. The area RA is a specific example of the “first area” in the present invention.

<画像IBの処理>
図6は、本実施形態のカメラによって生成された第2の設定画像の一例を示す図である。図4及び図6に示されるように、領域設定部22は、第2の設定画像に含まれる最大画素PEBに基づき、画像IBの一部を含む領域であって輝点SBのイメージISBを含む領域RBをさらに設定する。詳細には、領域設定部22は、第2の設定画像を含む画像情報を全体画像調整部21から受けると、画像情報に基づき最大画素PEBの全体画像座標を取得する。領域設定部22は、取得した全体画像座標に基づき、最大画素PEBを含むように領域RBを設定する。具体的には、領域設定部22は、たとえば、最大画素PEBを中心とし、所定のサイズを有する矩形の領域RBを設定する。ここで、領域RBのサイズ及び形状は、領域RAのサイズ及び形状とそれぞれ同じである。なお、領域RBのサイズは、領域RAのサイズと異なってもよい。また、領域RBの形状は、領域RAの形状と異なってもよい。領域設定部22は、たとえば、設定した領域RBの四隅の全体画像座標を含む第2の領域情報を部分画像調整部23へ出力する。なお、領域RBが所定のサイズを有する構成について説明したが、領域RBのサイズは、輝点SBのイメージのサイズに応じて変更される構成であってもよい。また、最大画素PEBが領域RBの中心に位置する構成について説明したが、最大画素PEBが領域RBの中心からずれた位置に位置する構成であってもよい。領域RBは、本発明でいう「第2の領域」の一具体例である。
<Process of Image IB>
FIG. 6 is a diagram illustrating an example of the second setting image generated by the camera according to the present embodiment. As shown in FIGS. 4 and 6, the region setting unit 22 is a region including a part of the image IB and including the image ISB of the bright spot SB based on the maximum pixel PEB included in the second setting image. The area RB is further set. Specifically, when the area setting unit 22 receives image information including the second setting image from the entire image adjustment unit 21, the area setting unit 22 acquires the entire image coordinates of the maximum pixel PEB based on the image information. The region setting unit 22 sets the region RB so as to include the maximum pixel PEB based on the acquired whole image coordinates. Specifically, the region setting unit 22 sets, for example, a rectangular region RB having a predetermined size around the maximum pixel PEB. Here, the size and shape of the region RB are the same as the size and shape of the region RA, respectively. Note that the size of the region RB may be different from the size of the region RA. Further, the shape of the region RB may be different from the shape of the region RA. The region setting unit 22 outputs, to the partial image adjustment unit 23, second region information including the entire image coordinates of the four corners of the set region RB, for example. Although the configuration in which the region RB has a predetermined size has been described, the size of the region RB may be changed according to the size of the image of the bright spot SB. Further, the configuration in which the maximum pixel PEB is located at the center of the region RB has been described. However, the configuration may be such that the maximum pixel PEB is located at a position shifted from the center of the region RB. The region RB is a specific example of the “second region” in the present invention.

<部分画像調整部23>
<画像IAの処理>
図7は、本実施形態のカメラによって生成された第1の部分画像の一例を示す図である。図4及び図7に示されるように、部分画像調整部23は、領域RAに含まれる画像である第1の部分画像(以下、部分画像PIAと称することがある。)に含まれる画素の画素値の統計値が所定の範囲に含まれるように第2の撮像設定を行う。本実施形態では、部分画像調整部23は、部分画像PIAに含まれる画素の画素値の平均値が範囲AveAに含まれるように第2の撮像設定を行う。ここで、第2の撮像設定は、たとえばカメラ12における露光時間を設定することである。範囲AveAは、たとえば15〜35の範囲である。部分画像調整部23は、本発明でいう「第2の撮像設定部」の一具体例である。
<Partial image adjustment unit 23>
<Processing of Image IA>
FIG. 7 is a diagram illustrating an example of a first partial image generated by the camera according to the present embodiment. As shown in FIGS. 4 and 7, the partial image adjustment unit 23 is a pixel of a pixel included in a first partial image (hereinafter, sometimes referred to as a partial image PIA) which is an image included in the area RA. The second imaging setting is performed so that the statistical value is included in a predetermined range. In the present embodiment, the partial image adjustment unit 23 performs the second imaging setting so that the average value of the pixel values of the pixels included in the partial image PIA is included in the range AveA. Here, the second imaging setting is to set, for example, an exposure time in the camera 12. The range AveA is, for example, a range of 15 to 35. The partial image adjustment unit 23 is a specific example of the “second imaging setting unit” in the present invention.

詳細には、部分画像調整部23は、第1の領域情報を領域設定部22から受けると、たとえば、撮像領域及び露光時間としてそれぞれ第1の領域情報及び初期値ETRAを含む撮像命令をカメラ12へ出力する。カメラ12は、撮像命令を受けると、第1の領域情報に基づき、領域RAに対応する受光素子の部分を特定する。そして、カメラ12は、受光素子の当該部分を用いて、撮像命令に含まれる露光時間で撮像し、輝点SAのイメージISAを含む部分画像PIAを生成する(図7参照)。カメラ12は、生成した部分画像PIAを含む画像情報を部分画像調整部23へ出力する。   More specifically, upon receiving the first region information from the region setting unit 22, the partial image adjustment unit 23 issues, for example, an imaging command including the first region information and the initial value ETRA as the imaging region and the exposure time, respectively, to the camera 12. Output to Upon receiving the imaging command, the camera 12 specifies a light receiving element portion corresponding to the area RA based on the first area information. Then, the camera 12 captures an image with the exposure time included in the capturing instruction using the relevant portion of the light receiving element, and generates a partial image PIA including the image ISA of the bright spot SA (see FIG. 7). The camera 12 outputs image information including the generated partial image PIA to the partial image adjustment unit 23.

部分画像調整部23は、画像情報をカメラ12から受けると、画像情報に基づき、部分画像PIAに含まれる複数の画素の画素値の平均値を算出する。部分画像調整部23は、算出した平均値が範囲AveAに含まれる場合、部分画像PIAを含む第1の部分画像情報を処理部24へ出力するとともに第1の領域情報を測定部25へ出力し、第2の撮像設定を終了する。   When receiving the image information from the camera 12, the partial image adjustment unit 23 calculates an average value of the pixel values of a plurality of pixels included in the partial image PIA based on the image information. When the calculated average value is included in the range AveA, the partial image adjustment unit 23 outputs the first partial image information including the partial image PIA to the processing unit 24 and outputs the first area information to the measurement unit 25. Then, the second imaging setting ends.

一方、部分画像調整部23は、平均値が範囲AveAに含まれない場合、平均値が範囲AveAに含まれるようにカメラ12の露光時間を変更する。具体的には、部分画像調整部23は、たとえば、測定対象面33Aにおける輝点SA近傍の反射率が大きいケースなどで、平均値が範囲AveAより大きい場合、カメラ12の露光時間をより短い時間に変更する。また、部分画像調整部23は、たとえば、測定対象面33Aにおける輝点SA近傍の反射率が小さいケースなどで、平均値が範囲AveAより小さい場合、カメラ12の露光時間をより長い時間に変更する。部分画像調整部23は、カメラ12の露光時間を変更して平均値が範囲AveAに含まれるようになった場合、部分画像PIAを含む第1の部分画像情報を処理部24へ出力するとともに第1の領域情報を測定部25へ出力し、第2の撮像設定を終了する。   On the other hand, when the average value is not included in the range AveA, the partial image adjustment unit 23 changes the exposure time of the camera 12 so that the average value is included in the range AveA. Specifically, when the average value is larger than the range AveA, for example, in a case where the reflectance near the luminescent spot SA on the measurement target surface 33A is large, the partial image adjustment unit 23 sets the exposure time of the camera 12 to a shorter time. Change to Further, the partial image adjustment unit 23 changes the exposure time of the camera 12 to a longer time when the average value is smaller than the range AveA, for example, in a case where the reflectance near the bright point SA on the measurement target surface 33A is small. . When the exposure time of the camera 12 is changed and the average value is included in the range AveA, the partial image adjustment unit 23 outputs the first partial image information including the partial image PIA to the processing unit 24 and The first area information is output to the measurement unit 25, and the second imaging setting ends.

なお、部分画像調整部23は、部分画像PIAに含まれる画素の画素値の平均値を統計値として算出する構成について説明したが、部分画像調整部23は、たとえば、部分画像PIAに含まれる画素の画素値の中央値または最頻値などを統計値として算出する構成であってもよい。また、第2の撮像設定は、カメラ12における露光時間を設定することであると説明したが、第2の撮像設定は、レーザ光LAの強度を設定すること、またはフィルタのオンもしくはオフの設定を行うことであってもよい。   The configuration in which the partial image adjustment unit 23 calculates the average value of the pixel values of the pixels included in the partial image PIA as the statistic has been described. However, the partial image adjustment unit 23 includes, for example, the pixel included in the partial image PIA. The median value or the mode value of the pixel values may be calculated as a statistical value. Also, the second imaging setting is described as setting the exposure time in the camera 12, but the second imaging setting is to set the intensity of the laser beam LA or to set the filter on or off. May be performed.

<画像IBの処理>
図8は、本実施形態のカメラによって生成された第2の部分画像の一例を示す図である。図4及び図8に示されるように、部分画像調整部23は、領域RBに含まれる画像である第2の部分画像(以下、部分画像PIBと称することがある。)に含まれる画素の画素値の統計値が所定の範囲に含まれるように第4の撮像設定をさらに行う。本実施形態では、部分画像調整部23は、部分画像PIBに含まれる画素の画素値の平均値が範囲AveBに含まれるように第4の撮像設定を行う。第4の撮像設定は、第2の撮像設定と同じであり、カメラ12における露光時間を設定することである。範囲AveBは、範囲AveAと同じであり、15〜35の範囲である。なお、第4の撮像設定は、第2の撮像設定と異なってもよい。範囲AveBは、範囲AveAと異なってもよい。
<Process of Image IB>
FIG. 8 is a diagram illustrating an example of the second partial image generated by the camera according to the present embodiment. As shown in FIGS. 4 and 8, the partial image adjustment unit 23 is a pixel included in a second partial image (hereinafter, sometimes referred to as a partial image PIB) which is an image included in the region RB. The fourth imaging setting is further performed so that the statistical value is included in the predetermined range. In the present embodiment, the partial image adjustment unit 23 performs the fourth imaging setting so that the average value of the pixel values of the pixels included in the partial image PIB is included in the range AveB. The fourth imaging setting is the same as the second imaging setting, and is to set an exposure time in the camera 12. The range AveB is the same as the range AveA and ranges from 15 to 35. Note that the fourth imaging setting may be different from the second imaging setting. Range AveB may be different from range AveA.

詳細には、部分画像調整部23は、第2の領域情報を領域設定部22から受けると、たとえば、撮像領域及び露光時間としてそれぞれ第2の領域情報及び初期値ETRBを含む撮像命令をカメラ12へ出力する。ここで、初期値ETRBは、初期値ETRAと同じである。なお、初期値ETRBは、初期値ETRAと異なってもよい。カメラ12は、撮像命令を受けると、第2の領域情報に基づき、領域RBに対応する受光素子の部分を特定する。そして、カメラ12は、受光素子の当該部分を用いて、撮像命令に含まれる露光時間で撮像し、輝点SBのイメージISBを含む部分画像PIBを生成する(図8参照)。カメラ12は、生成した部分画像PIBを含む画像情報を部分画像調整部23へ出力する。   Specifically, when the partial image adjustment unit 23 receives the second region information from the region setting unit 22, the partial image adjustment unit 23 issues, for example, an imaging command including the second region information and the initial value ETRB as the imaging region and the exposure time, respectively, to the camera 12. Output to Here, the initial value ETRB is the same as the initial value ETRA. Note that the initial value ETRB may be different from the initial value ETRA. Upon receiving the imaging command, the camera 12 specifies a portion of the light receiving element corresponding to the area RB based on the second area information. Then, the camera 12 captures an image using the relevant portion of the light receiving element for the exposure time included in the capturing instruction, and generates a partial image PIB including the image ISB of the bright spot SB (see FIG. 8). The camera 12 outputs image information including the generated partial image PIB to the partial image adjustment unit 23.

部分画像調整部23は、画像情報をカメラ12から受けると、画像情報に基づき、部分画像PIBに含まれる複数の画素の画素値の平均値を算出する。部分画像調整部23は、算出した平均値が範囲AveBに含まれる場合、部分画像PIBを含む第2の部分画像情報を処理部24へ出力するとともに第2の領域情報を測定部25へ出力し、第4の撮像設定を終了する。   Upon receiving the image information from the camera 12, the partial image adjustment unit 23 calculates an average value of the pixel values of a plurality of pixels included in the partial image PIB based on the image information. When the calculated average value is included in the range AveB, the partial image adjustment unit 23 outputs the second partial image information including the partial image PIB to the processing unit 24 and outputs the second area information to the measurement unit 25. Then, the fourth imaging setting ends.

一方、部分画像調整部23は、平均値が範囲AveBに含まれない場合、平均値が範囲AveBに含まれるようにカメラ12の露光時間を変更する。具体的には、部分画像調整部23は、たとえば、測定対象面33Aにおける輝点SB近傍の反射率が大きいケースなどで、平均値が範囲AveBより大きい場合、カメラ12の露光時間をより短い時間に変更する。また、部分画像調整部23は、たとえば、測定対象面33Aにおける輝点SB近傍の反射率が小さいケースなどで、平均値が範囲AveBより小さい場合、カメラ12の露光時間をより長い時間に変更する。部分画像調整部23は、カメラ12の露光時間を変更して平均値が範囲AveBに含まれるようになった場合、部分画像PIBを含む第2の部分画像情報を処理部24へ出力するとともに第2の領域情報を測定部25へ出力し、第4の撮像設定を終了する。   On the other hand, when the average value is not included in the range AveB, the partial image adjustment unit 23 changes the exposure time of the camera 12 so that the average value is included in the range AveB. Specifically, for example, in a case where the reflectance near the luminescent spot SB on the measurement target surface 33A is large and the average value is larger than the range AveB, the partial image adjustment unit 23 shortens the exposure time of the camera 12 for a shorter time. Change to Also, the partial image adjustment unit 23 changes the exposure time of the camera 12 to a longer time when the average value is smaller than the range AveB, for example, in a case where the reflectance near the bright spot SB on the measurement target surface 33A is small. . When the exposure time of the camera 12 is changed and the average value is included in the range AveB, the partial image adjustment unit 23 outputs the second partial image information including the partial image PIB to the processing unit 24 and The second area information is output to the measurement unit 25, and the fourth imaging setting ends.

なお、部分画像調整部23は、部分画像PIBに含まれる画素の画素値の平均値を統計値として算出する構成について説明したが、部分画像調整部23は、たとえば、部分画像PIBに含まれる画素の画素値の中央値または最頻値などを統計値として算出する構成であってもよい。また、第4の撮像設定は、カメラ12における露光時間を設定することであると説明したが、第4の撮像設定は、レーザ光LBの強度を設定すること、またはフィルタのオンもしくはオフの設定を行うことであってもよい。   Although the configuration in which the partial image adjustment unit 23 calculates the average value of the pixel values of the pixels included in the partial image PIB as the statistical value has been described, for example, the partial image adjustment unit 23 may calculate the pixel value included in the partial image PIB. The median value or the mode value of the pixel values may be calculated as a statistical value. Also, the fourth imaging setting has been described as setting the exposure time in the camera 12, but the fourth imaging setting is to set the intensity of the laser beam LB or to set the filter on or off. May be performed.

<処理部24>
<部分画像PIAの処理>
図9は、本実施形態の処理部によって処理された第1の部分画像の一例を示す図である。図4及び図9に示されるように、処理部24は、第2の撮像設定が行われた部分画像PIAを処理する。本実施形態では、処理部24は、部分画像PIAに対して2値化処理、収縮処理及び膨張処理を行う。
<Processing unit 24>
<Processing of partial image PIA>
FIG. 9 is a diagram illustrating an example of a first partial image processed by the processing unit according to the present embodiment. As shown in FIGS. 4 and 9, the processing unit 24 processes the partial image PIA on which the second imaging setting has been performed. In the present embodiment, the processing unit 24 performs a binarization process, a contraction process, and an expansion process on the partial image PIA.

詳細には、処理部24は、第1の部分画像情報を部分画像調整部23から受けると、第1の部分画像情報に含まれる部分画像PIAに対して2値化処理を行い、部分画像PIAを白色及び黒色の2色によって構成される画像に変換する。具体的には、処理部24は、部分画像PIAに含まれる画素を順番に選択し、選択した画素の画素値が所定のしきい値ThAより大きいか否かを判定する。処理部24は、選択した画素の画素値がしきい値ThAより大きい場合、当該画素値を値VWに設定する。一方、処理部24は、選択した画素の画素値がしきい値ThA以下である場合、当該画素値を、値VWより小さい値VBに設定する。このようにして、部分画像PIAでは、たとえばイメージISAを構成する画素のように、しきい値ThAより大きい画素値を有していた画素が値VWに基づく白色を示す。また、たとえばイメージISAの周辺を構成する画素のように、しきい値ThA以下の画素値を有していた画素が値VBに基づく黒色を示す。   Specifically, when the processing unit 24 receives the first partial image information from the partial image adjustment unit 23, the processing unit 24 performs a binarization process on the partial image PIA included in the first partial image information, and Is converted into an image composed of two colors, white and black. Specifically, the processing unit 24 sequentially selects the pixels included in the partial image PIA, and determines whether the pixel value of the selected pixel is larger than a predetermined threshold ThA. When the pixel value of the selected pixel is larger than the threshold ThA, the processing unit 24 sets the pixel value to the value VW. On the other hand, when the pixel value of the selected pixel is equal to or smaller than the threshold ThA, the processing unit 24 sets the pixel value to a value VB smaller than the value VW. In this manner, in the partial image PIA, pixels having a pixel value larger than the threshold value ThA, such as pixels constituting the image ISA, show white based on the value VW. Further, for example, a pixel having a pixel value equal to or smaller than the threshold value ThA, such as a pixel constituting the periphery of the image ISA, shows black based on the value VB.

処理部24は、2値化処理を施した部分画像PIAに対して収縮処理を行う。具体的には、処理部24は、たとえば、部分画像PIAに含まれる画素を順番に選択し、選択した画素の周辺の画素のうち、少なくともいずれか1つの画素の画素値が値VBである場合、選択した画素の画素値を値VBに設定する。   The processing unit 24 performs contraction processing on the partial image PIA that has been subjected to the binarization processing. Specifically, for example, the processing unit 24 sequentially selects the pixels included in the partial image PIA, and when the pixel value of at least one of the peripheral pixels of the selected pixel is the value VB. , The pixel value of the selected pixel is set to the value VB.

処理部24は、収縮処理を施した部分画像PIAに対して膨張処理を行う。具体的には、処理部24は、たとえば、部分画像PIAに含まれる画素を順番に選択し、選択した画素の周辺の画素のうち、少なくともいずれか1つの画素の画素値が値VWである場合、選択した画素の画素値を値VWに設定する。このように、部分画像PIAに対して収縮処理及び膨張処理を行うことで、たとえばレーザ光LAのノイズなどに基づく画像ノイズを部分画像PIAから除去することができる。処理部24は、2値化処理、収縮処理及び膨張処理を施した部分画像PIAを含む第1の処理済画像情報を測定部25へ出力する。   The processing unit 24 performs an expansion process on the partial image PIA that has been subjected to the contraction process. Specifically, for example, the processing unit 24 sequentially selects the pixels included in the partial image PIA, and when the pixel value of at least one of the peripheral pixels of the selected pixel is the value VW. , The pixel value of the selected pixel is set to the value VW. As described above, by performing the contraction process and the expansion process on the partial image PIA, image noise based on, for example, noise of the laser beam LA can be removed from the partial image PIA. The processing unit 24 outputs the first processed image information including the partial image PIA that has been subjected to the binarization processing, the contraction processing, and the expansion processing to the measurement unit 25.

<部分画像PIBの処理>
図10は、本実施形態の処理部によって処理された第2の部分画像の一例を示す図である。図4及び図10に示されるように、処理部24は、第4の撮像設定が行われた部分画像PIBを処理する。本実施形態では、処理部24は、部分画像PIBに対して2値化処理、収縮処理及び膨張処理を行う。
<Processing of partial image PIB>
FIG. 10 is a diagram illustrating an example of the second partial image processed by the processing unit according to the present embodiment. As shown in FIGS. 4 and 10, the processing unit 24 processes the partial image PIB on which the fourth imaging setting has been performed. In the present embodiment, the processing unit 24 performs a binarization process, a contraction process, and an expansion process on the partial image PIB.

詳細には、処理部24は、第2の部分画像情報を部分画像調整部23から受けると、第2の部分画像情報に含まれる部分画像PIBに対して2値化処理を行い、部分画像PIBを白色及び黒色の2色によって構成される画像に変換する。具体的には、処理部24は、部分画像PIBに含まれる画素を順番に選択し、選択した画素の画素値が所定のしきい値ThBより大きいか否かを判断する。ここで、しきい値ThBは、しきい値ThAと同じである。なお、しきい値ThBは、しきい値ThAと異なってもよい。処理部24は、選択した画素の画素値がしきい値ThAより大きい場合、当該画素値を値VWに設定する。一方、処理部24は、選択した画素の画素値がしきい値ThB以下である場合、当該画素値を値VBに設定する。このようにして、部分画像PIBでは、たとえばイメージISBを構成する画素のように、しきい値ThBより大きい画素値を有していた画素が値VWに基づく白色を示す。また、たとえばイメージISBの周辺を構成する画素のように、しきい値ThB以下の画素値を有していた画素が値VBに基づく黒色を示す。   Specifically, when the processing unit 24 receives the second partial image information from the partial image adjustment unit 23, the processing unit 24 performs a binarization process on the partial image PIB included in the second partial image information, and performs the partial image PIB Is converted into an image composed of two colors, white and black. Specifically, the processing unit 24 sequentially selects the pixels included in the partial image PIB, and determines whether the pixel value of the selected pixel is larger than a predetermined threshold ThB. Here, the threshold ThB is the same as the threshold ThA. Note that the threshold value ThB may be different from the threshold value ThA. When the pixel value of the selected pixel is larger than the threshold ThA, the processing unit 24 sets the pixel value to the value VW. On the other hand, when the pixel value of the selected pixel is equal to or smaller than the threshold ThB, the processing unit 24 sets the pixel value to the value VB. In this way, in the partial image PIB, for example, a pixel having a pixel value larger than the threshold value ThB, such as a pixel constituting the image ISB, shows white based on the value VW. Further, for example, a pixel having a pixel value equal to or smaller than the threshold value ThB, such as a pixel constituting the periphery of the image ISB, shows black based on the value VB.

処理部24は、2値化処理を施した部分画像PIBに対して収縮処理を行う。具体的には、処理部24は、たとえば、部分画像PIBに含まれる画素を順番に選択し、選択した画素の周辺の画素のうち、少なくともいずれか1つの画素の画素値が値VBである場合、選択した画素の画素値を値VBに設定する。   The processing unit 24 performs a contraction process on the partial image PIB that has been subjected to the binarization process. Specifically, for example, the processing unit 24 sequentially selects the pixels included in the partial image PIB, and when the pixel value of at least one of the pixels around the selected pixel is the value VB. , The pixel value of the selected pixel is set to the value VB.

処理部24は、収縮処理を施した部分画像PIBに対して膨張処理を行う。具体的には、処理部24は、たとえば、部分画像PIBに含まれる画素を順番に選択し、選択した画素の周辺の画素のうち、少なくともいずれか1つの画素の画素値が値VWである場合、選択した画素の画素値を値VWに設定する。このように、部分画像PIBに対して収縮処理及び膨張処理を行うことで、たとえばレーザ光LBのノイズなどに基づく画像ノイズを部分画像PIAから除去することができる。処理部24は、2値化処理、収縮処理及び膨張処理を施した部分画像PIBを含む第2の処理済画像情報を測定部25へ出力する。   The processing unit 24 performs an expansion process on the partial image PIB that has been subjected to the contraction process. Specifically, for example, the processing unit 24 sequentially selects the pixels included in the partial image PIB, and when the pixel value of at least one of the peripheral pixels of the selected pixel is the value VW. , The pixel value of the selected pixel is set to the value VW. As described above, by performing the contraction processing and the expansion processing on the partial image PIB, image noise based on, for example, the noise of the laser beam LB can be removed from the partial image PIA. The processing unit 24 outputs the second processed image information including the partial image PIB that has been subjected to the binarization processing, the contraction processing, and the expansion processing to the measurement unit 25.

なお、処理部24が2値化処理、収縮処理及び膨張処理の順に行う構成について説明したが、処理部24が行う2値化処理、収縮処理及び膨張処理の順序は、入れ換えられてもよい。   Although the configuration in which the processing unit 24 performs the binarization processing, the contraction processing, and the expansion processing in this order has been described, the order of the binarization processing, the contraction processing, and the expansion processing performed by the processing unit 24 may be interchanged.

<測定部25>
測定部25は、処理後の部分画像PIA及び処理後の部分画像PIBに基づき、対象物33の位置を測定する。本実施形態では、測定部25は、処理後の部分画像PIAに含まれる画素の重心の位置、及び処理後の部分画像PIBに含まれる画素の重心の位置に基づき、対象物33の位置を測定する。
<Measurement unit 25>
The measurement unit 25 measures the position of the target 33 based on the processed partial image PIA and the processed partial image PIB. In the present embodiment, the measurement unit 25 measures the position of the object 33 based on the position of the center of gravity of the pixels included in the processed partial image PIA and the position of the center of gravity of the pixels included in the processed partial image PIB. I do.

図4及び図9に示されるように、測定部25は、第1の処理済画像情報を処理部24から受けると、受けた第1の処理済画像情報に基づき、部分画像PIAに含まれる複数の画素の重心の座標を算出する。詳細には、測定部25は、たとえば、部分画像PIAに含まれる複数の画素の座標を算出する。この座標は、たとえば、部分画像PIAの四隅のうちの左上の隅を原点とするピクセル単位の座標(以下、部分画像座標と称することがある。)である。測定部25は、部分画像PIAに含まれる複数の画素の部分画像座標に基づき、画素値を重みとして当該複数の画素の重心の部分画像座標PCAを算出する。   As shown in FIGS. 4 and 9, when the measurement unit 25 receives the first processed image information from the processing unit 24, based on the received first processed image information, the measurement unit 25 The coordinates of the center of gravity of the pixel of are calculated. Specifically, the measurement unit 25 calculates, for example, the coordinates of a plurality of pixels included in the partial image PIA. These coordinates are, for example, coordinates in pixel units (hereinafter, may be referred to as partial image coordinates) with the origin at the upper left corner of the four corners of the partial image PIA. The measurement unit 25 calculates the partial image coordinates PCA of the center of gravity of the plurality of pixels based on the partial image coordinates of the plurality of pixels included in the partial image PIA, using the pixel values as weights.

図4及び図10に示されるように、測定部25は、第2の処理済画像情報を処理部24から受けると、受けた第2の処理済画像情報に基づき、部分画像PIBに含まれる複数の画素の重心の座標を算出する。詳細には、測定部25は、たとえば、部分画像PIBに含まれる複数の画素の部分画像座標を算出する。この場合の部分画像座標は、部分画像PIBの四隅のうちの左上の隅を原点とするピクセル単位の座標である。測定部25は、部分画像PIBに含まれる複数の画素の部分画像座標に基づき、画素値を重みとして当該複数の画素の重心の部分画像座標PCBを算出する。   As shown in FIGS. 4 and 10, when the measurement unit 25 receives the second processed image information from the processing unit 24, based on the received second processed image information, the measurement unit 25 The coordinates of the center of gravity of the pixel of are calculated. Specifically, the measurement unit 25 calculates, for example, partial image coordinates of a plurality of pixels included in the partial image PIB. The partial image coordinates in this case are coordinates in pixel units with the origin at the upper left corner of the four corners of the partial image PIB. The measurement unit 25 calculates the partial image coordinates PCB of the center of gravity of the plurality of pixels based on the partial image coordinates of the plurality of pixels included in the partial image PIB, using the pixel values as weights.

図11は、本実施形態の測定部によって求められた重心を含む画像の一例を示す図である。図11に示されるように、測定部25は、部分画像調整部23から受ける第1の領域情報に基づき、部分画像座標PCAを全体画像座標CAに変換する。また、測定部25は、部分画像調整部23から受ける第2の領域情報に基づき、部分画像座標PCBを全体画像座標CBに変換する。そして、測定部25は、全体画像座標CAと全体画像座標CBとの間の距離IDhをたとえばピクセル単位で算出する。   FIG. 11 is a diagram illustrating an example of an image including the center of gravity obtained by the measurement unit according to the present embodiment. As shown in FIG. 11, the measuring unit 25 converts the partial image coordinates PCA into the whole image coordinates CA based on the first area information received from the partial image adjusting unit 23. In addition, the measurement unit 25 converts the partial image coordinates PCB into the whole image coordinates CB based on the second area information received from the partial image adjustment unit 23. Then, the measuring unit 25 calculates the distance IDh between the entire image coordinates CA and the entire image coordinates CB, for example, in pixel units.

本実施形態では、測定部25は、たとえば、距離IDhと距離Dvとの関係を示す近似式を保持しており、近似式を用いて距離IDhから距離Dvを算出する。近似式は、たとえば多項式によって距離IDhと距離Dvとの関係を近似する。詳細には、予め測定された距離Dvに位置する測定対象面33Aが撮像され、撮像結果に基づき距離IDhが算出される。これにより、距離IDhと距離Dvとのデータ組が得られる。近似式は、距離Dvを変えながら取得された複数のデータ組に基づき作成される。本実施形態では、近似式を複数回算出し、近似式の収束率が信頼度95%になるまで近似式の算出が複数回行われる。なお、測定部25は、近似式の代わりに、たとえば、複数の距離IDhと当該複数の距離Dvとの対応関係を示すテーブルを用いてもよい。   In the present embodiment, for example, the measurement unit 25 holds an approximate expression indicating the relationship between the distance IDh and the distance Dv, and calculates the distance Dv from the distance IDh using the approximate expression. The approximate expression approximates the relationship between the distance IDh and the distance Dv by, for example, a polynomial. Specifically, the measurement target surface 33A located at the distance Dv measured in advance is imaged, and the distance IDh is calculated based on the imaging result. Thereby, a data set of the distance IDh and the distance Dv is obtained. The approximate expression is created based on a plurality of data sets obtained while changing the distance Dv. In this embodiment, the approximate expression is calculated a plurality of times, and the calculation of the approximate expression is performed a plurality of times until the convergence rate of the approximate expression becomes 95% reliability. Note that the measurement unit 25 may use, for example, a table indicating the correspondence between the plurality of distances IDh and the plurality of distances Dv instead of the approximate expression.

測定部25は、全体画像座標CA及び全体画像座標CBに基づき、測定対象面33Aが正反射面MRSに対して光源側及び非光源側のいずれに位置するかを判定する。測定部25は、測定対象面33Aが正反射面MRSに対して光源側に位置すると判定した場合、交点CSから二等分線Bisに沿って光源側に距離Dv離れた位置を測定対象面33Aの位置として算出する。一方、測定部25は、測定対象面33Aが正反射面MRSに対して非光源側に位置すると判定した場合、交点CSから二等分線Bisに沿って非光源側に距離Dv離れた位置を測定対象面33Aの位置として算出する。測定部25は、測定対象面33Aの位置を示す位置情報をマーキング部32へ出力する。   The measurement unit 25 determines whether the measurement target surface 33A is located on the light source side or the non-light source side with respect to the regular reflection surface MRS based on the whole image coordinates CA and the whole image coordinates CB. When the measurement unit 25 determines that the measurement target surface 33A is located on the light source side with respect to the regular reflection surface MRS, the measurement unit 25 determines the position separated from the intersection CS by a distance Dv toward the light source along the bisector Bis to the measurement target surface 33A. Is calculated. On the other hand, when the measurement unit 25 determines that the measurement target surface 33A is located on the non-light source side with respect to the specular reflection surface MRS, the measurement unit 25 determines a position that is a distance Dv away from the intersection CS along the bisector Bis toward the non-light source. It is calculated as the position of the measurement target surface 33A. The measurement unit 25 outputs position information indicating the position of the measurement target surface 33A to the marking unit 32.

<マーキング部32>
図1に示されるように、マーキング部32は、測定装置1における画像分析部13によって測定された結果に基づき、対象物33における測定対象面33Aにレーザマーキングを行う。本実施形態では、マーキング部32は、たとえば、測定対象面33Aにおいて、ドット単位でマーキングをおこなう。詳細には、マーキング部32は、たとえば、測定対象面33Aにおける対象のドットMDに対するマーキングを行う場合、測定命令を制御部14へ出力し、測定命令に対する結果である位置情報を画像分析部13から受ける。マーキング部32は、受けた位置情報に基づきワーク距離を取得し、取得したワーク距離に基づきマーキング用のレーザの集光位置を調整する。そして、マーキング部32は、マーキング用のレーザを発振させてドットMDをマーキングする。
<Marking part 32>
As shown in FIG. 1, the marking unit 32 performs laser marking on the measurement target surface 33 </ b> A of the target 33 based on the result measured by the image analysis unit 13 in the measurement device 1. In the present embodiment, for example, the marking unit 32 performs marking in dot units on the measurement target surface 33A. In detail, for example, when marking is performed on the target dot MD on the measurement target surface 33A, the marking unit 32 outputs a measurement command to the control unit 14 and transmits position information that is a result of the measurement command from the image analysis unit 13. receive. The marking unit 32 acquires the work distance based on the received position information, and adjusts the focusing position of the marking laser based on the acquired work distance. The marking section 32 oscillates a marking laser to mark the dots MD.

<(2)動作例>
<レーザマーキング装置における全体動作>
次に、本実施形態のレーザマーキング装置におけるマーキング処理について、図12を参照しながら説明する。図12は、本実施形態のレーザマーキング装置におけるマーキング処理を示すフローチャートである。
<(2) Operation example>
<Overall operation of laser marking device>
Next, a marking process in the laser marking device of the present embodiment will be described with reference to FIG. FIG. 12 is a flowchart illustrating a marking process in the laser marking device of the present embodiment.

<S100>
マーキング部32が対象のドットMDのマーキングを行う場合において、マーキング部32が測定命令を制御部14へ出力した状況を想定する。制御部14は、マーキング部32から測定命令を受けると、期間PA及び期間PBを設定する(S100)。
<S100>
It is assumed that the marking unit 32 outputs a measurement command to the control unit 14 when the marking unit 32 performs marking of the target dot MD. When receiving the measurement command from the marking unit 32, the control unit 14 sets a period PA and a period PB (S100).

<S102>
次に、制御部14は、期間PAにおいてレーザ光源11Aに対してレーザ光LAを照射させるとともに、オン情報SAを画像分析部13へ出力する(S102)。
<S102>
Next, the control unit 14 irradiates the laser light source LA with the laser light LA during the period PA, and outputs the ON information SA to the image analysis unit 13 (S102).

<S104>
次に、画像分析部13は、制御部14からオン情報SAを受けると、イメージISAの座標算出処理を行う(S104)。イメージISAの座標算出処理の詳細については後述する。
<S104>
Next, upon receiving the ON information SA from the control unit 14, the image analysis unit 13 performs a coordinate calculation process of the image ISA (S104). The details of the image ISA coordinate calculation process will be described later.

<S106>
次に、制御部14は、期間PAの終了タイミングにおいて、レーザ光源11Aに対してレーザ光LAの照射を停止させる(S106)。
<S106>
Next, the control unit 14 causes the laser light source 11A to stop emitting the laser beam LA at the end timing of the period PA (S106).

<S108>
次に、制御部14は、期間PBにおいてレーザ光源11Bに対してレーザ光LBを照射させるとともに、オン情報SBを画像分析部13へ出力する(S108)。
<S108>
Next, the control unit 14 irradiates the laser light source 11B with the laser light LB during the period PB, and outputs the ON information SB to the image analysis unit 13 (S108).

<S110>
次に、画像分析部13は、制御部14からオン情報SBを受けると、イメージISBの座標算出処理を行う(S110)。イメージISBの座標算出処理の詳細については後述する。
<S110>
Next, upon receiving the ON information SB from the control unit 14, the image analysis unit 13 performs a coordinate calculation process of the image ISB (S110). Details of the coordinate calculation processing of the image ISB will be described later.

<S112>
次に、制御部14は、期間PBの終了タイミングにおいて、レーザ光源11Bに対してレーザ光LBの照射を停止させる(S112)。
<S112>
Next, the control unit 14 causes the laser light source 11B to stop emitting the laser light LB at the end timing of the period PB (S112).

<S114>
次に、画像分析部13は、イメージISAの全体画像座標CA及びイメージISBの全体画像座標CBから距離IDhを算出する(S114)。
<S114>
Next, the image analysis unit 13 calculates the distance IDh from the entire image coordinates CA of the image ISA and the entire image coordinates CB of the image ISB (S114).

<S116>
次に、画像分析部13は、距離IDhと距離Dvとの関係を示す近似式を用いて、距離IDhに基づき距離Dvを算出する(S116)。
<S116>
Next, the image analysis unit 13 calculates the distance Dv based on the distance IDh using an approximate expression indicating the relationship between the distance IDh and the distance Dv (S116).

<S118>
次に、画像分析部13は、全体画像座標CA及びイメージISBに基づき、イメージISAがイメージISBに対して左側に位置するか否かを判定する(S118)。
<S118>
Next, the image analysis unit 13 determines whether the image ISA is located on the left side of the image ISB based on the entire image coordinates CA and the image ISB (S118).

<S120>
次に、画像分析部13は、イメージISAがイメージISBに対して左側に位置する場合(S118でYES)、測定対象面33Aが正反射面MRSに対して光源側に位置すると判定する(S120)。
<S120>
Next, when the image ISA is located on the left side of the image ISB (YES in S118), the image analysis unit 13 determines that the measurement target surface 33A is located on the light source side with respect to the regular reflection surface MRS (S120). .

<S122>
一方、画像分析部13は、イメージISAがイメージISBに対して右側に位置する場合(S118でNO)、測定対象面33Aが正反射面MRSに対して非光源側に位置すると判定する(S122)。
<S122>
On the other hand, when the image ISA is located on the right side of the image ISB (NO in S118), the image analysis unit 13 determines that the measurement target surface 33A is located on the non-light source side with respect to the regular reflection surface MRS (S122). .

<S124>
次に、画像分析部13は、算出した距離Dv及び判定結果に基づき測定対象面33Aの位置を算出し、算出結果を含む位置情報をマーキング部32へ出力する(S124)。
<S124>
Next, the image analysis unit 13 calculates the position of the measurement target surface 33A based on the calculated distance Dv and the determination result, and outputs position information including the calculation result to the marking unit 32 (S124).

<S126>
次に、マーキング部32は、画像分析部13から位置情報を受けると、受けた位置情報に基づきマーキング用のレーザの集光位置を調整し、マーキング用のレーザを発振させて対象のドットMDをマーキングする(S126)。
<S126>
Next, when receiving the position information from the image analysis unit 13, the marking unit 32 adjusts the focusing position of the marking laser based on the received position information, oscillates the marking laser, and changes the target dot MD. Marking is performed (S126).

<S128>
次に、マーキング部32によって対象のドットMDのマーキングが完了すると、レーザマーキング装置31におけるマーキング処理が終了する(S128)。
<S128>
Next, when the marking of the target dot MD is completed by the marking unit 32, the marking process in the laser marking device 31 ends (S128).

なお、上記フローチャートにおける各処理は、動作に影響がない範囲で入れ換えられてもよい。たとえば、上記フローチャートにおけるS102〜S106とS108〜S112との処理の順序は入れ換えられてもよい。また、上記フローチャートにおけるS114〜S116とS118〜S122との処理の順序は入れ換えられてもよい。   In addition, each process in the above-described flowchart may be replaced within a range that does not affect the operation. For example, the order of the processes of S102 to S106 and S108 to S112 in the above flowchart may be interchanged. Further, the order of the processes of S114 to S116 and S118 to S122 in the above flowchart may be interchanged.

<イメージISAの座標算出処理>
次に、本実施形態のレーザマーキング装置におけるイメージISAの座標算出処理について、図13を参照しながら説明する。図13は、本実施形態のレーザマーキング装置におけるイメージISAの座標算出処理を示すフローチャートである。図13は、図12のステップS104における動作の詳細を示している。
<Image ISA coordinate calculation process>
Next, a coordinate calculation process of the image ISA in the laser marking device of the present embodiment will be described with reference to FIG. FIG. 13 is a flowchart illustrating a coordinate calculation process of the image ISA in the laser marking device of the present embodiment. FIG. 13 shows details of the operation in step S104 in FIG.

<S200〜S202>
画像分析部13における全体画像調整部21は、制御部14からオン情報SAを受けると(S200)、撮像領域及び露光時間としてそれぞれ全範囲及び初期値ETAを含む撮像命令をカメラ12へ出力する(S202)。
<S200 to S202>
Upon receiving the ON information SA from the control unit 14 (S200), the overall image adjustment unit 21 in the image analysis unit 13 outputs an imaging command including the entire range and the initial value ETA as the imaging area and the exposure time to the camera 12 ( S202).

<S204>
次に、カメラ12は、撮像命令を全体画像調整部21から受けると、撮像命令に含まれる撮像領域及び露光時間で測定対象面33Aの輝点SAを撮像し、撮像結果に基づき、輝点SAのイメージISAを含む画像IAを生成する。カメラ12は、生成した画像IAを含む画像情報を全体画像調整部21へ出力する(S204)。
<S204>
Next, when the camera 12 receives the imaging command from the entire image adjustment unit 21, the camera 12 captures an image of the bright spot SA on the measurement target surface 33A with the imaging area and the exposure time included in the imaging command, and based on the imaging result, the bright spot SA Generate an image IA that includes the image ISA of the image. The camera 12 outputs image information including the generated image IA to the whole image adjustment unit 21 (S204).

<S206>
次に、全体画像調整部21は、画像情報をカメラ12から受けると、画像情報に基づき最大画素PEAを特定し、最大画素PEAの画素値が範囲MaxAに含まれるか否かを判定する(S206)。全体画像調整部21は、最大画素PEAの画素値が範囲MaxAに含まれない場合(S206でNO)、最大画素PEAの画素値が範囲MaxAに含まれるようにカメラ12の露光時間を変更する(S202)。
<S206>
Next, when receiving the image information from the camera 12, the overall image adjustment unit 21 specifies the maximum pixel PEA based on the image information and determines whether or not the pixel value of the maximum pixel PEA is included in the range MaxA (S206). ). When the pixel value of the maximum pixel PEA is not included in the range MaxA (NO in S206), the entire image adjustment unit 21 changes the exposure time of the camera 12 so that the pixel value of the maximum pixel PEA is included in the range MaxA ( S202).

<S208>
一方、全体画像調整部21は、最大画素PEAの画素値が範囲MaxAに含まれる場合(S206でYES)、第1の設定画像を含む画像情報を領域設定部22へ出力する。領域設定部22は、画像情報を全体画像調整部21から受けると、画像情報に基づき最大画素PEAの全体画像座標を取得する(S208)。
<S208>
On the other hand, when the pixel value of the maximum pixel PEA is included in the range MaxA (YES in S206), the entire image adjustment unit 21 outputs image information including the first setting image to the region setting unit 22. Upon receiving the image information from the entire image adjustment unit 21, the area setting unit 22 acquires the entire image coordinates of the maximum pixel PEA based on the image information (S208).

<S210>
次に、領域設定部22は、最大画素PEAの全体画像座標に基づき、最大画素PEAを中心とし、所定のサイズを有する矩形の領域RAを設定し、領域RAの四隅の全体画像座標を含む第1の領域情報を部分画像調整部23へ出力する(S210)。
<S210>
Next, the area setting unit 22 sets a rectangular area RA having a predetermined size around the maximum pixel PEA based on the entire image coordinates of the maximum pixel PEA, and includes a fourth area including the entire image coordinates of the four corners of the area RA. 1 is output to the partial image adjustment unit 23 (S210).

<S212>
次に、部分画像調整部23は、第1の領域情報を領域設定部22から受けると、撮像領域及び露光時間としてそれぞれ第1の領域情報及び初期値ETRAを含む撮像命令をカメラ12へ出力する(S212)。
<S212>
Next, when receiving the first region information from the region setting unit 22, the partial image adjustment unit 23 outputs an imaging command including the first region information and the initial value ETRA as the imaging region and the exposure time to the camera 12, respectively. (S212).

<S214>
次に、カメラ12は、撮像命令を部分画像調整部23から受けると、撮像命令に含まれる撮像領域及び露光時間で測定対象面33Aの輝点SAを撮像し、撮像結果に基づき部分画像PIAを生成する。カメラ12は、生成した部分画像PIAを含む画像情報を部分画像調整部23へ出力する(S214)。
<S214>
Next, when the camera 12 receives the imaging command from the partial image adjustment unit 23, the camera 12 captures an image of the bright spot SA on the measurement target surface 33A using the imaging region and the exposure time included in the imaging command, and converts the partial image PIA based on the imaging result. Generate. The camera 12 outputs image information including the generated partial image PIA to the partial image adjustment unit 23 (S214).

<S216>
次に、部分画像調整部23は、画像情報をカメラ12から受けると、画像情報に基づき、部分画像PIAに含まれる画素の画素値の平均値を算出する(S216)。
<S216>
Next, when receiving the image information from the camera 12, the partial image adjustment unit 23 calculates the average value of the pixel values of the pixels included in the partial image PIA based on the image information (S216).

<S218>
次に、部分画像調整部23は、平均値が範囲AveAに含まれるか否かを判定する(S218)。部分画像調整部23は、平均値が範囲AveAに含まれない場合(S218でNO)、平均値が範囲AveAに含まれるようにカメラ12の露光時間を変更する(S212)。
<S218>
Next, the partial image adjustment unit 23 determines whether or not the average value is included in the range AveA (S218). When the average value is not included in the range AveA (NO in S218), the partial image adjustment unit 23 changes the exposure time of the camera 12 so that the average value is included in the range AveA (S212).

<S220>
一方、部分画像調整部23は、平均値が範囲AveAに含まれる場合(S218でYES)、部分画像PIAを含む第1の部分画像情報を処理部24へ出力するとともに第1の領域情報を測定部25へ出力する。処理部24は、第1の部分画像情報を部分画像調整部23から受けると、第1の部分画像情報に含まれる部分画像PIAに対して2値化処理、収縮処理及び膨張処理を行い、処理後の部分画像PIAを含む第1の処理済画像情報を測定部25へ出力する(S220)。
<S220>
On the other hand, when the average value is included in the range AveA (YES in S218), the partial image adjustment unit 23 outputs the first partial image information including the partial image PIA to the processing unit 24 and measures the first area information. Output to the unit 25. When the processing unit 24 receives the first partial image information from the partial image adjustment unit 23, the processing unit 24 performs a binarization process, a contraction process, and an expansion process on the partial image PIA included in the first partial image information. The first processed image information including the subsequent partial image PIA is output to the measurement unit 25 (S220).

<S222>
次に、測定部25は、第1の処理済画像情報を処理部24から受けると、受けた第1の処理済画像情報に基づき、部分画像PIAに含まれる画素の重心の部分画像座標PCAを算出する。そして、測定部25は、部分画像調整部23から受ける第1の領域情報に基づき、部分画像座標PCAを全体画像座標CAに変換する(S222)。
<S222>
Next, when receiving the first processed image information from the processing unit 24, the measuring unit 25 calculates the partial image coordinates PCA of the center of gravity of the pixels included in the partial image PIA based on the received first processed image information. calculate. Then, the measuring unit 25 converts the partial image coordinates PCA into the whole image coordinates CA based on the first area information received from the partial image adjusting unit 23 (S222).

<S224>
このようにして算出された全体画像座標CAが、イメージISAの座標として決定される(S224)。
<S224>
The overall image coordinates CA calculated in this way are determined as the coordinates of the image ISA (S224).

<イメージISBの座標算出処理>
次に、本実施形態のレーザマーキング装置におけるイメージISBの座標算出処理について、図14を参照しながら説明する。図14は、本実施形態のレーザマーキング装置におけるイメージISBの座標算出処理を示すフローチャートである。図14は、図12のステップS110における動作の詳細を示している。
<Image ISB coordinate calculation process>
Next, a coordinate calculation process of the image ISB in the laser marking device of the present embodiment will be described with reference to FIG. FIG. 14 is a flowchart illustrating a coordinate calculation process of the image ISB in the laser marking device of the present embodiment. FIG. 14 shows details of the operation in step S110 in FIG.

<S300〜S302>
画像分析部13における全体画像調整部21は、制御部14からオン情報SBを受けると(S300)、撮像領域及び露光時間としてそれぞれ全範囲及び初期値ETBを含む撮像命令をカメラ12へ出力する(S302)。
<S300 to S302>
Upon receiving the ON information SB from the control unit 14 (S300), the overall image adjustment unit 21 in the image analysis unit 13 outputs to the camera 12 an imaging command including the entire range and the initial value ETB as the imaging region and the exposure time, respectively ( S302).

<S304>
次に、カメラ12は、撮像命令を全体画像調整部21から受けると、撮像命令に含まれる撮像領域及び露光時間で測定対象面33Aの輝点SBを撮像し、撮像結果に基づき、輝点SBのイメージISBを含む画像IBを生成する。カメラ12は、生成した画像IBを含む画像情報を全体画像調整部21へ出力する(S304)。
<S304>
Next, when the camera 12 receives the imaging command from the entire image adjustment unit 21, the camera 12 captures an image of the bright spot SB on the measurement target surface 33A using the imaging area and the exposure time included in the imaging command, and based on the imaging result, the bright spot SB An image IB including the image ISB is generated. The camera 12 outputs the image information including the generated image IB to the whole image adjustment unit 21 (S304).

<S306>
次に、全体画像調整部21は、画像情報をカメラ12から受けると、画像情報に基づき最大画素PEBを特定し、最大画素PEBの画素値が範囲MaxBに含まれるか否かを判定する(S306)。全体画像調整部21は、最大画素PEBの画素値が範囲MaxBに含まれない場合(S306でNO)、最大画素PEBの画素値が範囲MaxBに含まれるようにカメラ12の露光時間を変更する(S302)。
<S306>
Next, when receiving the image information from the camera 12, the overall image adjustment unit 21 specifies the maximum pixel PEB based on the image information, and determines whether or not the pixel value of the maximum pixel PEB is included in the range MaxB (S306). ). If the pixel value of the maximum pixel PEB is not included in the range MaxB (NO in S306), the entire image adjustment unit 21 changes the exposure time of the camera 12 so that the pixel value of the maximum pixel PEB is included in the range MaxB ( S302).

<S308>
一方、全体画像調整部21は、最大画素PEBの画素値が範囲MaxBに含まれる場合(S306でYES)、第2の設定画像を含む画像情報を領域設定部22へ出力する。領域設定部22は、画像情報を全体画像調整部21から受けると、画像情報に基づき最大画素PEBの全体画像座標を取得する(S308)。
<S308>
On the other hand, when the pixel value of the maximum pixel PEB is included in the range MaxB (YES in S306), the entire image adjustment unit 21 outputs image information including the second setting image to the region setting unit 22. Upon receiving the image information from the entire image adjustment unit 21, the area setting unit 22 acquires the entire image coordinates of the maximum pixel PEB based on the image information (S308).

<S310>
次に、領域設定部22は、最大画素PEBの全体画像座標に基づき、最大画素PEBを中心とし、所定のサイズを有する矩形の領域RBを設定し、領域RBの四隅の全体画像座標を含む第2の領域情報を部分画像調整部23へ出力する(S310)。
<S310>
Next, the region setting unit 22 sets a rectangular region RB having a predetermined size centered on the maximum pixel PEB based on the entire image coordinates of the maximum pixel PEB, and includes a fourth region including the entire image coordinates of the four corners of the region RB. The second area information is output to the partial image adjustment unit 23 (S310).

<S312>
次に、部分画像調整部23は、第2の領域情報を領域設定部22から受けると、撮像領域及び露光時間としてそれぞれ第2の領域情報及び初期値ETRBを含む撮像命令をカメラ12へ出力する(S312)。
<S312>
Next, when receiving the second region information from the region setting unit 22, the partial image adjustment unit 23 outputs an imaging command including the second region information and the initial value ETRB as the imaging region and the exposure time to the camera 12, respectively. (S312).

<S314>
次に、カメラ12は、撮像命令を部分画像調整部23から受けると、撮像命令に含まれる撮像領域及び露光時間で測定対象面33Aの輝点SBを撮像し、撮像結果に基づき部分画像PIBを生成する。カメラ12は、生成した部分画像PIBを含む画像情報を部分画像調整部23へ出力する(S314)。
<S314>
Next, when the camera 12 receives the imaging command from the partial image adjustment unit 23, the camera 12 captures an image of the bright spot SB on the measurement target surface 33A using the imaging region and the exposure time included in the imaging command, and generates a partial image PIB based on the imaging result. Generate. The camera 12 outputs image information including the generated partial image PIB to the partial image adjustment unit 23 (S314).

<S316>
次に、部分画像調整部23は、画像情報をカメラ12から受けると、画像情報に基づき、部分画像PIBに含まれる画素の画素値の平均値を算出する(S316)。
<S316>
Next, when receiving the image information from the camera 12, the partial image adjustment unit 23 calculates the average value of the pixel values of the pixels included in the partial image PIB based on the image information (S316).

<S318>
次に、部分画像調整部23は、平均値が範囲AveBに含まれるか否かを判定する(S318)。部分画像調整部23は、平均値が範囲AveBに含まれない場合(S318でNO)、平均値が範囲AveBに含まれるようにカメラ12の露光時間を変更する(S312)。
<S318>
Next, the partial image adjustment unit 23 determines whether or not the average value is included in the range AveB (S318). When the average value is not included in the range AveB (NO in S318), the partial image adjustment unit 23 changes the exposure time of the camera 12 so that the average value is included in the range AveB (S312).

<S320>
一方、部分画像調整部23は、平均値が範囲AveBに含まれる場合(S318でYES)、部分画像PIBを含む第2の部分画像情報を処理部24へ出力するとともに第2の領域情報を測定部25へ出力する。処理部24は、第2の部分画像情報を部分画像調整部23から受けると、第2の部分画像情報に含まれる部分画像PIBに対して2値化処理、収縮処理及び膨張処理を行い、処理後の部分画像PIBを含む第2の処理済画像情報を測定部25へ出力する(S320)。
<S320>
On the other hand, when the average value is included in the range AveB (YES in S318), the partial image adjustment unit 23 outputs the second partial image information including the partial image PIB to the processing unit 24 and measures the second area information. Output to the unit 25. When receiving the second partial image information from the partial image adjustment unit 23, the processing unit 24 performs a binarization process, a contraction process, and an expansion process on the partial image PIB included in the second partial image information, and The second processed image information including the subsequent partial image PIB is output to the measuring unit 25 (S320).

<S322>
次に、測定部25は、第2の処理済画像情報を処理部24から受けると、受けた第2の処理済画像情報に基づき、部分画像PIBに含まれる画素の重心の部分画像座標PCBを算出する。そして、測定部25は、部分画像調整部23から受ける第2の領域情報に基づき、部分画像座標PCBを全体画像座標CBに変換する(S322)。
<S322>
Next, when receiving the second processed image information from the processing unit 24, the measuring unit 25 calculates the partial image coordinates PCB of the center of gravity of the pixels included in the partial image PIB based on the received second processed image information. calculate. Then, the measuring unit 25 converts the partial image coordinates PCB into the whole image coordinates CB based on the second area information received from the partial image adjusting unit 23 (S322).

<S324>
このようにして算出された全体画像座標CBが、イメージISBの座標として決定される(S324)。
<S324>
The overall image coordinates CB calculated in this way are determined as the coordinates of the image ISB (S324).

<2.本発明の特徴>
上記構成の測定装置によれば、最大画素PEAの画素値が範囲MaxAに含まれるように第1の撮像設定が行われることで、画像IAにおける輝点SAのイメージを構成する複数の画素の画素値を一定の範囲内に収めることができる。これにより、対象物33の材質が変化して輝点SAの明るさが変化する場合においても、画像IAにおいて輝点SAのイメージを良好に描画することができるので、領域RAを適切に設定することができる。そして、領域RAに含まれる部分画像PIAが処理部24において処理されることで、画像処理のデータ量を削減することができるので、処理負荷を低減し、処理時間を短くすることができる。また、たとえば、2値化処理、収縮処理及び膨張処理などの画像における輝点のイメージの位置を精度よく測定するための画像処理を部分画像PIAに対して行うことで、画像IAにおける輝点SAのイメージの位置を精度よく測定することができる。これにより、対象物33の位置の測定精度を向上させることができる。
<2. Features of the present invention>
According to the measuring device having the above configuration, the first imaging setting is performed so that the pixel value of the maximum pixel PEA is included in the range MaxA, and thus the pixels of the plurality of pixels forming the image of the bright spot SA in the image IA The value can be within a certain range. Thereby, even when the material of the target 33 changes and the brightness of the bright spot SA changes, the image of the bright spot SA can be drawn well in the image IA, so that the area RA is appropriately set. be able to. Then, since the partial image PIA included in the area RA is processed by the processing unit 24, the data amount of the image processing can be reduced, so that the processing load can be reduced and the processing time can be shortened. Also, for example, by performing image processing for accurately measuring the position of the image of the bright spot in the image, such as binarization processing, contraction processing, and expansion processing, on the partial image PIA, the bright spot SA in the image IA is obtained. Can be accurately measured. Thereby, the measurement accuracy of the position of the target 33 can be improved.

上記構成の測定装置では、カメラ12が、輝点SAを撮像して部分画像PIAを生成し、部分画像調整部23が、部分画像PIAに含まれる画素の画素値の統計値たとえば平均値が範囲AveAに含まれるように第2の撮像設定を行い、処理部24が、第2の撮像設定が行われた部分画像PIAを処理する。これにより、たとえば、カメラ12の撮像範囲を領域RAに対応する範囲に縮小することができるので、カメラ12における部分画像PIAの生成に要する時間を短縮することができる。また、部分画像PIAにおける輝点SAのイメージの輪郭部分を良好に描画することができるので、たとえば、対象物33の材質が変化して輝点SAの明るさが変化する場合においても、部分画像PIAにおける輝点SAのイメージの形状のばらつきを抑制することができる。   In the measuring device having the above configuration, the camera 12 captures the bright spot SA to generate the partial image PIA, and the partial image adjustment unit 23 determines that the statistical value of the pixel value of the pixel included in the partial image PIA, for example, the average value is within the range. The second imaging setting is performed so as to be included in AveA, and the processing unit 24 processes the partial image PIA for which the second imaging setting has been performed. Thereby, for example, since the imaging range of the camera 12 can be reduced to a range corresponding to the area RA, the time required for the camera 12 to generate the partial image PIA can be reduced. In addition, since the outline of the image of the bright spot SA in the partial image PIA can be drawn well, for example, even when the material of the object 33 changes and the brightness of the bright spot SA changes, the partial image Variations in the shape of the image of the bright spot SA in the PIA can be suppressed.

上記構成の測定装置では、測定部25が、処理後の部分画像PIAに含まれる画素の重心の全体画像座標CAに基づき、対象物33の位置を測定するため、輝点SAのイメージを構成する複数の画素の画素値の分布に基づき重心の全体画像座標CAを決定することができる。これにより、たとえば、輝点SAのイメージが部分画像PIAの中心からずれた場合においても、輝点SAの全体画像座標CAを正しく算出することができるので、対象物33の位置の測定精度を向上させることができる。   In the measuring device having the above configuration, the measuring unit 25 configures the image of the bright spot SA to measure the position of the target 33 based on the entire image coordinates CA of the center of gravity of the pixels included in the processed partial image PIA. The whole image coordinates CA of the center of gravity can be determined based on the distribution of the pixel values of the plurality of pixels. Thereby, for example, even when the image of the bright spot SA is shifted from the center of the partial image PIA, the entire image coordinates CA of the bright spot SA can be correctly calculated, so that the measurement accuracy of the position of the target 33 is improved. Can be done.

上記構成の測定装置では、所定の条件CMAが、検知範囲における最大の画素値を有することであるため、画像IAにおける輝点SAを構成する複数の画素の画素値の最大値を範囲MaxA内に収めることができるので、画素値の上限値たとえば255に達した画素の発生を抑制することができる。   In the measuring device having the above configuration, since the predetermined condition CMA is to have the maximum pixel value in the detection range, the maximum value of the pixel values of a plurality of pixels constituting the bright spot SA in the image IA is set in the range MaxA. Since it can be accommodated, it is possible to suppress the occurrence of pixels that have reached the upper limit of the pixel value, for example, 255.

上記構成の測定装置では、第1の撮像設定が、カメラ12における露光時間を設定することであるため、たとえば、レーザ光LAの強度の調整、またはレーザ光LAへのフィルタ挿入などと比べて、最大画素PEAの画素値を範囲MaxAに含める第1の撮像設定を簡易に実現することができる。   In the measuring device having the above configuration, the first imaging setting is to set the exposure time in the camera 12, so that, for example, compared with adjusting the intensity of the laser light LA or inserting a filter into the laser light LA, The first imaging setting in which the pixel value of the maximum pixel PEA is included in the range MaxA can be easily realized.

上記構成の測定装置では、第2の撮像設定が、カメラ12における露光時間を設定することであるため、たとえば、レーザ光LAの強度の調整、またはレーザ光LAへのフィルタ挿入などと比べて、部分画像PIAに含まれる画素の画素値の平均値を範囲AveAに含める第2の撮像設定を簡易に実現することができる。   In the measuring device having the above configuration, since the second imaging setting is to set the exposure time in the camera 12, for example, compared with adjusting the intensity of the laser light LA or inserting a filter into the laser light LA, The second imaging setting in which the average value of the pixel values of the pixels included in the partial image PIA is included in the range AveA can be easily realized.

上記構成の測定装置では、レーザ光源11Bが、レーザ光LBを対象物33に照射し、カメラ12が、対象物33におけるレーザ光LBの輝点SBを撮像し、輝点SBを含む画像IBを生成する。そして、全体画像調整部21が、輝点SBのイメージを構成する複数の画素のうち条件CMBを満たす画素である最大画素PEBの画素値が範囲MaxBに含まれるように第3の撮像設定を行う。そして、領域設定部22が、第3の撮像設定が行われた画像IBに含まれる最大画素PEBに基づき、画像IBの一部を含む領域であって輝点SBを含む領域RBを設定し、処理部24が、領域RBに含まれる画像である部分画像PIBを処理する。そして、測定部25が、処理後の部分画像PIA及び処理後の部分画像PIBに基づき、対象物33の位置を測定する。これにより、たとえば、輝点SA近傍のレーザ光LAの反射率と輝点SB近傍のレーザ光LBの反射率とが異なる場合においても、画像IAにおける輝点SAの位置、及び画像IBにおける輝点SBの位置の両方を精度よく測定することができる。これにより、たとえば、レーザ光LA及びLBを対象物33に照射し、画像における輝点SAと輝点SBとの間の距離IDhに基づき対象物33の位置を測定する構成において、対象物33の位置の測定精度を向上させることができる。   In the measuring device having the above configuration, the laser light source 11B irradiates the target 33 with the laser light LB, the camera 12 captures an image of the bright spot SB of the laser light LB on the target 33, and generates an image IB including the bright spot SB. Generate. Then, the whole image adjustment unit 21 performs the third imaging setting so that the pixel value of the maximum pixel PEB, which is the pixel satisfying the condition CMB, is included in the range MaxB among the plurality of pixels forming the image of the bright spot SB. . Then, the region setting unit 22 sets a region RB including a part of the image IB and including the bright spot SB based on the maximum pixel PEB included in the image IB on which the third imaging setting has been performed, The processing unit 24 processes the partial image PIB which is an image included in the region RB. Then, the measuring unit 25 measures the position of the target 33 based on the processed partial image PIA and the processed partial image PIB. Thus, for example, even when the reflectance of the laser beam LA near the bright point SA and the reflectance of the laser beam LB near the bright point SB are different, the position of the bright point SA in the image IA and the bright point in the image IB Both of the SB positions can be measured with high accuracy. Thus, for example, in a configuration in which the laser beams LA and LB are applied to the target 33 and the position of the target 33 is measured based on the distance IDh between the bright points SA and SB in the image, Position measurement accuracy can be improved.

<3.補足事項>
以上、本発明の実施形態についての具体的な説明を行った。上記説明では、あくまで一実施形態としての説明であって、本発明の範囲はこの一実施形態に留まらず、当業者が把握可能な範囲にまで広く解釈されるものである。
<3. Supplementary items>
The specific description of the embodiment of the present invention has been given above. The above description is merely an example of the embodiment, and the scope of the present invention is not limited to this embodiment, but is widely interpreted to a range that can be understood by those skilled in the art.

本実施形態の測定装置では、レーザ光源11A及び11Bが設けられる構成について説明したが、測定装置1は、1つのレーザ光源が設けられる構成であってもよい。このような構成であっても、たとえば、特許文献1に記載のレーザマーカのように、画像における輝点のイメージの全体画像座標と距離Dvとの関係を示す近似式、または輝点のイメージの複数の全体画像座標と当該複数の距離Dvとの対応関係を示すテーブルを用いることで、対象物33の位置を測定することが可能である。   In the measuring device of the present embodiment, the configuration in which the laser light sources 11A and 11B are provided has been described, but the measuring device 1 may have a configuration in which one laser light source is provided. Even with such a configuration, for example, as in a laser marker described in Patent Literature 1, an approximate expression indicating the relationship between the entire image coordinates of a bright spot image in an image and the distance Dv, or a plurality of bright spot images It is possible to measure the position of the target 33 by using a table indicating the correspondence between the entire image coordinates of the above and the plurality of distances Dv.

また、本実施形態の測定装置では、レーザ光源11A及び11Bを照射部の一具体例として説明したが、照射部は、レーザ光を対象物33へ照射する構成であればよく、たとえば、レーザ光源からのレーザ光を反射して対象物33へ照射するミラー、および光ファイバーの出射口などであってもよい。   Further, in the measuring apparatus of the present embodiment, the laser light sources 11A and 11B have been described as a specific example of the irradiating unit. However, the irradiating unit may be configured to irradiate the target object 33 with laser light. A mirror that reflects the laser light from the mirror and irradiates the object 33 with the laser beam, an optical fiber exit port, or the like may be used.

また、本実施形態の測定装置では、レーザ光LA及びLBが、片方ずつ、タイミングをずらして対象物33へ照射される構成について説明したが、レーザ光LA及びLBが、同じタイミングで対象物33へ照射される構成であってもよい。この場合、たとえば、輝点SA及びSBのサイズ、明るさまたは色などの態様を互いに異ならせたり、レーザ光LA及びLBを交差させないで輝点SAが位置し得る範囲と輝点SBが位置し得る範囲とを互いに異ならせたりする。これにより、測定対象面33Aが正反射面MRSに対して光源側及び非光源側のいずれに位置するか判定することが可能となる。   Further, in the measurement apparatus of the present embodiment, the configuration has been described in which the laser beams LA and LB are irradiated on the target 33 one by one at a shifted timing, but the laser beams LA and LB are emitted at the same timing. May be applied. In this case, for example, the size, brightness or color of the bright spots SA and SB are made different from each other, or the range where the bright spot SA can be located without crossing the laser beams LA and LB and the bright spot SB are located. And the range to be obtained is different from each other. This makes it possible to determine whether the measurement target surface 33A is located on the light source side or the non-light source side with respect to the regular reflection surface MRS.

また、本実施形態の測定装置では、カメラ12が、領域RAまたはRBに対応する受光素子の部分を用いて撮像し、部分画像を生成する構成について説明したが、部分画像調整部23が、部分画像を生成する構成であってもよい。具体的には、カメラ12は、たとえば、受光素子の全面を用いて撮像して画像IAを生成し、画像IAを含む画像情報を部分画像調整部23へ出力する。部分画像調整部23は、カメラ12から画像情報を受けると、画像情報に含まれる画像IAから領域RAに含まれる部分画像PIAを切り出すことで、部分画像を生成する。しかしながら、カメラ12が画像IAまたはIBを生成する構成では撮像時間が長くなるため、カメラ12が部分画像PIAまたはPIBを生成する構成が好ましい。   Further, in the measurement apparatus of the present embodiment, the configuration has been described in which the camera 12 captures an image using the light receiving element portion corresponding to the region RA or RB and generates a partial image. A configuration for generating an image may be used. Specifically, for example, the camera 12 captures an image using the entire surface of the light receiving element to generate an image IA, and outputs image information including the image IA to the partial image adjustment unit 23. When receiving the image information from the camera 12, the partial image adjustment unit 23 generates a partial image by cutting out the partial image PIA included in the area RA from the image IA included in the image information. However, in the configuration in which the camera 12 generates the image IA or IB, the imaging time becomes long. Therefore, the configuration in which the camera 12 generates the partial image PIA or PIB is preferable.

また、本実施形態の測定装置では、カメラ12が、レーザ光LA及びLBの交差角を二等分する二等分線Bisに光軸が沿うように設けられると説明したが、カメラ12は、光軸が二等分線Bisから外れる位置に設けられる構成であってもよい。   Further, in the measuring device of the present embodiment, the camera 12 is described as being provided so that the optical axis is along a bisector Bis bisecting the intersection angle of the laser beams LA and LB. The optical axis may be provided at a position deviating from the bisector Bis.

また、本実施形態の測定装置では、処理部24が、部分画像に対して2値化処理、収縮処理及び膨張処理を行う構成について説明したが、処理部24は、2値化処理、収縮処理及び膨張処理のいずれか1つまたは2つを行う構成であってもよい。このように、部分画像における輝点の位置を精度よく測定するための画像処理を行うことで、たとえば、レーザ光のノイズ、及び対象物33の材質によって変化する輝点の形状などに基づく、重心の全体画像座標の算出誤差を抑制することができる。   Further, in the measurement apparatus according to the present embodiment, the configuration has been described in which the processing unit 24 performs the binarization processing, the contraction processing, and the expansion processing on the partial image, but the processing unit 24 performs the binarization processing, the contraction processing And any one or two of the expansion processing may be performed. As described above, by performing the image processing for accurately measuring the position of the bright spot in the partial image, the center of gravity based on the noise of the laser beam, the shape of the bright spot that changes depending on the material of the object 33, and the like can be obtained. The calculation error of the whole image coordinates can be suppressed.

また、本実施形態の測定装置では、処理部24が、第2の撮像設定が行われた部分画像を処理する構成について説明したが、処理部24は、第2の撮像設定が行われない部分画像を処理する構成であってもよい。しかしながら、第2の撮像設定が行われない場合、部分画像における輝点の輪郭部分の描画が荒くなるため、処理部24は、第2の撮像設定が行われた部分画像PIAを処理する構成が好ましい。   Further, in the measurement apparatus of the present embodiment, the configuration in which the processing unit 24 processes the partial image on which the second imaging setting has been performed has been described, but the processing unit 24 has a configuration in which the second imaging setting is not performed. A configuration for processing an image may be used. However, when the second imaging setting is not performed, the outline of the luminescent spot in the partial image is roughly drawn. Therefore, the processing unit 24 is configured to process the partial image PIA on which the second imaging setting is performed. preferable.

本発明の測定装置およびレーザマーキング装置は、たとえば、表面に凹凸がある対象物のマーキングに好適に適用される。   INDUSTRIAL APPLICABILITY The measuring device and the laser marking device of the present invention are suitably applied to, for example, marking of an object having an uneven surface.

1…測定装置
11A、11B…レーザ光源
12…カメラ
13…画像分析部
14…制御部
21…全体画像調整部
22…領域設定部
23…部分画像調整部
24…処理部
25…測定部
31…レーザマーキング装置
32…マーキング部
33…対象物
33A…測定対象面
Bis…二等分線
CS…交点
FR…撮影可能範囲
ISA、ISB…イメージ
LA、LB…レーザ光
MR…測定可能範囲
MRS…正反射面
MD…ドット
SA、SB…輝点
RA、RB…領域
IA、IB…画像
PIA、PIB…部分画像
PEA、PEB…最大画素
DESCRIPTION OF SYMBOLS 1 ... Measurement apparatus 11A, 11B ... Laser light source 12 ... Camera 13 ... Image analysis part 14 ... Control part 21 ... Whole image adjustment part 22 ... Area setting part 23 ... Partial image adjustment part 24 ... Processing part 25 ... Measurement part 31 ... Laser Marking device 32 ... Marking part 33 ... Target object 33A ... Measurement target surface Bi ... Bissant line CS ... Intersection FR ... Photographable range ISA, ISB ... Image LA, LB ... Laser beam MR ... Measureable range MRS ... Specular reflection surface MD: dots SA, SB: bright spots RA, RB: areas IA, IB: images PIA, PIB: partial images PEA, PEB: maximum pixels

Claims (10)

第1のレーザ光を対象物に照射する第1の照射部と、
前記対象物における前記第1のレーザ光の輝点である第1の輝点を撮像し、前記第1の輝点を含む第1の画像を生成する撮像部と、
前記第1の輝点を構成する複数の画素のうち所定の条件を満たす画素である第1の対象画素の画素値が所定の範囲に含まれるように第1の撮像設定を行う第1の撮像設定部と、
前記第1の撮像設定が行われた前記第1の画像に含まれる前記第1の対象画素に基づき、前記第1の画像の一部を含む領域であって前記第1の輝点を含む第1の領域を設定する領域設定部と、
前記第1の領域に含まれる画像である第1の部分画像を処理する処理部と、
処理後の前記第1の部分画像に基づき、前記対象物の位置を測定する測定部と、を備える、
測定装置。
A first irradiating unit that irradiates the first laser light to the object,
An imaging unit that captures an image of a first luminescent spot that is a luminescent spot of the first laser light on the object, and generates a first image including the first luminescent spot;
First imaging for performing first imaging setting so that a pixel value of a first target pixel which is a pixel satisfying a predetermined condition among a plurality of pixels constituting the first bright spot is included in a predetermined range. A setting section,
A region including a part of the first image and including the first luminescent spot, based on the first target pixel included in the first image on which the first imaging setting is performed; An area setting unit for setting an area 1;
A processing unit that processes a first partial image that is an image included in the first region;
A measurement unit that measures the position of the object based on the processed first partial image,
measuring device.
前記撮像部は、前記第1の輝点を撮像して前記第1の部分画像を生成し、
前記第1の部分画像に含まれる画素の画素値の統計値が所定の範囲に含まれるように第2の撮像設定を行う第2の撮像設定部をさらに備え、
前記処理部は、前記第2の撮像設定が行われた前記第1の部分画像を処理する、
請求項1に記載の測定装置。
The imaging unit captures the first luminescent spot to generate the first partial image,
A second imaging setting unit configured to perform a second imaging setting so that a statistical value of a pixel value of a pixel included in the first partial image is included in a predetermined range;
The processing unit processes the first partial image on which the second imaging setting is performed;
The measuring device according to claim 1.
前記測定部は、前記処理後の前記第1の部分画像に含まれる画素の重心の位置に基づき、前記対象物の位置を測定する、
請求項1または請求項2に記載の測定装置。
The measurement unit measures a position of the target object based on a position of a center of gravity of a pixel included in the processed first partial image.
The measuring device according to claim 1.
前記所定の条件は、検知範囲における最大の画素値を有することである、
請求項1から請求項3のいずれか1項に記載の測定装置。
The predetermined condition is to have a maximum pixel value in a detection range,
The measuring device according to claim 1.
前記処理部は、前記第1の部分画像に対して2値化処理、収縮処理及び膨張処理の少なくともいずれか1つを行う、
請求項1から請求項4のいずれか1項に記載の測定装置。
The processing unit performs at least one of a binarization process, a contraction process, and an expansion process on the first partial image;
The measuring device according to claim 1.
前記第1の撮像設定は、前記撮像部における露光時間を設定することである、
請求項1から請求項5のいずれか1項に記載の測定装置。
The first imaging setting is to set an exposure time in the imaging unit.
The measuring device according to claim 1.
前記第2の撮像設定は、前記撮像部における露光時間を設定することである、
請求項2に記載の測定装置。
The second imaging setting is to set an exposure time in the imaging unit.
The measurement device according to claim 2.
第2のレーザ光を前記対象物に照射する第2の照射部をさらに備え、
前記撮像部は、前記対象物における前記第2のレーザ光の輝点である第2の輝点を撮像し、前記第2の輝点を含む第2の画像をさらに生成し、
前記第1の撮像設定部は、前記第2の輝点を構成する複数の画素のうち所定の条件を満たす画素である第2の対象画素の画素値が所定の範囲に含まれるように第3の撮像設定をさらに行い、
前記領域設定部は、前記第3の撮像設定が行われた前記第2の画像に含まれる前記第2の対象画素に基づき、前記第2の画像の一部を含む領域であって前記第2の輝点を含む第2の領域をさらに設定し、
前記処理部は、前記第2の領域に含まれる画像である第2の部分画像をさらに処理し、
前記測定部は、前記処理後の前記第1の部分画像及び処理後の前記第2の部分画像に基づき、前記対象物の位置を測定する、
請求項1から請求項7のいずれか1項に記載の測定装置。
A second irradiation unit that irradiates the object with a second laser beam,
The imaging unit captures a second luminescent spot that is a luminescent spot of the second laser light on the object, and further generates a second image including the second luminescent spot,
The first imaging setting unit performs the third imaging so that a pixel value of a second target pixel that is a pixel satisfying a predetermined condition among a plurality of pixels forming the second bright spot is included in a predetermined range. Perform further imaging settings for
The area setting unit is an area including a part of the second image based on the second target pixel included in the second image on which the third imaging setting is performed, and And further setting a second area including a bright spot of
The processing unit further processes a second partial image that is an image included in the second area,
The measuring unit measures the position of the object based on the first partial image after the processing and the second partial image after the processing,
The measuring device according to any one of claims 1 to 7.
請求項1から請求項8のいずれか1項に記載の測定装置と、
前記測定装置によって測定された結果に基づき、対象物にレーザマーキングを行うマーキング部と、を備える、
レーザマーキング装置。
A measuring device according to any one of claims 1 to 8,
Based on the result measured by the measuring device, and a marking unit that performs laser marking on the object,
Laser marking device.
第1のレーザ光を対象物に照射する第1の照射部を備える測定装置における測定方法であって、
前記対象物における前記第1のレーザ光の輝点である第1の輝点を撮像し、前記第1の輝点を含む第1の画像を生成するステップと、
前記第1の輝点を構成する複数の画素のうち所定の条件を満たす画素である第1の対象画素の画素値が所定の範囲に含まれるように第1の撮像設定を行うステップと、
前記第1の撮像設定が行われた前記第1の画像に含まれる前記第1の対象画素に基づき、前記第1の画像の一部を含む領域であって前記第1の輝点を含む第1の領域を設定するステップと、
前記第1の領域に含まれる画像である第1の部分画像を処理するステップと、
処理後の前記第1の部分画像に基づき、前記対象物の位置を測定するステップと、を有する、
測定方法。
A measurement method in a measurement device including a first irradiation unit that irradiates a first laser beam to an object,
Imaging a first luminescent spot, which is a luminescent spot of the first laser light, on the object, and generating a first image including the first luminescent spot;
Performing a first imaging setting so that a pixel value of a first target pixel that is a pixel satisfying a predetermined condition among a plurality of pixels forming the first bright spot is included in a predetermined range;
A region including a part of the first image and including the first luminescent spot, based on the first target pixel included in the first image on which the first imaging setting is performed; Setting an area 1;
Processing a first partial image that is an image included in the first area;
Measuring the position of the object based on the processed first partial image,
Measuring method.
JP2018176895A 2018-09-21 2018-09-21 Measuring apparatus, laser marking device and measuring method Pending JP2020046381A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018176895A JP2020046381A (en) 2018-09-21 2018-09-21 Measuring apparatus, laser marking device and measuring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018176895A JP2020046381A (en) 2018-09-21 2018-09-21 Measuring apparatus, laser marking device and measuring method

Publications (1)

Publication Number Publication Date
JP2020046381A true JP2020046381A (en) 2020-03-26

Family

ID=69899595

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018176895A Pending JP2020046381A (en) 2018-09-21 2018-09-21 Measuring apparatus, laser marking device and measuring method

Country Status (1)

Country Link
JP (1) JP2020046381A (en)

Similar Documents

Publication Publication Date Title
US10764487B2 (en) Distance image acquisition apparatus and application thereof
KR100753885B1 (en) Image obtaining apparatus
US20190025048A1 (en) Three-dimensional measuring device
JP2002131016A (en) Apparatus and method of distance measurement
US9714829B2 (en) Information processing apparatus, assembly apparatus, information processing method, and storage medium that generate a measurement pattern having different amounts of irradiation light depending on imaging regions
JP2016525449A (en) Apparatus and method for detecting narrow groove of workpiece reflecting specularly
WO2022050279A1 (en) Three-dimensional measurement device
US9560250B2 (en) Information processing apparatus, measurement system, control system, light amount determination method and storage medium
JP2020046381A (en) Measuring apparatus, laser marking device and measuring method
CN116833550A (en) Laser control method and laser processing apparatus
CN110836647B (en) Three-dimensional scanning system
JP5136108B2 (en) 3D shape measuring method and 3D shape measuring apparatus
JP2018116032A (en) Measurement device for measuring shape of target measurement object
JP4973836B2 (en) Displacement sensor with automatic measurement area setting means
JP2011053025A (en) Distance measuring device and method of measuring distance
US10091404B2 (en) Illumination apparatus, imaging system, and illumination method
CN114235348A (en) Focal length determining method and device of pulse laser and storage medium
JP3897203B2 (en) Ball grid array ball height measurement method
JP6888429B2 (en) Pattern irradiation device, imaging system and handling system
JP2019090623A (en) Measuring apparatus, laser marking device, and measuring method
JP2019109125A (en) Measurement device, laser marking device, and measurement method
JP2020527291A (en) Sensor system for direct calibration of high power density lasers used in direct metal laser melting
JPH0560518A (en) Three-dimensional coordinate measurement device
US11754388B2 (en) Height measuring device, charged particle beam apparatus, and height measuring method
JP2014066669A (en) Measurement device and measurement method