Image capture condition adjustment device, image capture condition adjustment method, and program

JPWO2023008146A5Active Publication Date: 2025-06-26KONICA MINOLTA INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2023538397
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-07-08
Filing Date
2022-07-08
Publication Date
2025-06-26
Estimated Expiration
2042-07-08

AI Technical Summary

Technical Problem

Capturing images of complex three-dimensional objects like car bodies requires frequent adjustments to photographing conditions due to changing brightness distributions, making it difficult to maintain uniformity without checking binarized images for each frame, especially when moving illumination and camera relative to the object.

Method used

A system that adjusts camera exposure time and gain to maintain constant brightness across multiple images, using one-dimensional histograms to visualize and control light amounts, allowing for uniform brightness distribution without needing to check each binarized image, and displaying histograms in a color-coded or gradation format to simplify the process.

Benefits of technology

Enables efficient adjustment of photographing conditions to ensure consistent brightness across multiple images, simplifying the detection of defects on complex surfaces by maintaining uniform light amounts and allowing for quick evaluation of brightness distribution changes.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

An image capture condition adjustment device (3) comprises: an acquisition means (31) that acquires a plurality of captured images which are obtained when, while an illumination device (1) and / or a camera (2) is moved relatively to a workpiece (100), images of the workpiece illuminated by the illumination device are captured; and an adjustment means (36) that adjusts a condition of image capture by the camera (2) so that an image brightness distribution in each of the plurality of acquired captured images is uniform.
Need to check novelty before this filing date? Find Prior Art

Description

Photographing condition adjustment device, photographing condition adjustment method, and program

[0001] The present invention relates to a photographing condition adjustment device, a photographing condition adjustment method, and a program for adjusting the photographing conditions of multiple photographed images obtained by photographing a workpiece illuminated by a lighting device with a camera while moving at least one of the lighting device and the camera relative to the workpiece, such as a vehicle body.

[0002] For example, a technique is known for inspecting surface defects of a workpiece, such as a vehicle body, by moving at least one of an illumination device and a camera relative to the workpiece and photographing the workpiece illuminated by the illumination device with the camera.

[0003] In this case, about 1,000 images are taken, but because the vehicle body has a complex three-dimensional shape, the brightness distribution of the image changes slightly with each image taken, which requires optimizing the shooting conditions for each image.

[0004] In order to confirm the effect of optimizing the shooting conditions, it is effective to check the binarized image resulting from image processing for each shot image.

[0005] Japanese Patent Laid-Open No. 2003-129999 describes creating a histogram for each image and setting the average luminance value of two peaks corresponding to bright and dark areas as the threshold value for the binarization level.

[0006] Furthermore, Patent Document 2 discloses controlling the exposure time in accordance with characteristic information of the substrate, and Patent Document 3 discloses controlling the exposure time in accordance with the reflectance of the object to capture an image.

[0007] Japanese Patent Laid-Open No. 05-164703 Japanese Patent Laid-Open No. 2009-281835 Japanese Patent Laid-Open No. 2005-24271

[0008] However, the technology described in Patent Document 1 requires checking the binary image for each image, making it difficult to check the binary image for each of approximately 1,000 images, such as in the case of vehicle body defect inspection.

[0009] In addition, in Patent Documents 2 and 3, the object to be measured is a uniform object such as a circuit board, not a three-dimensional shape such as a car body, and it is sufficient to capture one image of the board. Therefore, it is sufficient to set one exposure time for each board, and verification is easy. However, when photographing a complex shape such as a car body, the optimal values ​​of the photographing conditions gradually change with each photograph, and the techniques in Patent Documents 2 and 3 cannot be applied.

[0010] This invention has been made in consideration of this technical background, and aims to provide a shooting condition adjustment device, a shooting condition adjustment method, and a program that eliminate the need to check the binary image for each of multiple captured images when photographing a workpiece illuminated by a lighting device with a camera while moving at least one of the lighting device and the camera relative to the workpiece, such as a vehicle body.

[0011] The above object is achieved by the following means. (1) A photographing condition adjustment device comprising: an acquisition means for acquiring a plurality of photographed images of a workpiece illuminated by an illumination device with the camera while moving at least one of the illumination device and the camera relative to the workpiece; and an adjustment means for adjusting the photographing conditions of the camera so that the brightness distribution of each of the plurality of photographed images acquired by the acquisition means is uniform. (2) The photographing condition adjustment device according to the preceding paragraph 1, in which the photographing conditions include an exposure time of the camera. (3) The photographing condition adjustment device according to the preceding paragraph 1, in which the photographing conditions include a gain of the camera. (4) The photographing condition adjustment device according to any one of the preceding paragraphs 1 to 3, in which the adjustment means adjusts the photographing conditions so that the maximum light amount in a dark region in the photographed image is a constant value, or so that the minimum light amount in a light band is a constant value, or so that the intermediate light amount between the maximum light amount in the dark region and the minimum light amount in the light band is a constant value. (5) The photographing condition adjustment device according to any one of the preceding paragraphs 1 to 4, in which the adjustment means adjusts the photographing conditions so that the maximum light amount in a light band in the photographed image does not exceed an upper limit value. (6) The photographing condition adjustment device according to any one of claims 1 to 5, further comprising: a creation means for creating, for each of a plurality of photographed images photographed under at least one of the photographing conditions before and after adjustment of the photographing conditions and acquired by the acquisition means, a plurality of one-dimensional histograms in which the histogram frequency, which indicates the brightness distribution of the photographed image, is displayed one-dimensionally in the direction of the histogram class using a parameter capable of distinguishing between large and small frequencies; and an output means for outputting display data so that the plurality of one-dimensional histograms created by the creation means are displayed side by side. (7) The photographing condition adjustment device according to claim 6, wherein the parameter is color coding. (8) The photographing condition adjustment device according to claim 6, wherein the parameter is gradation. (9) The photographing condition adjustment device according to any one of claims 6 to 8, wherein the display data is display data in which the one-dimensional histograms are displayed closely arranged. (10) The photographing condition adjustment device according to any one of claims 6 to 8, wherein the display data is display data in which thinned-out one-dimensional histograms are displayed side by side.(11) The photographing condition adjustment device according to the preceding paragraph 10, which reuses the photographing conditions for a thinned frame from those determined for the preceding and following frames. (12) A photographing condition adjustment method including: an acquisition step of acquiring a plurality of photographed images when a workpiece illuminated by an illumination device is photographed with the camera while moving at least one of the illumination device and the camera relative to the workpiece; and an adjustment step of adjusting the photographing conditions of the camera so that the brightness distribution of each of the plurality of photographed images acquired in the acquisition step becomes uniform. (13) The photographing condition adjustment method according to the preceding paragraph 12, in which the photographing conditions include an exposure time of the camera. (14) The photographing condition adjustment method according to the preceding paragraph 12, in which the photographing conditions include a gain of the camera. (15) The photographing condition adjustment method according to any of the preceding paragraphs 12 to 14, in which the adjustment step adjusts the photographing conditions so that the maximum light amount in a dark region in the photographed image becomes a constant value, or the minimum light amount in a light band becomes a constant value, or the intermediate light amount between the maximum light amount in the dark region and the minimum light amount in the light band becomes a constant value. (16) The photographing condition adjustment method according to any one of paragraphs 12 to 15, wherein the adjusting step adjusts the photographing conditions so that the maximum light intensity of the light band in the photographed image does not exceed an upper limit. (17) The photographing condition adjustment method according to any one of paragraphs 12 to 16, further comprising: a creating step of creating a plurality of one-dimensional histograms for each of a plurality of photographed images photographed under at least one of the photographing conditions before and after the adjustment of the photographing conditions and acquired in the acquiring step, the one-dimensional histograms being one-dimensionally displayed in the direction of the histogram classes using parameters that can distinguishably express the magnitude of the frequency in a histogram indicating the distribution of brightness of the photographed image; and an output step of outputting display data such that the plurality of one-dimensional histograms created in the creating step are displayed side by side. (18) The photographing condition adjustment method according to paragraph 17, wherein the parameter is color coding. (19) The photographing condition adjustment method according to paragraph 17, wherein the parameter is gradation. (20) The photographing condition adjustment method according to any one of paragraphs 17 to 19, wherein the display data is display data in which the one-dimensional histograms are displayed side by side.(21) The method for adjusting photographing conditions according to any one of the preceding paragraphs 17 to 20, wherein the display data is display data in which a one-dimensional histogram in which intermediate photographed images are thinned out is displayed. (22) The method for adjusting photographing conditions according to the preceding paragraph 21, in which photographing conditions in the thinned-out frames are reused from photographing conditions determined for frames used before and after the thinned-out frames. (23) A program for causing a computer to execute the method for adjusting photographing conditions according to any one of the preceding paragraphs 12 to 22.

[0012] According to the inventions described in the preceding paragraphs (1) and (12), at least one of the lighting device and the camera is moved relative to the workpiece, and multiple images are acquired when the workpiece illuminated by the lighting device is photographed with the camera. The shooting conditions of the camera are adjusted so that the brightness distribution of the image is uniform for each of the multiple images acquired. This prevents the brightness from changing significantly for each captured image, eliminating the need to check the binary image for each captured image.

[0013] According to the inventions described in the preceding paragraphs (2) and (13), the exposure time of the camera is adjusted so that the brightness distribution of the image becomes uniform.

[0014] According to the inventions described in the preceding paragraphs (3) and (14), the gain of the camera is adjusted so that the brightness distribution of the image becomes uniform.

[0015] According to the inventions described in the preceding paragraphs (4) and (15), the photographing conditions are adjusted so that the maximum light amount in the dark areas in the photographed image is a constant value, or the minimum light amount in the light band is a constant value, or the intermediate light amount between the maximum light amount in the dark areas and the minimum light amount in the light band is a constant value.

[0016] According to the inventions described in the preceding paragraphs (5) and (16), the photographing conditions are adjusted so that the maximum light amount of the light band in the photographed image does not exceed the upper limit value.

[0017] According to the inventions described in the preceding paragraphs (6) and (17), for each of a plurality of captured images taken by a camera, a plurality of one-dimensional histograms are created that display the histogram frequency, which indicates the brightness distribution of the captured image, one-dimensionally in the direction of the histogram class using parameters that can distinguishably express the magnitude of the frequency, and display data is output so that the created plurality of one-dimensional histograms are displayed side by side, so that the brightness distribution of the plurality of captured images can be grasped at a glance from the output display data.

[0018] According to the inventions described in the preceding paragraphs (7) and (18), a plurality of one-dimensional histograms, in which frequencies are displayed in different colors, can be displayed side by side.

[0019] According to the inventions described in the preceding paragraphs (8) and (19), a plurality of one-dimensional histograms in which frequencies are displayed in gradation can be displayed side by side.

[0020] According to the inventions described in the preceding paragraphs (9) and (20), one-dimensional histograms of a plurality of captured images can be displayed side by side.

[0021] According to the inventions described in the preceding paragraphs (10) and (21), opening and processing images of all frames takes time, whereas opening thinned images, processing them, and displaying them can display them in a short time.

[0022] According to the inventions described in the preceding paragraphs (11) and (22), the shooting conditions for the thinned frames are reused from the shooting conditions determined for the frames used before and after the thinned frames, thereby simplifying the adjustment process of the shooting conditions.

[0023] According to the invention described in the preceding paragraph (23), at least one of the lighting device and the camera is moved relative to the workpiece, and multiple images are acquired when the workpiece illuminated by the lighting device is photographed with the camera, and the computer can be caused to execute a process of adjusting the camera's photographing conditions so that the brightness distribution of the image is uniform for each of the multiple acquired photographed images.

[0024] 1 is a schematic diagram of an imaging system using data processing according to an embodiment of the present invention. (A) to (F) are images captured by a camera continuously capturing images of a moving vehicle body. The figures show the position of the vehicle body and the captured images when the images are captured under uniform exposure conditions, with (A) to (C) being the captured images and (D) being an image of the vehicle body. (A) to (C) are binary images obtained by binarizing the captured images of FIGS. 3A to 3C using a constant binarization threshold. (A) to (C) are images captured under adjusted imaging conditions, with (D) being an image of the vehicle body. (A) to (C) are binary images obtained from the captured images of FIGS. 5A to 5C. This is a single captured image captured by a camera. This figure shows a histogram of the captured image of FIG. 7. This figure is an explanatory diagram illustrating the case where the histogram frequency is displayed using different colors. This figure is an explanatory diagram illustrating the case where the histogram frequency is displayed using a gradation. FIG. 1 is a diagram showing a one-dimensional histogram created by displaying the frequency of the histogram in different colors. FIG. 2 is an explanatory diagram showing a case where a plurality of one-dimensional histograms obtained by thinning out images are displayed side by side. FIG. 3 is a diagram showing an example of a histogram of a captured image. FIG. 4 is an explanatory diagram showing a case where one-dimensional histograms for all captured images before adjusting the shooting conditions are displayed side by side. FIG. 5 is a graph showing the exposure time for each shot when the exposure time is adjusted so that the brightness distribution of the captured images becomes uniform. FIG. 6 is an explanatory diagram showing a case where one-dimensional histograms for all captured images after adjusting the shooting conditions are displayed side by side in the order in which they were taken. FIG. 7A shows an original image under certain shooting conditions, and FIG. 7B shows an image under different shooting conditions for obtaining a histogram. FIG. 8 is a diagram showing another example of a histogram of a captured image. FIG. 9 is a diagram showing another example of a histogram of a captured image.

[0025] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

[0026] FIG. 1 is a schematic diagram of an imaging system using an imaging condition adjustment device according to an embodiment of the present invention. This imaging system is used to inspect the surface of an automobile body 100, which is a workpiece, for the presence or absence of concave or convex defects. The imaging system includes a light source 1 as an illumination device, a camera 2 equipped with an image sensor having a large number of pixels, and a data processing device 3 as an imaging condition adjustment device that processes images captured by the camera 2. With the vehicle body 100 illuminated with illumination light from the light source 1, the camera 2 continuously captures multiple frames (e.g., approximately 1,000 frames) of images while at least one of the light source 1 and the camera 2 moves relative to the vehicle body 100. Note that "relative movement" means that both the light source 1 and the camera 2 may be fixed and the vehicle body 100 may be moved, or the vehicle body 100 may be fixed and one or both of the light source 1 and the camera 2 may be moved, or both the vehicle body 100 and at least one of the light source 1 and the camera 2 may be moved at different speeds. In this embodiment, both the light source 1 and the camera 2 are fixed, and the vehicle body 100 is moved in the direction of arrow F.

[0027] In this embodiment, the data processing device 3 is configured as a personal computer (PC). The data processing device 3 operates when a processor such as a CPU operates in accordance with an operating program stored in a storage unit (not shown), and functionally includes an image acquisition unit 31, a histogram creation unit 32, a one-dimensional histogram creation unit 33, a data output unit 34, an imaging condition adjustment unit 36, and a display device 35.

[0028] The image acquisition unit 31 acquires images successively captured by the camera 2, the histogram creation unit 32 creates a histogram for each captured image, the one-dimensional histogram creation unit 33 creates a one-dimensional histogram, the data output unit 34 creates display data for displaying the created one-dimensional histograms side by side and outputs the display data to the display device 35, an external printer 4, etc., and the shooting condition adjustment unit 36 ​​adjusts the shooting conditions used by the camera 2; these processes will be described later.

[0029] 2A to 2F are images captured by the camera 2 continuously while the vehicle body 100 is moving, and these captured images are output from the camera 2 and acquired by the image acquisition unit 31 of the data processing device 3. As the vehicle body 100 moves, the light band 10 of the light source 1 reflected on the vehicle body 100 is detected in the captured images, and defect images within the light band 10 are detected. As the vehicle body 100 moves, the position of the light band 10 in the captured images also gradually moves.

[0030] Because the vehicle body 100 has a complex three-dimensional shape, the brightness of the light band 10 shown in the captured image varies from image to image. Therefore, when creating a binary image for detecting the light band 10, if the binary threshold is set to a constant value, the light band cannot be properly detected in the binary image in a captured image in which the light band 10 appears dark. On the other hand, the light band 10 can be correctly detected in the binary image in a captured image in which the light band 10 appears bright.

[0031] FIG. 3 shows the position of the vehicle body 100 and the captured images thereof when photography is performed under uniform exposure conditions, with (A) to (C) being the captured images and (D) being an image of the vehicle body 100.

[0032] As shown in Fig. 3(D), the captured image 21a in Fig. 3(A) is a captured image of the front part of the vehicle body 100, the captured image 21b in Fig. 3(B) is a captured image of the vicinity of the center part of the vehicle body 100, and the captured image 21c in Fig. 3(C) is a captured image of the rear part of the vehicle body 100. The light band 10 is captured in each captured image, but it can be seen that the brightness of the light band 10 captured in the captured image differs depending on the capturing position of the vehicle body 100.

[0033] 4A to 4C show binarized images 22a to 22c obtained by binarizing the captured images 21a to 21c of FIGS. 3A to 3C with a constant binarization threshold. When the light band image is dark, as in the captured image 21a of FIG. 3A or the captured image 21c of FIG. 3C, it can be seen that the light band 10 cannot be detected well, as in the binarized image 22a of FIG. 4A or the binarized image 22c of FIG. 4C.

[0034] If the photographing conditions of the camera 2 are adjusted for each photograph so that the brightness of the light band 10 reflected in the photographed image is the same for every photographed image, a correctly binarized image can be obtained from every photographed image.

[0035] Figures 5(A) to (C) show captured images 23a to 23c with the photographing conditions adjusted, and (D) is an image of the vehicle body 100. The photographing positions of the photographed images 23a to 23c are the same as those in Figure 3. In this example, the exposure time is set long for the photographed image 23a of the front side of the vehicle body 100 and the photographed image 23c of the rear side. By adjusting the exposure time for each photograph, it is possible to make the brightness of the light band 10 uniform in all photographed images. Figures 6(A) to (C) show binarized images 24a to 24c obtained from the photographed images of Figures 5(A) to 5(C).

[0036] If the photographing conditions can be set so that the brightness of the light band 10 is uniform in all photographed images, then it is possible to obtain correctly binarized images for all photographed images even if the binarization threshold value is constant.

[0037] However, for inspection objects with complex shapes such as the vehicle body 100, the brightness distribution of the captured images differs for each image taken, making it difficult to grasp at a glance what the brightness distribution is for all captured images, and it is therefore extremely useful to be able to grasp this at a glance.

[0038] Furthermore, if the shooting conditions are changed for each shot, it becomes possible to grasp at a glance how the brightness distribution of all the shot images has changed, making it possible to determine at a glance whether correct binarized images can be obtained for all the shot images.

[0039] This embodiment is intended to allow the effect of adjustment to be grasped at a glance when adjusting the photographing conditions for a workpiece such as a vehicle body 100 whose brightness varies from photograph to photograph.

[0040] Next, this embodiment will be described in detail.

[0041] FIG. 7 shows a captured image 25 captured by the camera 2 and acquired by the image acquisition unit 31 of the data processing device 3. The black area 11 is a dark area, and the bright streaky area is a light band 10. A histogram like the one shown in FIG. 8 is generally used to show the brightness distribution of an image. The horizontal axis of the histogram represents the class, which in this embodiment represents the pixel value of the captured image. The vertical axis represents the frequency, which in this embodiment represents the number of pixels in the captured image that have that pixel value. FIG. 8 shows a histogram of the captured image 25 of FIG. 7 created by the histogram creation unit 32. In the histogram of FIG. 8, the peak near the pixel value of zero represents the dark area 11, and the peak near the pixel value of 50 represents the light band 10. As can be seen from FIG. 8, there is a peak due to the light band 10 near the pixel value of 50 in the histogram, and there is a peak due to the dark area 11 near the pixel value of 0.

[0042] In the case of the histogram shown in Figure 8, the brightness distribution of a certain captured image 25 can be seen, but when inspecting surface defects on the car body 100, approximately 1,000 images are taken, so it is not possible to check the histograms of all the captured images one by one.

[0043] Therefore, the one-dimensional histogram is converted into a one-dimensional histogram by the one-dimensional histogram creation unit 33. The conversion into a one-dimensional histogram is performed using a parameter that can express the frequency of the histogram, which indicates the distribution of brightness, in a manner that allows the magnitude of the frequency to be distinguished. In this embodiment, a case will be described in which this parameter is color-coded. In other words, the frequency of the histogram is displayed in a different color. In the following description, displaying the frequency of the histogram in a different color will also be referred to as pseudo-color display.

[0044] As shown in FIG. 9, the pseudo-color display is performed by displaying the data in a color assigned to each value, such as red for large values ​​(frequency), green for intermediate values, and blue for small values.

[0045] Note that the parameters may not be color-coded, but may be displayed in a gradation such as monochrome, as shown in Fig. 10. In this case, for example, a light color is used for a large value (frequency), and a dark color is used for a small value, and the display is performed with a density assigned to each value. However, in this embodiment, a case where the parameters are color-coded will be described.

[0046] If the histogram in Fig. 8 is displayed in pseudocolor according to the magnitude of the value (frequency), it will look like Fig. 11. The horizontal axis represents the pixel value, which is the class, and parameters are displayed in the direction of the pixel value. By displaying the histogram in pseudocolor in this way, the brightness distribution information, which is displayed two-dimensionally in the histogram in Fig. 8, can be displayed one-dimensionally as in Fig. 11. In this embodiment, a histogram displayed one-dimensionally as in Fig. 11 is called a one-dimensional histogram 5.

[0047] A one-dimensional histogram 5 is created for each captured image. After creation, the horizontally oriented, rectangular one-dimensional histograms 5 are turned vertically, with the horizontal axis representing the captured frame number (the number of the captured image) and the vertical axis representing the pixel value. This allows one-dimensional histograms 5 for a large number of captured images to be displayed together as shown in Figure 12, 14, or 16. Note that the name of the horizontal axis, "Frame No.", the name of the vertical axis, "Pixel Value," and scales may also be displayed.

[0048] This type of display makes it possible to see at a glance how the brightness of the light bands 10 and dark regions 11 changes from frame to frame. Figures 14 and 16 show one-dimensional histograms 5 of all captured images displayed closely spaced apart, while Figure 12 shows one-dimensional histograms 5 of intermediate captured images, which are thinned out regularly or irregularly rather than one-dimensional histograms 5 of all captured images, so that the one-dimensional histograms 5 are displayed spaced apart. The display of Figure 12 has the advantage of reducing the image reading time and image processing time by thinning out the number of frames, while the displays of Figures 14 and 16 have the advantage of allowing the brightness of all captured images to be recognized.

[0049] 12 and 14 may be displayed by printing on a recording medium 6 such as paper using the printer 4 shown in Fig. 1, in which case the recording medium 6 serves as the display medium for the one-dimensional histograms. Alternatively, the one-dimensional histograms may be displayed on the screen of the display device 35, in which case the display device 35 serves as the display medium for the one-dimensional histograms.

[0050] The display data output unit 34 creates display data so that the one-dimensional histograms 5 of all captured images are displayed side by side, or so that the one-dimensional histograms 5 of intermediate captured images are thinned out and displayed at intervals, and outputs this display data to an image forming device such as a printer 4 or a display device 35, and the display data is printed on the recording medium 6 by the printer 4 or displayed on the display device 35. The display data may be created in PDF (Portable Document Format) or another file format. The display data output unit 34 may also transmit the display data to another display device via a network and display it on the other display device.

[0051] Next, a process of adjusting the photographing conditions, which is carried out by the photographing condition adjusting unit 36, so that the brightness distribution of each photographed image becomes uniform will be described.

[0052] As shown in FIG. 13, the maximum pixel value of the dark region 11 in the histogram created for each captured image is P1 dark The maximum pixel value of the light band 10 is P1 light Then, the maximum pixel value P1 in the dark area in the histogram of the i-th photographed frame dark (i) and the maximum pixel value of the light band P1 light Find (i).

[0053] The output value PixelValue of each pixel of the image sensor in camera 2 is expressed by the following formula (1) using the amount of light L incident on that pixel, the exposure time (ExposureTime), the gain (Gain) of the amplifier circuit for the pixel signal, and the γ value (γ), where a is a coefficient.

[0054]

[0055] The shooting conditions when shooting with camera 2, that is, the gain, exposure time, and γ value, are (Gain1, ExposureTime1, γ1). If the pixel value at that time is P1, P1 is expressed by the following equation (2).

[0056]

[0057] When the photographing conditions are changed to (Gain2, ExposureTime2, γ2), the pixel value P2 when the same amount of light L is incident on the pixel is expressed by the following equation (3).

[0058]

[0059] P1 for each shoot dark (i) is a constant value P2 dark The shooting conditions (Gain2, ExposureTime2, γ2) for each shot are calculated so that

[0060] The exposure time ExposureTime2 may be changed for each shot while keeping Gain2 constant, or the exposure time ExposureTime2 may be kept constant and the gain Gain2 may be changed for each shot. Note that the light amount L may be adjusted by adjusting the brightness of light source 1, but this makes the adjustment more complicated, so it is better to change the exposure time ExposureTime2 or the gain Gain2.

[0061] When the exposure time is changed for each photograph, the exposure time is set to ExposureTime2(i) as shown in the following equation (4).

[0062]

[0063] When the gain is changed for each image capture, the gain is set to Gain2(i) as shown in equation (5).

[0064]

[0065] Since it is easier to set the exposure time in detail by changing it, the following description will be given using an example in which the exposure time is changed for each shot.

[0066] In addition, the maximum pixel value P2 of the light band under the new shooting conditions light However, it is best to adjust the shooting conditions so that the maximum pixel value P2 in the light band does not exceed a certain upper limit. lightis calculated by using equation (6) below. light It can be found from

[0067] Fig. 14 shows a one-dimensional histogram of all captured images of a vehicle body 100 taken by camera 2 without adjusting the shooting conditions. Fig. 14 shows that without adjusting the shooting conditions, the brightness of each captured image is not uniform but varies greatly.

[0068] In Figure 15, P1 dark (i) is a constant value P2 dark The exposure time for each shot calculated using equation (4) is shown below.

[0069] The pixel value P2 obtained when the photographing conditions are changed from (Gain1, ExposureTime1, γ1) to (Gain2, ExposureTime2, γ2) is calculated using equation (6).

[0070]

[0071] Using equation (6) above, we can calculate a one-dimensional histogram for each captured image when the shooting conditions are (Gain2, ExposureTime2, γ2), and arrange the one-dimensional histograms for all captured images in the order they were taken, as shown in Figure 16. This allows us to see at a glance how the brightness distribution of all captured images changes when the shooting conditions are changed.

[0072] Note that a histogram for the shooting conditions (Gain2, ExposureTime2, γ2) may be obtained by converting the original image with the shooting conditions (Gain1, ExposureTime1, γ1) shown in FIG. 17(a) into an image with the shooting conditions (Gain2, ExposureTime2, γ2) shown in FIG. 17(b).

[0073] Alternatively, the histogram of an image obtained under new exposure conditions can be obtained simply by converting the horizontal axis value (PixelValue) of the histogram of the original image using equation (6).

[0074] With a brightness distribution such as that shown in FIG. 17, the maximum light intensity of the dark region 11 is constant for all captured images, and it is therefore clear at a glance that a binarized image can be correctly calculated using a common binarization threshold for all captured images.

[0075] In the above explanation, P1 dark (i) is a constant value P2 dark However, the photographing conditions (Gain2, ExposureTime2, γ2) for each photographing are determined so that the minimum light amount of the light band 10 is constant.

[0076] That is, as shown in FIG. 18, from the histogram obtained for each photograph, the minimum pixel value P1 of the light band of the i-th frame is light_min (i) and the maximum pixel value of the light band P1 light_max Find (i).

[0077] The minimum pixel value of the light band for each shot is P1 light_min (i) is a constant value P2 light_min The shooting conditions (Gain2, ExposureTime2, γ2) for each shot are calculated so that

[0078] Gain2 may be kept constant and ExposureTime2 may be changed for each frame, or ExposureTime2 may be kept constant and Gain2 may be changed for each shot.

[0079] When the exposure time is changed for each photograph, the exposure time is set to ExposureTime2(i) as shown in equation (7).

[0080]

[0081] When the gain is changed for each image capture, the gain is set to Gain2(i) as shown in equation (8).

[0082]

[0083] The maximum pixel value of the light band under the new shooting conditions is P2 light_max However, it is best to adjust the shooting conditions so that the upper limit is not exceeded. light_max is calculated by using equation (6) as P1 light_max It can be found from

[0084] Alternatively, the intermediate value between the maximum light amount in the dark region and the minimum light amount in the light band may be controlled to be a constant value.

[0085] That is, as shown in FIG. 19, the intermediate value P1 between the minimum pixel value of the light region and the maximum pixel value of the dark region of the i-th frame thres (i) and the maximum pixel value of the light band P1 light Find (i).

[0086] P1 for each shoot thres (i) is a constant value P2 thres The shooting conditions (Gain2, ExposureTime2, γ2) for each shot are calculated so that

[0087] Gain2 may be kept constant and ExposureTime2 may be changed for each frame, or ExposureTime2 may be kept constant and Gain2 may be changed for each capture. When the exposure time is changed for each capture, the exposure time ExposureTime2(i) is set as shown in equation (9).

[0088]

[0089] When the gain is changed for each image capture, the gain is set to Gain2(i) as shown in equation (10).

[0090]

[0091] The maximum pixel value of the light band under the new shooting conditions is P2 light However, it is best to adjust the shooting conditions so that the upper limit is not exceeded. light is calculated by using equation (6) as P1 light It can be found from

[0092] As described above, in this embodiment, the brightness distribution of all captured images can be visualized using a display that displays one-dimensional histograms 5, and the effects of adjusting and optimizing the shooting conditions can be evaluated at a glance.

[0093] When thinning out images for processing, it is advisable to reuse the values ​​of the shooting conditions calculated for the unused frames from the used frames before and after them. For example, if the shooting conditions are calculated using frames 1, 6, 11, 16, etc., the shooting conditions for frames 2...5 are the shooting conditions calculated using frame 1, and the shooting conditions for frames 7...10 are the shooting conditions calculated using frame 6.

[0094] This application claims priority to Japanese Patent Application No. 2021-122664, filed on July 27, 2021, the disclosure of which constitutes part of this application in its entirety.

[0095] The present invention can be used to adjust the shooting conditions of multiple images obtained by photographing a workpiece illuminated by a lighting device with a camera while moving at least one of the lighting device and the camera relative to the workpiece, such as a vehicle body.

[0096] REFERENCE SIGNS LIST 1 Light source (illumination device) 2 Camera 3 Data processing device (photography condition adjustment device) 31 Image acquisition unit 32 Histogram creation unit 33 One-dimensional histogram creation unit 34 Data output unit 35 Display device (display body) 36 Photography condition adjustment unit 4 Printer 5 One-dimensional histogram 6 Recording medium (display body) 10 Light band 11 Dark area

Claims

1. An acquisition means for acquiring a plurality of captured images of a workpiece illuminated by the lighting device with the camera while moving at least one of the lighting device and the camera relative to the workpiece; an adjustment means for adjusting the photographing conditions of the camera so that the brightness distribution of each of the plurality of photographed images acquired by the acquisition means becomes uniform; a creation means for creating a plurality of one-dimensional histograms in which the frequency of a histogram showing the distribution of brightness of the photographed image is displayed one-dimensionally in the direction of the class of the histogram by a parameter capable of expressing the frequency of the frequency in a manner that allows discrimination between the magnitude of the frequency, for each of the photographed images photographed under at least one of the photographing conditions before the adjustment of the photographing conditions and the photographing conditions after the adjustment and acquired by the acquisition means; an output means for outputting display data so that the plurality of one-dimensional histograms created by the creation means are displayed side by side; An imaging condition adjustment device comprising:

2. 2. The photographing condition adjustment device according to claim 1, wherein the photographing conditions include an exposure time of the camera.

3. 2. The photographing condition adjustment device according to claim 1, wherein the photographing conditions include a gain of the camera.

4. The photographing condition adjustment device according to any one of claims 1 to 3, wherein the adjustment means adjusts the photographing conditions so that the maximum light amount in a dark area in a photographed image is a constant value, or so that the minimum light amount in a light band is a constant value, or so that an intermediate light amount between the maximum light amount in a dark area and the minimum light amount in a light band is a constant value.

5. 2. The photographing condition adjustment device according to claim 1, wherein the adjustment means adjusts the photographing conditions so that a maximum amount of light in a light band in a photographed image does not exceed an upper limit value.

6. 2. The photographing condition adjustment device according to claim 1, wherein the parameter is color-coded.

7. 2. The photographing condition adjustment device according to claim 1, wherein the parameter is a gradation.

8. 2. The photographing condition adjustment device according to claim 1, wherein the display data is display data in which the one-dimensional histograms are displayed side by side.

9. 2. The photographing condition adjustment device according to claim 1, wherein the display data is display data in which a one-dimensional histogram in which intermediate photographed images are thinned out is displayed.

10. 10. The photographing condition adjustment device according to claim 9, wherein the photographing conditions for the thinned frames are appropriated from the photographing conditions obtained for the frames used before and after the thinned frames.

11. An acquisition step of acquiring a plurality of captured images of a workpiece illuminated by the lighting device with the camera while moving at least one of the lighting device and the camera relative to the workpiece; an adjustment step of adjusting the photographing conditions of the camera so that the brightness distribution of each of the plurality of photographed images acquired in the acquisition step becomes uniform; a creating step of creating a plurality of one-dimensional histograms in which the frequency of a histogram showing the distribution of brightness of the captured image is one-dimensionally displayed in the direction of the class of the histogram by a parameter capable of expressing the frequency of the frequency in a distinguishable manner for each of the plurality of captured images captured under at least one of the shooting conditions before and after the adjustment of the shooting conditions; an output step of outputting display data so that the plurality of one-dimensional histograms created by the creating step are displayed side by side; A method for adjusting shooting conditions.

12. The photographing condition adjustment method according to claim 11 , wherein the photographing conditions include an exposure time of the camera.

13. The photographing condition adjustment method according to claim 11 , wherein the photographing conditions include a gain of the camera.

14. The photographing condition adjustment method according to any one of claims 11 to 13, wherein the adjustment step adjusts the photographing conditions so that the maximum light amount in a dark area in the photographed image is a constant value, or so that the minimum light amount in a light band is a constant value, or so that an intermediate light amount between the maximum light amount in a dark area and the minimum light amount in a light band is a constant value.

15. The photographing condition adjustment method according to claim 11 , wherein in the adjustment step, the photographing conditions are adjusted so that a maximum amount of light in a light band in a photographed image does not exceed an upper limit value.

16. The photographing condition adjustment method according to claim 11 , wherein the parameter is color coding.

17. The photographing condition adjustment method according to claim 11 , wherein the parameter is a gradation.

18. The photographing condition adjustment method according to claim 11 , wherein the display data is display data in which the one-dimensional histograms are displayed side by side.

19. 12. The photographing condition adjustment method according to claim 11, wherein the display data is display data in which a one-dimensional histogram in which intermediate photographed images are thinned out is displayed.

20. 20. The photographing condition adjusting method according to claim 19, wherein the photographing conditions in the thinned frames are appropriated from the photographing conditions obtained in the frames used before and after the thinned frames.

21. A program for causing a computer to execute the imaging condition adjustment method according to claim 11.