Accuracy estimation device, imaging device, accuracy estimation method, control method and program
Patent Information
- Application Number
- JP2021140265
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2021-08-30
- Publication Date
- 2024-08-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies do not effectively estimate the accuracy of dimension measurement using multiple parallax images taken under different shooting conditions.
An accuracy estimation device and method that acquires and processes parallax images to estimate the accuracy of dimension measurement by determining optimal shooting conditions, including focus control, exposure control, and optical image stabilization, and provides notifications for improved measurement accuracy.
Enables accurate estimation and notification of dimension measurement accuracy, allowing users to adjust shooting conditions to meet predetermined standards and improve measurement precision.
Abstract
Description
Technical Field
[0001] The present invention relates to an accuracy estimation device, an imaging device, an accuracy estimation method, a control method, and a program.
Background Art
[0002] There is a technique for acquiring distance information from a captured image or the state of an imaging device at the time of imaging and calculating the dimensional information of a subject. In Patent Document 1, when performing distance measurement from a plurality of images captured under different imaging conditions, a method is proposed for determining imaging conditions under which distance measurement can be optimally performed in a specified distance measurement range by specifying a desired distance measurement range.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] Patent Document 1 relates to performing distance measurement from a plurality of images captured under different imaging conditions, and does not relate to dimensional measurement performed using a plurality of parallax images having parallax with each other captured under specific imaging conditions.
[0005] The present invention has been made in view of such a situation, and an object thereof is to provide a technique for estimating the accuracy of dimensional measurement performed using a plurality of parallax images having parallax with each other captured under specific imaging conditions.
Means for Solving the Problems
[0006] To solve the above problems, the present invention provides an accuracy estimation device characterized by comprising: acquisition means for acquiring the shooting conditions of a plurality of parallax images having parallax from one another; and estimation means for estimating the accuracy of dimensional measurement performed using the plurality of parallax images based on the shooting conditions. [Effects of the Invention]
[0007] According to the present invention, it is possible to estimate the accuracy of dimensional measurements performed using multiple parallax images that have parallax with respect to each other and are captured under specific shooting conditions.
[0008] Further features and advantages of the present invention will become clearer from the accompanying drawings and the description of the embodiments for carrying out the invention below. [Brief explanation of the drawing]
[0009] [Figure 1] A block diagram showing the functional configuration of the digital camera 100. [Figure 2] A diagram showing the configuration of the image sensor 11. [Figure 3] A diagram illustrating the ranging principle of the image plane phase-difference method. [Figure 4] A flowchart of the imaging process, including the determination of suitable imaging conditions for dimensional measurement and notification processing. [Figure 5] A diagram showing the user interface according to the first embodiment. [Figure 6] (A) A diagram showing an example of a warning display regarding dimensional measurement accuracy, (B) A diagram showing an example of notification in S413 of Figure 4. [Figure 7] A diagram showing a user interface according to the second embodiment. [Modes for carrying out the invention]
[0010] The embodiments will be described in detail below with reference to the attached drawings. Note that the following embodiments do not limit the invention as defined in the claims. While the embodiments describe multiple features, not all of these features are essential to the invention, and the features may be combined in any way. Furthermore, in the attached drawings, identical or similar configurations are given the same reference numerals, and redundant descriptions are omitted.
[0011] In the following embodiments, a digital camera (imaging device) capable of acquiring depth information related to the distance distribution of a subject is used as an accuracy estimation device for estimating the accuracy of dimensional measurement. It is also possible to apply the accuracy estimation device to a digital camera that outputs the distance to one or more points to the focused subject as depth information. Furthermore, the configuration of each of the following embodiments is applicable to any device capable of calculating the dimensions of a subject based on the captured image and the depth information corresponding to the captured image. Depth information is information in the depth direction of the captured image, and a depth image or depth map is information representing the distribution of depth. As depth information, it is possible to use an image displacement amount map calculated from multiple viewpoint images with different viewpoints (multiple disparity images with mutual parallax), a defocus amount map calculated by multiplying the image displacement amount by a predetermined conversion coefficient, or a distance map obtained by converting the defocus amount into distance information of the subject.
[0012] [First Embodiment] Figure 1 is a block diagram showing the functional configuration of a digital camera 100. The imaging optical system 10 is composed of a lens unit of the digital camera 100 or a lens device that can be attached to the camera body, and forms an optical image of the subject on the image sensor 11. The imaging optical system 10 includes a plurality of lenses (not shown) arranged on the optical axis 102, and has an exit pupil 101 at a predetermined distance from the image sensor 11. In this specification, the direction parallel to the optical axis 102 is defined as the z direction (depth direction). In other words, the depth direction is the direction in which the subject is located with respect to the position of the digital camera 100. Furthermore, the direction perpendicular to the optical axis 102 and parallel to the horizontal direction of the image sensor 11 is defined as the x direction, and the direction perpendicular to the optical axis 102 and parallel to the vertical direction of the image sensor 11 is defined as the y direction.
[0013] The image sensor 11 is, for example, a CCD (charge-coupled device) type image sensor or a CMOS (complementary metal-oxide-semiconductor) type image sensor. The image sensor 11 performs photoelectric conversion on the subject image formed on the imaging surface via the imaging optical system 10 and outputs an image signal related to the subject image. As will be described later, the image sensor 11 of this embodiment has an imaging surface phase-difference type distance measuring function and can generate and output distance information indicating the distance from the front focal position of the digital camera 100 to the focused subject (subject distance) in addition to the captured image.
[0014] The control unit 12 includes a CPU (Central Processing Unit) or microprocessor, and memory for storing control processing programs, and controls the operation of each component of the digital camera 100. In this embodiment, the control unit 12 includes a shooting mode determination unit 120, a focus control unit 121, an exposure control unit 122, a measurement accuracy estimation unit 123, a notification control unit 124, and an optical image stabilization drive amount confirmation unit 125. Optical image stabilization is also expressed as OIS (Optial Image Stabilizer). The control unit 12 also controls the image processing unit 13, the storage unit 14, the input unit 15, the display unit 16, and the communication unit 17.
[0015] The shooting mode determination unit 120 determines whether the current shooting mode is a mode for performing normal shooting (normal shooting mode) or a mode for performing shooting for dimension measurement (measurement mode). In the case of the measurement mode, the shooting mode determination unit 120 further determines which measurement mode among a plurality of types of measurement modes the current shooting mode is, and performs processes such as restricting shooting conditions according to the determination result.
[0016] The focus control unit 121 performs focus control on a desired subject, and calculates distance information to the subject based on the position information of the focusing lens at the time of focusing and the optical design information of the imaging optical system 10.
[0017] The exposure control unit 122 calculates optimal exposure conditions in consideration of the shooting conditions fixed according to the measurement mode, and sets shooting parameters such as sensitivity, aperture value, and exposure time.
[0018] The measurement accuracy estimation unit 123 estimates an error that may occur during dimension measurement based on the set or calculated focal length, subject distance, sensitivity, aperture value, and exposure time. Further, when the estimated error exceeds a preset error range, the measurement accuracy estimation unit 123 calculates shooting conditions (recommended shooting conditions) such that the error falls within the set range. [[ID=一三]]
[0019] The notification control unit 124 notifies the photographer (user) via the display unit 16 of the estimated error of dimension measurement, the recommended shooting conditions, and the maximum set values of various shooting parameters.
[0020] The optical anti-vibration drive amount confirmation unit 125 confirms the position of the optical anti-vibration lens driven by optical anti-vibration during shooting, and estimates the amount of image plane curvature according to the position of the optical anti-vibration lens. Then, the optical anti-vibration drive amount confirmation unit 125 determines whether the drive amount of the optical anti-vibration lens has reached a drive amount at which the amount of image plane curvature becomes larger than a predetermined amount.
[0021] The image processing unit 13 performs various image processing operations. The image processing unit 13 includes an image generation unit 130, a depth generation unit 131, and a dimension measurement unit 132. The image processing unit 13 also has a memory 133 used as a workspace for image processing. The functions of the image processing unit 13 can be configured using logic circuits, or they can be configured using a CPU and memory for storing arithmetic processing programs.
[0022] The image generation unit 130 performs various signal processing on the image signal output from the image sensor 11, such as noise reduction, demosaicing, luminance signal conversion, aberration correction, white balance adjustment, and color correction, to generate an image for viewing. The captured image data output from the image generation unit 130 is temporarily stored in the memory 133.
[0023] The depth generation unit 131 generates a depth image representing the distribution of depth based on signals obtained from the distance-measuring pixels of the image sensor 11. In the depth image, the value indicated by each pixel represents the distance of an object located in the region of the image corresponding to that pixel.
[0024] The dimension measuring unit 132 measures the distance between positions (at least two points) specified by the user in the image displayed on the display unit 16. The measured dimension may be the pixel-level dimension on the image, the dimension on the image plane converted from the pixel size, or the dimension on the object side converted based on the shooting magnification.
[0025] The storage unit 14, input unit 15, display unit 16, and communication unit 17 are all connected to the bus. The storage unit 14 is equipped with a non-volatile storage medium. For example, captured image data, intermediate data generated during the processing of each part of the digital camera 100, and parameters referenced in the operation of the image processing unit 13 and the digital camera 100 are stored in the storage unit 14. The storage unit 14 only needs to ensure the processing performance that is acceptable for the realization of the processing. It should be capable of high-speed reading and writing, and a large-capacity storage medium may be used, for example, flash memory.
[0026] The input unit 15 is a user interface unit equipped with a device for detecting user operation input. For example, it detects operations such as inputting information or changing settings for the digital camera 100 via a dial, button, switch, touch panel, etc., and the input unit 15 outputs a signal corresponding to the operation input to the control unit 12.
[0027] The display unit 16 includes, for example, a display device such as a liquid crystal display or an organic EL (electro-luminescence) display. The display unit 16 is used for confirming the composition during shooting by displaying the captured image through the display, displaying various setting screens, and notifying message information. Furthermore, the display unit 16 displays information output by the notification control unit 124 of the control unit 12. In the case of an embodiment that uses a touch panel, the display unit 16 can have both display and input functions.
[0028] The communication unit 17 is a communication interface unit that transmits and receives information between the digital camera 100 and an external device. The communication unit 17 can transmit acquired image data, depth information, dimensions, coordinate information, dimensional measurement accuracy, etc., to the external device.
[0029] Next, the configuration of the image sensor 11 will be described with reference to Figure 2. Figure 2(A) is a schematic diagram showing the arrangement of the pixel group. In Figure 2(A), the direction perpendicular to the plane of the paper is defined as the z direction, and the two mutually orthogonal directions within the plane of the paper are defined as the x direction and the y direction. Figure 2(B) is a schematic diagram explaining the pixel configuration. In Figure 2(B), the direction perpendicular to the plane of the paper is defined as the y direction, and the two mutually orthogonal directions within the plane of Figure 2(B) are defined as the x direction and the z direction.
[0030] As shown in Figure 2(A), the image sensor 11 is composed of a group of pixels, each consisting of multiple pixel units 110 arranged in a grid. Each pixel unit 110 has a 2x2 configuration with different color filters applied. As shown in the enlarged view, red (R), green (G), and blue (B) color filters are arranged, and an image signal corresponding to one of the R, G, or B color information is output from the photoelectric conversion elements constituting the pixel unit 110. Note that Figure 2(A) shows an example where the R color filter is in the upper left, the B color filter in the lower right, and the G color filters are in the lower left and upper right, but the arrangement of the color filters is not limited to this.
[0031] The image sensor 11 has an image plane phase-difference distance measuring function. Figure 2(B) shows a cross-sectional view of a unit pixel along the I-I' line in Figure 2(A). The unit pixel includes a light guide layer 113 containing a microlens 111 and a color filter 112, and a light receiving layer 114 containing a first photoelectric conversion unit 115 and a second photoelectric conversion unit 116. In the light guide layer 113, the microlens 111 efficiently guides incident light to the first photoelectric conversion unit 115 and the second photoelectric conversion unit 116. The color filter 112 allows light in a predetermined wavelength band to pass through. The color filter 112 allows only light in a wavelength band corresponding to R, G, or B to pass through and guide it to the subsequent first photoelectric conversion unit 115 and the second photoelectric conversion unit 116.
[0032] The light-receiving layer 114 is provided with a first photoelectric conversion unit 115 and a second photoelectric conversion unit 116. These two photoelectric conversion units convert the received light into analog image signals, respectively. The two types of signals output from these two photoelectric conversion units are used for distance measurement. For distance measurement, the image signal composed of the signal output from the first photoelectric conversion unit 115, one of the two photoelectric conversion units arranged in a predetermined direction (horizontal direction) on the image sensor 11, is used as the A image signal, and the image signal composed of the signal output from the second photoelectric conversion unit 116 is used as the B image signal. Depth information or distance information can be obtained from the phase difference between the A image signal and the B image signal. In other words, the first photoelectric conversion unit 115 and the second photoelectric conversion unit 116 each partially receive the light beam that enters through the microlens 111. Therefore, the A image signal and the B image signal are signals of pupil-splitting images relating to the light beam that has passed through different pupil regions of the exit pupil 101 of the imaging optical system 10. At each pixel, the image signal (so-called added image signal) obtained by photoelectric conversion by both the first photoelectric conversion unit 115 and the second photoelectric conversion unit 116 is used as the captured image. In other words, the signal obtained by combining the A image signal and the B image signal is equivalent to the viewing image signal output from the photoelectric conversion unit in a configuration in which each unit pixel has only one photoelectric conversion unit.
[0033] The image sensor 11 of this embodiment is capable of outputting an image signal for viewing and A-image signals and B-image signals (pupil division images) for distance measurement. All pixels constituting the image sensor 11 are equipped with multiple photoelectric conversion units, enabling the acquisition of high-density depth information. Although Figure 2(B) illustrates a configuration in which two photoelectric conversion units are arranged in one pixel, the configuration is not limited to this, and a configuration in which three or more photoelectric conversion units are provided in one pixel is also possible.
[0034] The ranging principle of the imaging plane phase difference method will be explained with reference to Figure 3. Based on the outputs (pupil division image group) of the first photoelectric conversion unit 115 and the second photoelectric conversion unit 116, it is possible to calculate the distance to the subject. Figure 3(A) is a schematic diagram showing the exit pupil 101 of the imaging optical system 10 and the light beam received by the first photoelectric conversion unit 115. Figure 3(B) is a schematic diagram showing the exit pupil 101 of the imaging optical system 10 and the light beam received by the second photoelectric conversion unit 116. In Figures 3(A) and 3(B), the direction perpendicular to the plane of the paper is defined as the y direction, and the two directions that are orthogonal to each other within the plane of the paper are defined as the x direction and the z direction.
[0035] The microlenses 111 shown in Figures 3(A) and 3(B) are arranged so that the exit pupil 101 and the light-receiving layer 114 are optically conjugate. The light beam that passes through the exit pupil 101 of the imaging optical system 10 is focused by the microlenses 111 and guided to the first photoelectric conversion unit 115 or the second photoelectric conversion unit 116. At this time, the first photoelectric conversion unit 115 and the second photoelectric conversion unit 116 mainly receive light that has passed through different pupil regions, as shown in Figures 3(A) and 3(B), respectively. The first photoelectric conversion unit 115 receives light that has passed through the first pupil region 310, and the second photoelectric conversion unit 116 receives light that has passed through the second pupil region 320.
[0036] Multiple first photoelectric conversion units 115 in the image sensor 11 output a first image signal corresponding to the A image signal. Multiple second photoelectric conversion units 116 in the image sensor 11 output a second image signal corresponding to the B image signal. From the first image signal, the intensity distribution of the image formed on the image sensor 11 by light passing through the first pupil region 310 can be obtained. From the second image signal, the intensity distribution of the image formed on the image sensor 11 by light passing through the second pupil region 320 can be obtained. The relative positional shift (so-called parallax) between the first image signal and the second image signal is a value corresponding to the defocus amount. The relationship between the parallax amount and the defocus amount will be explained with reference to Figures 3(C), 3(D), and 3(E).
[0037] Figures 3(C), 3(D), and 3(E) show the first light beam 311 passing through the first pupil region 310 and the second light beam 321 passing through the second pupil region 320. Figure 3(C) shows the state when in focus, where the first light beam 311 and the second light beam 321 converge on the light-receiving surface of the image sensor 11. At this time, the amount of disparity between the first image signal and the second image signal is zero.
[0038] Figure 3(D) shows a defocused state where the image is focused in the negative direction (leftward) of the z-axis (optical axis). The parallax between the first and second image signals is a negative value. Figure 3(E) shows a defocused state where the image is focused in the positive direction of the z-axis. The parallax between the first and second image signals is a positive value. Comparing Figure 3(D) and Figure 3(E), it can be seen that the direction of the positional shift is reversed depending on whether the amount of defocus is positive or negative. It can also be seen that the positional shift occurs according to the imaging relationship (geometrical optical relationship) of the imaging optical system, depending on the amount of defocus. The amount of parallax corresponding to the positional shift between the first and second image signals can be detected by a region-based matching method.
[0039] Referring to Figure 4, the flow of the imaging process, including the determination of imaging conditions suitable for dimensional measurement and notification processing, will be explained. Each step in Figure 4 can be realized by the control unit 12 reading the corresponding processing program stored in, for example, the memory unit 14, loading it into a volatile memory (not shown), and executing it.
[0040] In S401, the control unit 12 determines whether the photographer (user) has performed a half-press operation of the shutter button. The half-press operation of the shutter button is denoted as "SW1". The control unit 12 repeats the determination in S401 until the half-press operation of the shutter button is performed. Once the half-press operation of the shutter button is performed, the process proceeds to step S402.
[0041] In S402a, the shooting mode determination unit 120 determines whether the current shooting mode set by the user is the measurement mode. If it is the measurement mode, the process proceeds to S402b; otherwise, the process proceeds to S403.
[0042] In S402b, the shooting mode determination unit 120 determines the type of measurement mode that is set. The exposure control unit 122 sets constraints on the shooting conditions according to the type of measurement mode. There are several types of measurement modes as shown in Table 1, and the shooting parameters that are prioritized according to the user's intention differ depending on the type of measurement mode. The digital camera 100 is configured to allow setting at least one of the multiple types of measurement modes shown in Table 1.
[0043] [Table 1]
[0044] Here, we will explain the relationship between shooting conditions and the distance resolution of the distance measurement. In the image plane phase-detection method, the baseline length W corresponds to the distance between the centroids of the light intensity distribution of the light beam at the exit pupil, which is equivalent to the baseline length W in triangulation. The baseline length W changes depending on the aperture value, being longest when the aperture is wide open and becoming smaller when the aperture is stopped down. If the aperture size is smaller than a predetermined size, it becomes impossible to distinguish between the two images and distance measurement cannot be performed. The aperture value (limit value) corresponding to this smallest aperture size for distance measurement is a value that depends on the characteristics of the imaging optical system and image sensor, and the parallax calculation method, but for example, F11 is sometimes set as the limit value in terms of F number.
[0045] Let F' = f / W be the aperture value (baseline-equivalent F-number) obtained according to the baseline length W. Here, f is the focal length. If r is the amount of parallax on the image plane and s' is the focal distance on the image side, the amount of defocus def on the image side can be calculated using Equation 1. def=rs' / (Wr) ··· (1) Since the baseline length W is in millimeters and the parallax amount r is in micrometers, W >> r. def≒rs' / W ··· (2) This can be considered as follows. Here, excluding macro photography, we can approximate s' ≈ f, def≒rf / W=rF' ··· (3) It can be expressed as follows.
[0046] The distance resolution depends on the detectable defocus resolution, and the defocus resolution depends on the aperture value F' (baseline-length equivalent F-number) determined according to the resolution Δr of the parallax r and the baseline length W. Δdef≒ΔrF' ··· (4) Therefore, the larger the aperture size (the smaller the baseline length equivalent F-number), the better the distance resolution.
[0047] Let's consider the conversion from the image-side distance resolution Δdef to the object-side distance resolution Δd. If the distance to the object is s, the distance resolution Δd is given by the following equation. Δd=Δrs(sf) / {fW+r(sf)} ··· (5) If we assume a magnification of β = 1 / m and exclude macro photography, the above equation 5 can be approximated by the following equation 6. Δd≒ΔrF′m 2 ... (6) The lower the magnification, that is, the further the subject is when the focal length is constant, the worse the distance resolution becomes.
[0048] If we define the distance resolution as the distance error range and use this to calculate the error (%) in dimensional measurement, it can be approximated by the following formula. Δh(%)≒±mΔrF' / (f±mΔrF')×100 ··· (7) From Equation 7, it can be seen that, assuming constant parallax resolution, the dimensional measurement error decreases when the reciprocal of the magnification (m) is small, the aperture value (F' value) is small, and the focal length is long. In other words, the longer the focal length and the closer the subject distance, the more accurate the measurement becomes.
[0049] Alternatively, the resolution of the object may be used as an indicator of measurement accuracy instead of the shooting distance or magnification. The resolution R of the object can be calculated using the following formula, where β is the shooting magnification and c is the size of the unit pixel of the pixel section 110. R = c / β ··· (8) As can be understood from Equation 8, the resolution R can be obtained by dividing the size of the unit pixel of the image sensor 11 used for imaging by the imaging magnification.
[0050] The parallax resolution Δr depends on the parallax calculation method and the window size during calculation. However, if the parallax calculation method is the same, it depends on the image's SNR, so the parallax resolution decreases as the ISO sensitivity increases. Δr can be expressed as a function of ISO sensitivity, but it is also possible to set an ISO sensitivity that satisfies a predetermined Δr and treat it as a constant value to perform the error calculation in Equation 7. As mentioned above, the parallax resolution Δr depends on the parallax calculation method and window size, but good results can be obtained by shooting at ISO 1600 or lower, for example. It should also be noted that, although it depends on the desired measurement accuracy, measurement is possible even when the sensitivity is increased up to around ISO 6400.
[0051] As explained above, dimensional measurement errors are related to both focal length and magnification, with magnification being determined by the focal length and subject distance. In the case of zoom lenses, the focal length can also be set as a variable parameter. Therefore, in addition to the measurement mode settings shown in Table 1, a setting can be provided to select whether to prioritize focal length or subject distance when shooting. By setting which to prioritize, it can be used as an indicator during notification, as explained later.
[0052] Next, we will explain the relationship between shooting conditions and the distance measurement range. If blurring occurs in the image used to calculate the parallax between two images, it becomes difficult to distinguish between the two images, and the accuracy of the parallax calculation decreases. Therefore, the distance range that can be measured is related to the depth of field of the image. The depth of field is expressed on the image side by the minimum circle of confusion δ and the aperture value F, and the distance measurement range is within the range of ±αFδ. Here, α is a coefficient determined by the parallax calculation method, etc.
[0053] Next, the details of each measurement mode will be explained. In fully automatic mode, the exposure control unit 122 automatically sets the settings to balance the distance measurement resolution, distance measurement range, shutter speed (exposure time), and ISO sensitivity at the focal length and subject distance during shooting. Considering the distance measurement resolution and range, for example, the aperture value is set to around F4, the ISO sensitivity is set to around 400, and finally the shutter speed is set to achieve proper exposure. The lower limit of the shutter speed is set to, for example, (1 / focal length) plus the number of correction stops from the image stabilization function. If the shutter speed is longer than the set limit, the exposure control unit 122 adjusts the ISO sensitivity setting to 1600 to achieve proper exposure. If the exposure is still low, the exposure control unit 122 adjusts the aperture value if it can be set to F4 or lower. However, depending on the focal length, subject distance, and ambient light level, the distance measurement accuracy may not meet the desired accuracy, but the exposure control unit 122 adopts the optimal setting within these constraints.
[0054] The autofocus resolution priority mode is a mode that minimizes the autofocus resolution at the focal length and subject distance during shooting. The exposure control unit 122 sets the aperture to its widest setting, the ISO sensitivity to a low setting, and finally determines the shutter speed. More specifically, for example, the ISO sensitivity is set to around 100 and limited to a range not exceeding 400. The exposure control unit 122 determines the shutter speed to achieve proper exposure according to the ambient light level while satisfying these conditions.
[0055] The depth-of-field priority mode maximizes the measurable range in terms of focal length and subject distance during shooting. The exposure control unit 122 sets the aperture to the smallest aperture value that allows for measurable focusing. As mentioned above, F11 is generally the limit, so the exposure control unit 122 sets it to, for example, between F8 and F11. Next, the exposure control unit 122 determines the ISO sensitivity and shutter speed so that the image can be taken with optimal exposure. However, each setting is determined within the range of the maximum ISO sensitivity and the minimum shutter speed suitable for focusing.
[0056] In image stabilization priority mode, the exposure control unit 122 sets the shutter speed so that no camera shake is affected, even without using optical image stabilization, at the focal length and subject distance during shooting. For example, the shutter speed is set so that the exposure time is shorter than (1 / focal length). Next, the exposure control unit 122 determines the aperture value and ISO sensitivity so that the image can be taken with optimal exposure. The respective settings are determined within the range of the maximum F-number and the maximum ISO sensitivity suitable for distance measurement.
[0057] In aperture-priority mode, the exposure control unit 122 fixes the aperture value to the user-set value for the focal length and subject distance at the time of shooting, and then determines the ISO sensitivity and shutter speed to enable shooting with optimal exposure. However, each setting is determined within the range of the maximum ISO sensitivity and the minimum shutter speed suitable for distance measurement.
[0058] In shutter-priority mode, the exposure control unit 122 fixes the shutter speed to the user-set value for the focal length and subject distance at the time of shooting, and then determines the aperture value and ISO sensitivity to enable shooting with optimal exposure. However, the respective settings are determined within the range of the maximum F-number and the maximum ISO sensitivity suitable for distance measurement.
[0059] In step S403, the focus control unit 121 performs the focusing operation. The focus control unit 121 performs the focusing operation on the subject to be photographed using either the AF (autofocus) function or the MF (manual focus) function. In the AF function, the focus control unit 121 drives the focusing lens, which is part of the imaging optical system 10, and controls it to achieve optimal focus on the subject using the phase-detection method and the contrast method. The focus control unit 121 also estimates the subject distance based on the position information of the focusing lens and the design information of the imaging optical system 10.
[0060] In S404, the exposure control unit 122 fixes the preferred shooting parameters according to the constraints of the shooting conditions set in S402b (i.e., according to the type of measurement mode), and then sets the other shooting parameters to achieve optimal exposure. The detailed control procedure for the shooting parameters is as described in S402b for each type of measurement mode. Note that when the shooting mode is the normal shooting mode, there are no constraints on shooting conditions according to the type of measurement mode, so the exposure control unit 122 sets the shooting parameters without being subject to such constraints.
[0061] In S405, the shooting mode determination unit 120 determines whether the current shooting mode set by the user is the measurement mode. If it is the measurement mode, the process proceeds to S406; otherwise, the process proceeds to S409.
[0062] In S406, the measurement accuracy estimation unit 123 estimates the measurement accuracy. Specifically, the measurement accuracy estimation unit 123 uses the shooting parameters set in the previous processing, the estimated subject distance, and the set focal length to estimate the measurement accuracy (dimensional measurement error) according to Equation 7. If the measurement accuracy does not meet the required threshold (predetermined standard), the measurement accuracy estimation unit 123 selects parameters that can be changed according to the type of measurement mode and determines whether there is a setting that would make the measurement accuracy meet the threshold if those parameters were changed. If there is a setting that makes the measurement accuracy meet the threshold, the measurement accuracy estimation unit 123 changes the shooting parameters to a setting that makes the measurement accuracy meet the threshold. If there is no setting that makes the measurement accuracy meet the threshold, the measurement accuracy estimation unit 123 calculates the recommended setting values for each shooting parameter when the type of measurement mode is changed.
[0063] Here, individual settings such as aperture value, ISO sensitivity, and shutter speed are set to achieve optimal exposure within a range of limits suitable for measurement, but final verification of measurement accuracy and adjustment of the settings are necessary. When using settings within the limits of each parameter, it may not result in optimal exposure conditions, so the measurement accuracy estimation unit 123 also determines whether or not the optimal exposure conditions are met. Alternatively, a configuration may be adopted in which the user can select whether to prioritize settings for optimal exposure as a viewing image or settings for dimensional measurement, and the recommended values are calculated according to this setting.
[0064] Furthermore, the measurement accuracy estimation unit 123 determines the optimal aperture value, ISO sensitivity, and shutter speed for measurement, and then calculates combinations of focal length and subject distance that satisfy the threshold for measurement accuracy. The measurement accuracy estimation unit 123 performs calculations for two cases: when the focal length is fixed and when the subject distance is fixed. In other words, the measurement accuracy estimation unit 123 calculates what subject distance satisfies the accuracy at the focal length set by the user, and what focal length satisfies the threshold for measurement accuracy when the subject distance is fixed.
[0065] In S407, the notification control unit 124 notifies the user of the estimated measurement accuracy (dimensional measurement error) obtained in S406, information indicating whether the error is smaller than a threshold, the set shooting parameters, recommended shooting parameters, focal length, subject distance, and shooting magnification. This notification is made, for example, by displaying the necessary information on the display unit 16. For example, if the accuracy of the dimensional measurement does not meet a predetermined standard, the notification control unit 124 will notify that the accuracy of the dimensional measurement does not meet a predetermined standard. If the accuracy of the dimensional measurement does not meet a predetermined standard, for example, the error is larger than a threshold. In addition to this, the notification control unit 124 also notifies the user of information related to error and accuracy, as well as information related to settings, recommendations, and changes to shooting conditions, such as the limit values of the shooting parameters that can be set during measurement and whether or not to change to recommended shooting parameters.
[0066] If the desired measurement accuracy cannot be achieved due to the focal length or subject distance, the notification control unit 124 will notify the user of a change in focal length or subject distance, depending on the setting described above regarding whether to prioritize focal length or subject distance. In the case of focal length priority (fixed), the notification control unit 124 calculates and notifies the subject distance such that the shooting magnification achieves the desired measurement accuracy according to the focal length set at the time of shooting. In this case, the user will change the distance to the subject to achieve the desired shooting magnification and then take the picture. In the case of subject distance priority (fixed), the notification control unit 124 will automatically set or notify the focal length such that the shooting magnification achieves the desired measurement accuracy according to the subject distance at the time of shooting. If there is no focal length that satisfies the shooting magnification, the notification control unit 124 will notify the user of this fact and simultaneously notify the recommended subject distance.
[0067] Figure 5 shows an example of the user interface. Figure 5(A) shows the user interface when the setting prioritizes focal length. Figure 5(B) shows the user interface when the setting prioritizes subject distance. The user interfaces in Figures 5(A) and 5(B) display constraints required for the accuracy of dimensional measurement to meet predetermined standards (for example, the minimum shutter speed indicated by reference numeral 503a, which will be described later).
[0068] In Figures 5(A) and 5(B), 500 is the display provided by the display unit 16, which displays the captured image acquired by the image sensor 11 during shooting. 501 is an area that displays a symbol indicating the type of measurement mode during shooting, and displays a symbol corresponding to the measurement mode as exemplified in Table 1. 502 is an area that displays the magnification ratio or the reciprocal of the magnification ratio. To allow the user to recognize whether the magnification ratio achieves the desired measurement accuracy, the magnification ratio or the reciprocal of the magnification ratio is highlighted by changing the color of the displayed characters. 503a indicates the minimum shutter speed that can be set in the current measurement mode. 503b is an area that displays the shutter speed during shooting. 504a indicates the maximum aperture value (F-number) that can be set in the current measurement mode. 504b is an area that displays the aperture value during shooting. 505 indicates how much exposure is under the current shooting conditions relative to proper exposure. 506a indicates the maximum ISO sensitivity that can be set in the current measurement mode. 506b is an area that displays the ISO sensitivity during shooting. Shutter speed, aperture value, and ISO sensitivity may be fixed values depending on the measurement mode. In this case, the display color will be changed to indicate that the fixed settings are fixed values.
[0069] In Figure 5(A), 507a is subject distance information displayed when the subject distance needs to be changed in order for the measurement accuracy to meet the threshold when focal length priority is set. 507b shows the current subject distance, and 507c is the recommended subject distance for the measurement accuracy to meet the threshold. In order for the measurement accuracy to meet the threshold under the current shooting conditions, the user needs to move to the subject distance indicated by 507c.
[0070] In Figure 5(B), 508a is focal length information. Focal length information is displayed when a variable focal length photographic lens is used and the setting prioritizes subject distance, and it becomes necessary to change the focal length in order for the measurement accuracy to meet the threshold. 508b shows the current focal length, and 508c is the recommended focal length for the measurement accuracy to meet the threshold. In order for the measurement accuracy to meet the threshold under the current shooting conditions, the user needs to change the focal length of the photographic lens to the focal length indicated by 508c. If the measurement accuracy does not meet the threshold within the range of changeable focal lengths at the subject distance during shooting, the notification control unit 124 notifies that there is no setting that satisfies the measurement accuracy threshold and recommends changing the subject distance.
[0071] Furthermore, if the measurement accuracy does not meet the threshold, the notification control unit 124 may display not only a numerical value but also a warning display as shown by reference numerals 601 to 605 in Figure 6(A) on the user interface shown in Figures 5(A) and 5(B). The estimated value of the measurement accuracy (measurement error) may be displayed by popping up a warning display as shown by 604, or it may be displayed at all times on the user interface shown in Figures 5(A) and 5(B).
[0072] In S408, the control unit 12 determines via the input unit 15 whether the user has changed the shooting conditions. If there is no change in the shooting conditions, the process proceeds to S409. If there is a change in the shooting conditions, the control unit 12 changes the shooting conditions according to the user's instructions and returns the process to S401.
[0073] In S409, the control unit 12 determines whether the user has fully pressed the shutter button. The fully pressed shutter button operation is denoted as "SW2". If the fully pressed shutter button operation has been performed, the process proceeds to S410; otherwise, the process returns to S401.
[0074] In S410, the control unit 12 performs various control operations and executes a series of shooting controls such as exposure and readout. The image processing unit 13 generates an image for viewing and a depth image based on the captured image readout from the image sensor 11.
[0075] The generation of viewing images is performed by the image generation unit 130. The image generation unit 130 generates a single Bayer array image by adding the pixel values of each pixel of the A image signal and the B image signal, and then performs demosaicing processing on the generated Bayer array image for each of the R, G, and B colors to generate a viewing image. In addition, processes such as noise reduction or denoising, luminance signal conversion, aberration correction, white balance adjustment, and color correction are performed, and the data of the generated viewing image is stored in the memory 133.
[0076] Depth image generation is performed in the depth generation unit 131. First, the depth generation unit 131 performs light intensity correction processing on the A image signal and the B image signal to correct the light intensity balance between the two images. Then, the depth generation unit 131 performs band limiting using a bandpass filter to remove components with low SNR. After that, the depth generation unit 131 derives the amount of disparity at each pixel between the two images using correlation calculation. Methods such as NCC, SSD, and SAD are used to derive the correlation. NCC is an abbreviation for "Normalized Cross-Correlation". SSD is an abbreviation for "Sum of Squared Difference", and SAD is an abbreviation for "Sum of Absolute Difference". The calculated amount of disparity (denoted as d) is converted into a defocus amount using a predetermined conversion coefficient. The defocus amount corresponds to the distance from the image sensor 11 to the focal point of the imaging optical system 10. Here, the predetermined conversion coefficient is denoted as K, and the defocus amount is denoted as ΔL. The parallax amount d is converted to the defocus amount ΔL by the following equation 9. ΔL = K × d ··· (9) Furthermore, the amount of defocus ΔL can be converted to the subject distance using the lens formula in geometrical optics shown in Equation 10 below. 1 / A + 1 / B = 1 / F ... (10) In equation 10, A represents the distance from the object surface to the principal point of the imaging optical system 10 (subject distance), B represents the distance from the principal point of the imaging optical system 10 to the image plane, and F represents the focal length of the imaging optical system 10. In equation 10, the value of B can be derived from the defocus amount ΔL, so the distance A can be derived based on the setting of the focal length F during imaging. The depth generation unit 131 generates two-dimensional information with the derived subject distance as the pixel value, and stores the depth image data based on the two-dimensional information in the memory 133.
[0077] In S411, the shooting mode determination unit 120 determines whether the current shooting mode set by the user is the measurement mode. If it is the measurement mode, the process proceeds to S412; otherwise, the process in this flowchart ends. The determination process in S411 and subsequent processes can be executed in parallel while the captured image is read from the image sensor 11 and image processing is being performed.
[0078] In S412, the optical image stabilization drive amount confirmation unit 125 acquires data recording how the optical image stabilization unit was driven during exposure when optical image stabilization was performed during shooting. In particular, the optical image stabilization drive amount confirmation unit 125 acquires information on the average drive position during exposure. Based on the design values of the imaging optical system 10, the optical image stabilization drive amount confirmation unit 125 has in advance stored information on how the field curvature changes depending on the drive position of the optical image stabilization unit, and calculates the field curvature amount corresponding to the acquired average drive position. Here, it is possible to perform distance measurement error correction due to field curvature when generating a distance image based on the calculated field curvature amount, but there are cases where the correction effect is not sufficiently obtained, such as when the field curvature amount is greater than a predetermined amount. Therefore, the optical image stabilization drive amount confirmation unit 125 sets a limit drive amount according to the imaging optical system 10 and the desired measurement error amount, and determines that the measurement error will be large if the optical image stabilization unit is driven beyond that drive amount.
[0079] In S413, the notification control unit 124, based on the results obtained in S412, notifies the photographer of a decrease in measurement accuracy or recommends reshooting if the drive amount of the vibration-damping optical system is large and the impact on measurement accuracy cannot be ignored. Figure 6(B) shows an example of notification in S413. The notification in S413 displays a warning on the user interface as shown in Figure 5(A) or Figure 5(B). Not limited to warning displays, it is also possible to notify image users by, for example, adding a warning as metadata to the captured image.
[0080] As described above, according to the first embodiment, the digital camera 100 estimates the accuracy of dimensional measurement performed using multiple parallax images based on the shooting conditions. The digital camera 100 also provides notification based on the estimated accuracy.
[0081] The timing of the digital camera 100's accuracy estimation and notification based on the estimated accuracy may be before or after the capture of multiple parallax images. If the accuracy estimation and notification based on the estimated accuracy are performed before shooting, the user can know in advance whether the accuracy of the dimensional measurement will meet a predetermined standard if the shooting is performed under the current shooting conditions. Furthermore, it is possible to search for recommended shooting conditions (changes to the shooting conditions required for the accuracy to meet the predetermined standard) that will ensure the accuracy of the dimensional measurement meets the predetermined standard, while reflecting the user's intentions, before shooting. In addition, the digital camera 100 can notify the recommended shooting conditions (changes to the shooting conditions required for the accuracy to meet the predetermined standard) in a format such as that shown by reference numerals 601 to 603 and 605 in Figure 6(A).
[0082] If accuracy estimation and notification based on the estimated accuracy are performed after shooting, the user can know, even after shooting, whether the shooting conditions were met to ensure that the dimensional measurement accuracy meets the predetermined requirements. In this case, a device other than the digital camera 100 (for example, a personal computer) may perform the accuracy estimation and notification based on the estimated accuracy. For example, the personal computer can acquire the shooting conditions corresponding to multiple captured parallax images and determine whether the dimensional measurement accuracy meets the predetermined criteria based on the acquired shooting conditions. The personal computer can then inform the user of the estimation result.
[0083] The information to be reported includes measurement accuracy, necessary changes to shooting conditions (details of the changes to shooting conditions), optimal shooting conditions, and the result of determining whether measurement is possible with the accuracy that meets the predetermined criteria. The notification method can include displaying the information on a computer screen or adding the information to the image metadata. Alternatively, the notification method may involve classifying images into different folders based on measurement accuracy, shooting conditions, or whether measurement is possible with the accuracy that meets the predetermined criteria.
[0084] Here, the target of notification regarding shooting conditions is not necessarily limited to the user; the target may also be the shooting system or the dimensional measurement application.
[0085] In this embodiment, a method based on the image plane phase difference method was described as an example of dimensional measurement, but the dimensional measurement in this embodiment is not limited to this method. For example, a method may be adopted in which the length and area of the object to be measured are determined on the image using image recognition technology such as machine learning, and then converted to the length and area on the object itself based on the aforementioned distance information, shooting magnification, and resolution information to determine the dimensions. Alternatively, a method may be adopted in which an object of a predetermined length and area is captured in the image based on the aforementioned distance information, shooting magnification, and resolution information. Even in such measurements, the accuracy changes depending on noise, blur, and resolution contained in the image. By estimating whether measurement is possible with the desired measurement accuracy (accuracy that meets a predetermined standard) based on the shooting conditions and notifying the user as described above, it is possible to inform the user whether or not measurement can be performed with the desired measurement accuracy.
[0086] [Second Embodiment] In the first embodiment, a configuration was described that assists in adjusting the magnification ratio to ensure that the dimensional measurement accuracy meets a threshold by displaying information about the less prioritized item, depending on whether the focal length or subject distance is prioritized. In contrast, the second embodiment describes a user interface for adjusting the magnification ratio without the user having to prioritize either the focal length or subject distance.
[0087] In this embodiment, the basic configuration of the digital camera 100 is the same as in the first embodiment. The differences from the first embodiment will be described below.
[0088] Figure 7 shows a user interface according to the second embodiment. The user interface in Figure 7 is a user interface that assists the user in adjusting the magnification so that it does not fall below the minimum magnification required for measurement with the set dimensional measurement accuracy.
[0089] The area of the object acquired by the digital camera 100 is determined according to the size of the image sensor 11 and the magnification ratio. Therefore, according to the size of the image sensor 11, a rectangular area in the XY direction at a distance Z that satisfies the minimum magnification ratio is determined. The control unit 12 overlays this rectangular area on the user interface as a rectangular area 701. That is, the control unit 12 displays information indicating the shooting area corresponding to the minimum magnification ratio among the shooting areas corresponding to the current magnification ratio. 702 indicates the minimum magnification ratio. In the shooting situation in Figure 7, the current magnification ratio displayed in area 502 is 1 / 100, which is smaller than the minimum magnification ratio of 1 / 50. If the image sensor size is 36mm × 24mm, a rectangular area of 1800mm × 1200mm is captured at the minimum magnification ratio. When the magnification ratio is 1 / 100, the area of screen 500 in Figure 7 corresponds to an area of 3600mm × 2400mm. Therefore, if the current magnification is less than the minimum magnification, the rectangular area 701 is smaller than the screen size 500, and thus the rectangular area 701 is displayed on the screen size 500. On the other hand, if the current magnification is greater than or equal to the minimum magnification, the size of the rectangular area 701 is greater than or equal to the screen size 500, and therefore the rectangular area 701 is not displayed.
[0090] Therefore, the user can adjust the magnification so that it is equal to or greater than the minimum magnification by adjusting the focal length and subject distance so that the rectangular area 701 is not displayed. Furthermore, if the magnification is equal to or greater than the minimum magnification, the control unit 12 may notify the user that the magnification condition has been met by changing the display color of the magnification in area 502, for example.
[0091] As described above, according to the second embodiment, when the current magnification is less than the minimum magnification (the minimum magnification that satisfies the required dimensional measurement accuracy), the digital camera 100 displays a rectangular area 701 on the screen 500 that indicates the area to be photographed at the minimum magnification. This allows the user to increase the magnification to the minimum magnification or higher by intuitively adjusting the focal length or subject distance so that the size of the rectangular area 701 becomes larger than the size of the screen 500 and is no longer displayed, without having to consider specific values of focal length and subject distance.
[0092] [Other embodiments] The present invention can also be realized by supplying a program that implements one or more of the functions of the above-described embodiments to a system or device via a network or storage medium, and by having one or more processors in the computer of that system or device read and execute the program. It can also be realized by a circuit (e.g., an ASIC) that implements one or more functions.
[0093] The invention is not limited to the embodiments described above, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, claims are attached to disclose the scope of the invention. [Explanation of symbols]
[0094] 100...Digital camera, 12...Control unit, 120...Shooting mode determination unit, 121...Focus control unit, 122...Exposure control unit, 123...Measurement accuracy estimation unit, 124...Notification control unit, 125...Optical image stabilization drive amount confirmation unit
Claims
1. An acquisition means for acquiring shooting conditions of a plurality of parallax images having mutual parallax; an estimation means for estimating accuracy of a dimension measurement performed using the plurality of parallax images based on the photographing conditions; An accuracy estimation device comprising:
2. The photographing conditions include at least one of sensitivity, aperture value, exposure time, focal length, subject distance, and driving amount of an optical vibration isolation means.
2. The accuracy estimation device according to claim 1 .
3. The photographing conditions include resolution of the plurality of parallax images.
2. The accuracy estimation device according to claim 1 .
4. The acquisition means acquires the resolution by dividing a size of a unit pixel of an image sensor used to capture the plurality of parallax images by a magnification ratio of the plurality of parallax images.
4. The accuracy estimation device according to claim 3.
5. The method further includes:
5. The accuracy estimation device according to claim 1,
6. The notification means notifies information indicating the estimated accuracy.
6. The accuracy estimation device according to claim 5.
7. The notification means notifies, when the estimated accuracy does not satisfy a predetermined standard, that the estimated accuracy does not satisfy the predetermined standard.
7. The accuracy estimation device according to claim 5 or 6.
8. a determination unit that, when the estimated accuracy does not satisfy a predetermined standard, determines a change in the photographing conditions that is required to make the accuracy of the dimension measurement satisfy the predetermined standard, The notification means notifies the user of the change in the imaging conditions when the estimated accuracy does not satisfy the predetermined standard.
7. The accuracy estimation device according to claim 5 or 6.
9. An imaging means for capturing a plurality of parallax images having mutual parallax; an estimation means for estimating accuracy of a dimension measurement performed using the plurality of parallax images based on a shooting condition of the plurality of parallax images before the plurality of parallax images are shot; a notification means for performing a notification based on the estimated accuracy before capturing the plurality of parallax images; An imaging device comprising:
10. The notification means notifies a constraint required for the accuracy of the dimension measurement to satisfy a predetermined standard for at least one item included in the photographing conditions.
10. The imaging device according to claim 9.
11. The photographing conditions include a photographing magnification, When the current magnification is smaller than a minimum magnification required for the accuracy of the dimension measurement to satisfy a predetermined standard, the notification means displays information indicating a photographing area corresponding to the minimum magnification among the photographing areas corresponding to the current magnification.
10. The imaging device according to claim 9.
12. When the driving amount of the optical image stabilization means during the photographing of the plurality of parallax images is greater than a threshold value, the notification means notifies the recommendation of re-photographing.
12. The imaging device according to claim 9, wherein the first and second lenses are arranged in a first direction.
13. An accuracy estimation method executed by an accuracy estimation device, An acquisition step of acquiring shooting conditions for a plurality of parallax images having mutual parallax; an estimation step of estimating accuracy of a dimension measurement performed using the plurality of parallax images based on the shooting conditions; An accuracy estimation method comprising:
14. A control method for an imaging device, comprising: An imaging step of capturing a plurality of parallax images having mutual parallax; an estimation step of estimating accuracy of a dimension measurement performed using the plurality of parallax images based on a capturing condition of the plurality of parallax images before capturing the plurality of parallax images; a notification step of performing a notification based on the estimated accuracy before capturing the plurality of disparity images; A control method comprising:
15. A program for causing a computer to function as each of the means of the accuracy estimation device according to any one of claims 1 to 8.
16. A program for causing a computer to function as each of the means of the imaging apparatus according to any one of claims 9 to 12.
