Image processing device, image processing method, and program

The image processing device addresses lens and image sensor positional changes by estimating depth direction and generating defocus maps to notify users of calibration needs, enhancing image quality in digital cameras.

JP2024116329AActive Publication Date: 2024-08-27CANON KK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024095447
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-07-31
Filing Date
2024-06-12
Publication Date
2024-08-27
Estimated Expiration
2040-07-20

AI Technical Summary

Technical Problem

Digital cameras experience changes in lens and image sensor positions over time, leading to tilt and distance errors that result in image blurring, and there is a need for a method to determine if calibration is necessary and to notify users of such deviations.

Method used

An image processing device that acquires imaging conditions, including F value and conversion coefficients, to estimate the depth direction and normalize distance information, allowing for the calculation of defocus amounts and generation of defocus maps to notify users of lens or image sensor deviations.

Benefits of technology

Enables users to be informed about lens or image sensor tilt and position deviations, ensuring accurate image capture by recommending calibration when necessary, thereby improving image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024116329000001_ABST
    Figure 2024116329000001_ABST
Patent Text Reader

Abstract

To make it possible to report at least one piece of information about the tilt of a lens or an imaging element, or the position or attitude of an imaging apparatus.SOLUTION: An image processing device has input means for inputting a distance information distribution calculated from an image captured using an optical system that forms an image of a field on an imaging element of imaging means, estimation means for estimating the depth direction in the image from photographing conditions of the imaging means, and determination means for determining an evaluation value that indicates the degree of deviation in the depth direction of a subject in the image from the relationship between the distance information distribution and the estimated depth direction.SELECTED DRAWING: Figure 5
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image processing device, and more particularly to information relating to aging of an optical system and an imaging element, and information on the attitude of the image processing device. [Background technology]

[0002] A technique has been known in the past that diagnoses changes in the relative positional relationship of stereo cameras due to aging or the like by referring to distance information acquired from a pair of stereo cameras, and supports the calibration of the stereo cameras. For example, Patent Document 1 discloses a method in which a stereo camera mounted on the head of a robot captures an image of a subject on a substantially flat surface on which a diagnostic texture is provided, in a predetermined positional relationship, and calculates distance information from the obtained parallax image to obtain flatness. The method then discloses a method of determining whether calibration is required by comparing the obtained flatness with a predetermined reference amount. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2004-306249 A Summary of the Invention [Problem to be solved by the invention]

[0004] Even in digital cameras used by general users and not installed on robots, the optical system of lenses and image sensors such as CMOS may shift from the mounting position (design position) at the time of production due to aging and other factors. If the lens or image sensor tilts, the relationship between the actual distance and the depth of field will shift, resulting in an image that the user did not expect. Therefore, even in digital cameras used by general users, there is a demand for a method to determine whether calibration of lenses and image sensors is necessary and how to deal with such cases.

[0005] In addition, when photographing a subject with a digital camera, even if the lens and image sensor have been calibrated, if the imaging device is tilted or the photograph is not taken at an appropriate distance, a good photographed image cannot be obtained. In particular, tilt in the depth direction and distance errors can lead to blurring of the target subject in the photographed image.

[0006] Therefore, an object of the present invention is to provide an image processing device that is capable of reporting at least one piece of information, such as the inclination of the lens or the image sensor, or information on the position or attitude of the image capturing device, based on a distribution of distance information corresponding to the distance to the subject. [Means for solving the problem]

[0007] In order to solve the above problem, the image processing device of the present invention is characterized by having a shooting condition acquisition means for acquiring shooting conditions related to an image captured by an imaging means, the shooting conditions including at least an F-number and a conversion coefficient for converting an image shift amount into a defocus amount, a distance information acquisition means for acquiring a distance information distribution, which is a distribution of distance information corresponding to each region of the image captured by the imaging means, and an image processing means for normalizing the distance information distribution based on the F-number and the conversion coefficient.

[0008] In addition, the image processing method of the present invention is characterized by having an input step of inputting a distance information distribution calculated from an image captured using an optical system that forms an image of the scene on an image sensor of an imaging means, an estimation step of estimating a depth direction in the image from the shooting conditions of the imaging means, and a determination step of determining an evaluation value indicating the degree of deviation in the depth direction of the subject in the image from the relationship between the distance information distribution and the estimated depth direction.

[0009] In addition, the image processing method of the present invention is characterized by having a shooting condition acquisition step of acquiring shooting conditions related to an image captured by an imaging means, the shooting conditions including at least an F-number and a conversion coefficient for converting an image shift amount into a defocus amount, a distance information acquisition step of acquiring a distance information distribution, which is a distribution of distance information corresponding to each region of the image captured by the imaging means, and an image processing step of normalizing the distance information distribution based on the F-number and the conversion coefficient. Effect of the Invention

[0010] According to the present invention, it is possible to notify at least one piece of information regarding the tilt of the lens or the imaging element, or the position or orientation of the imaging device. [Brief description of the drawings]

[0011] [Figure 1] 1 is a block diagram showing an example of the functional arrangement of an image processing device according to a first embodiment of the present invention. [Diagram 2] 1 is a block diagram showing an example of the functional arrangement of a digital camera according to a first embodiment of the present invention. [Diagram 3] FIG. 1 is a block diagram showing an example of the functional arrangement of a computer according to a first embodiment of the present invention. [Figure 4] FIG. 2 is a diagram illustrating an example of the arrangement of an imaging unit according to the first embodiment of the present invention. [Diagram 5] 5 is a flowchart illustrating the operation of the image processing device according to the first embodiment of the present invention. [Figure 6] FIG. 2 is a diagram illustrating an image for recording a still image according to the first embodiment of the present invention. [Figure 7] FIG. 3 is a diagram for explaining a defocus map according to the first embodiment of the present invention. [Figure 8] FIG. 3 is a block diagram showing an example of the functional arrangement of an image processing unit 306 according to the first embodiment of the present invention. [Figure 9] FIG. 2 is a diagram for explaining a surface where the defocus amount is zero according to the first embodiment of the present invention. [Figure 10] FIG. 4 is a diagram for explaining a defocus map when the focus plane is normal according to the first embodiment of the present invention. [Figure 11] 3A to 3C are diagrams for explaining a phenomenon that occurs when the optical system and the image sensor according to the first embodiment of the present invention are deviated from their designed positions. [Figure 12] FIG. 4 is a diagram for explaining a defocus map when the focal plane is tilted according to the first embodiment of the present invention. [Figure 13] FIG. 4 is a diagram for explaining an evaluation value indicating a degree of deviation according to the first embodiment of the present invention. [Figure 14] FIG. 4 is a diagram for explaining a notification to a user according to the first embodiment of the present invention. [Figure 15] 5A to 5C are diagrams for explaining the estimation results of the vanishing point and the depth direction according to the first embodiment of the present invention. [Figure 16] FIG. 4 is a diagram for explaining a histogram for a defocus map according to the first embodiment of the present invention. [Figure 17] 4A to 4C are diagrams illustrating an image for still image recording in a portrait scene, a defocus map, and a histogram for the defocus map according to the first embodiment of the present invention. [Figure 18] 3A to 3C are diagrams illustrating peripheral light falloff characteristics of the optical system according to the first embodiment of the present invention. [Figure 19A] FIG. 19 is a block diagram showing an example of the hardware configuration of a camera apparatus 1900 and a lens apparatus 1913 according to a second embodiment of the present invention. [Figure 19B] FIG. 11 is a block diagram showing an example of the functional arrangement of a camera device 1900 according to a second embodiment of the present invention. [Figure 20] FIG. 11 is a block diagram showing an example of the hardware configuration of a camera head device 2000 according to a second embodiment of the present invention. [Figure 21] 10A to 10C are diagrams for explaining an imaging method for imaging a social infrastructure structure according to a second embodiment of the present invention. [Figure 22] 10 is a flowchart showing the operation of an imaging system according to a second embodiment of the present invention. [Figure 23] FIG. 2 is a diagram for explaining a switch 2007 according to a second embodiment of the present invention. [Figure 24] 10A to 10C are diagrams relating to rotation control of a camera device 1900 according to a second embodiment of the present invention. [Diagram 25] FIG. 25 is a diagram showing an example of the arrangement of a table 2515 according to the second embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] [First embodiment] An image processing device, an image processing method, and an image processing program according to a first embodiment of the present invention will be described below in detail with reference to the drawings. As shown in FIG. 1, an example in which the present invention is applied to an image processing device 100 in which a digital camera 101 as an example of an imaging device and a computer 102 as an example of an image processing device are communicatively connected via a communication circuit 103 will be described. However, the processing performed by the computer 102 below may be executed by the digital camera 101. Moreover, the digital camera 101 may be any electronic device having a photographing function, and the computer 102 may be any electronic device capable of performing the processing described below, or a computer in a server device. Moreover, it may be a mobile type computer or a desktop type computer.

[0013] 2 is a block diagram showing an example of the functional configuration of a digital camera 101 according to an embodiment of the present invention. A system control unit 201 is, for example, a CPU, which reads out an operation program for each block of the digital camera 101 from a ROM 202, expands it into a RAM 203, and executes it to control the operation of each block of the digital camera 101. The ROM 202 is a rewritable non-volatile memory, and stores parameters and the like required for the operation of each block in addition to the operation program for each block of the digital camera 101. The RAM 203 is a rewritable volatile memory, and is used as a temporary storage area for data output in the operation of each block of the digital camera 101.

[0014] The optical system 204 forms an image of the object scene on the imaging unit 205. The imaging unit 205 is an imaging element such as a CCD or CMOS sensor, and photoelectrically converts the optical image formed on the imaging element of the imaging unit 205 by the optical system 204, and outputs the obtained analog image signal to the A / D conversion unit 206. The optical system 204 and the imaging unit 205 are also equipped with an IS mechanism that reduces the effects of camera shake. The A / D conversion unit 206 applies A / D conversion processing to the input analog image signal, and outputs the obtained digital image data to the RAM 203 for storage.

[0015] An image processing unit 207 applies various image processing such as white balance adjustment, color interpolation, reduction / enlargement, and filtering to the image data stored in the RAM 203 .

[0016] The recording medium 208 is a removable memory card or the like, and images processed by the image processing unit 207 stored in the RAM 203 and images A / D converted by the A / D conversion unit 206 are recorded as recorded images.

[0017] A communication unit 209 transmits image data files and the like recorded on the recording medium 208 to an external device via wired or wireless communication.

[0018] The display unit 210 displays image data obtained by shooting, image data read from the recording medium 208, and the like, and also displays various menu screens. It may also function as an electronic viewfinder by displaying a live view image.

[0019] The operation unit 211 is a group of input devices that allow the user to input various instructions and settings to the digital camera 101, and includes keys and buttons that are typically found on digital cameras, such as a shutter button, menu button, directional keys, and an enter key. If the display unit 210 is a touch display, it also serves as the operation unit 211. Note that the operation unit 211 may be configured in a way that does not require physical operation, such as a combination of a microphone and a voice command recognition unit.

[0020] The detection unit 212 includes a gyro and a sensor, and acquires angular velocity information, attitude information, and the like of the digital camera 101. Note that the attitude information includes information such as the inclination of the digital camera 101 with respect to the horizontal direction.

[0021] 3 is a block diagram showing an example of the functional configuration of the computer 102 according to this embodiment. The system control unit 301 is, for example, a CPU, and controls the operation of each block of the computer 102 by reading a program from the ROM 302, expanding it in the RAM 303, and executing it. The ROM 302 is a rewritable non-volatile memory, and stores parameters and the like required for controlling each block in addition to the program executed by the system control unit 301. The RAM 303 is a rewritable volatile memory, and is used as a temporary storage area for data output by each block of the computer 102.

[0022] The communication unit 304 communicates with external devices such as the digital camera 101 via wired or wireless communication. The recording device 305 is, for example, a hard disk, and stores image data received by the communication unit 304 from the digital camera 101.

[0023] The image processing unit 306 performs calculations of the defocus amount (described later) for image data expanded from the recording device 305 to the RAM 303, estimation of the depth direction from the image, and calculations of information related to the degree of deviation of the optical system and the image sensor from their designed positions.

[0024] The display unit 307 is used to display a GUI and various data provided by the OS and applications running on the computer 102. The display unit 307 may be provided in the computer 102 or may be connected as an external device.

[0025] The operation unit 308 is a group of input devices that allow the user to input various instructions and settings to the computer 102, and generally includes a keyboard, a mouse, a trackpad, etc. If the display unit 307 is a touch display, it also serves as the operation unit 308. Note that the operation unit 308 may be configured without requiring physical operation, such as a combination of a microphone and a voice command recognition unit.

[0026] Fig. 4(a) shows the arrangement of pixels in the imaging unit 205 in Fig. 2. As shown in Fig. 4(a), in the imaging unit 205, a plurality of pixels 400 are arranged two-dimensionally and regularly. Specifically, the plurality of pixels 400 are arranged, for example, in a two-dimensional lattice pattern. Note that the arrangement of the pixels 400 is not limited to the lattice arrangement, and other arrangements may also be adopted.

[0027] FIG. 4(b) is an enlarged view of the pixel 400 shown in FIG. 4(a). As shown in FIG. 4(b), each pixel 400 has a microlens 401 and a pair of photoelectric conversion units 402A, 403B (hereinafter referred to as pupil division pixels 402A, 403B, respectively). The pupil division pixels 402A, 403B have the same planar shape, and each has a rectangular planar shape with the y-axis direction as the longitudinal direction. In each pixel 400, the pupil division pixels 402A, 403B are arranged line-symmetrically with the perpendicular bisector of the microlens 401 along the y-axis direction as the axis of symmetry. Note that the planar shapes of the pupil division pixels 402A, 403B are not limited to this, and other planar shapes can be adopted. Furthermore, the arrangement of the pupil division pixels 402A, 403B is not limited to this, and other arrangements can be adopted.

[0028] In this embodiment, the A image and the B image are output as parallax images from the pupil division pixels 402A and 403B that are regularly arranged two-dimensionally. In addition, the A+B image obtained by adding the A image and the B image is recorded as a recorded still image in the recording medium 208. By configuring the imaging unit 205 as shown in FIG. 4(a) and FIG. 2(b), a pair of light beams passing through different regions of the pupil of the optical system 204 can be formed as a pair of optical images, which can be output as the A image and the B image. Note that the method of acquiring the A image and the B image is not limited to the above, and various methods can be adopted. For example, the A image and the B image may be images with parallax between each other acquired by an imaging device such as a plurality of cameras that are installed at spatial intervals. In addition, the A image and the B image may be parallax images acquired by an imaging device such as a single camera having a plurality of optical systems and an imaging unit.

[0029] The operation of the image processing device 100 will be described below. When a shooting instruction, such as fully pressing the shutter button, is input via the operation unit 211 of the digital camera 101, the image processing device 100 executes the processes shown in Figures 5(a), 5(b), and 5(c). It is assumed that the processes in Figures 5(a) and 5(c) are executed by the digital camera 101, and the process in Figure 5(b) is executed by the computer 102.

[0030] First, in step S500, the system control unit 201 detects the state of the camera when the shutter button is pressed via the detection unit 212. Here, the inclination of the digital camera 101 with respect to the horizontal direction and the vertical direction are detected as the state of the camera.

[0031] In the next step S501, the system control unit 201 performs shooting processing according to the exposure conditions determined in the shooting preparation state, and acquires an image A and an image B, which are a pair of parallax images, from the imaging unit 205. Note that a configuration may be adopted in which the images A and B recorded in advance in the recording medium 208 are read out and acquired. The images A and B may also be added together and recorded in the recording medium 208 as an image for recording a still image. An image for recording a still image in this embodiment is shown in Fig. 6. Fig. 6 shows an image obtained by adding together the captured images A and B. Also, 600 is an autofocus frame.

[0032] In the next step S502, the system control unit 201 controls the image processing unit 207 to output data representing a spatial (two-dimensional) defocus amount distribution in the shooting range from the parallax images acquired in step S501. In the following description, the data representing the spatial defocus amount distribution is referred to as a defocus map. The defocus amount is a type of distance information, since it is the amount of focus deviation from the distance at which the optical system 204 is focused. The defocus amount can be acquired by using a method of calculating the phase difference between parallax images, such as the method disclosed in Japanese Patent Application Laid-Open No. 2008-15754. Specifically, the relationship between the deviation amount of the parallax images and the defocus amount is expressed by the following formula: DEF = KX PY x (1)

[0033] In equation (1), DEF is the defocus amount, PY is the detection pitch (the arrangement pitch of pixels of the same type), KX is a conversion coefficient determined by the magnitude of the opening angle of the center of gravity of the light beam passing through a pair of pupils, and x is the amount of shift of the parallax images.

[0034] Furthermore, the present invention is not limited to this, and a distribution of shift amounts, which are the amounts of deviation of parallax images, may be acquired as the distribution of distance information.

[0035] Further, the distance information distribution may be information expressed in units of length such as micrometers by multiplying the displacement amount of the parallax image by the detection pitch PY.

[0036] Furthermore, the present invention is not limited to this, and the defocus amount as the distance information distribution may be converted into a distribution of actual distances by further referring to the focus lens position.

[0037] The present invention is not limited to this, and a distribution of values ​​normalized by the amount of defocus Fδ (F is the aperture value, and δ is the allowable circle of confusion diameter) may be obtained as the distance information distribution. This distribution expresses the amount of blur with respect to δ. Here, the aperture value F may be applied to the entire distribution as the shooting aperture value, but in order to obtain a more accurate distribution of the amount of blur, it is preferable to apply an effective aperture value (effective aperture value) that takes into account the vignetting characteristics of the optical system 204 under the shooting conditions. FIG. 18 is a graph showing an example of vignetting characteristics V(h), in which the horizontal axis represents the distance from the optical center (image height) and the vertical axis represents the amount of light normalized with the amount of light at the center of the image height set to 1 at each image height. Vignetting occurs due to the lens frame and the aperture frame, and in FIG. 18, as the image height increases (approaching the edge of the shooting range), the amount of light decreases. This vignetting characteristic has a unique property for each lens. Here, the effective aperture value F' at the image height h is expressed by the following formula, referring to the vignetting characteristics. F´=F / √V(h) (2)

[0038] A defocus map for the image in FIG. 6 is shown in FIG. 7. The defocus map 700 is expressed in a continuous grayscale value that becomes whiter (higher pixel value) as the distance becomes closer. 701 is an autofocus frame, and in-focus areas (where the defocus amount is zero) are expressed in gray. 702 is a straight line connecting in-focus areas.

[0039] Next, in step S503, the system control unit 201 transmits the image data and the following information to the computer 102 via the communication unit 209. -Images for recording still images Defocus Map -Camera status detection information (information on camera tilt detection) Autofocus frame position information · Camera body identification number (ID) · Attached lens identification number (ID) Shooting information such as F-stop and ISO sensitivity

[0040] The above information is recorded or transmitted in association with each other. For example, if the format is JPEG, it may be recorded in Exif information, and if the format is RAW data, it may be recorded in one file as image additional information. Alternatively, the necessary information may be recorded or transmitted together with the image as a container file that can store multiple related data together. Alternatively, the information may be recorded or transmitted as separate files without being combined. For example, the data must be processed so that they can be recognized as related data files, such as by using the same file name, including them in the same folder, or transmitting each data in sequence (the receiving side can recognize that each piece of information is related based on the order and type of data). Since the file structure and transmission control according to the transmission protocol related to recording and transmission are not directly related to the present invention and known methods can be used, detailed explanations are omitted. Note that the above information may be transmitted to the computer 102 through the communication unit 209 after being recorded on the recording medium 208, or the recording medium 208 may be removed from the digital camera 101 and the image data may be read by the computer 102. Also, the defocus map (recorded information distribution) may not be generated on the camera side, but may be generated by the computer 102 by recording a paired parallax image together with the related information.

[0041] In this embodiment, the processes from step S504 to step S508 are executed by the computer 102. By executing the processes from step S504 to step S508 on a device other than the digital camera 101, the user can know information related to the degree of deviation from the design positions of the optical system and the image sensor without performing any special camera operation. In addition, although the defocus map is generated in the digital camera 101 in this embodiment, a parallax image may be transmitted to the computer 102, and the defocus map may be generated in the computer 102. When the computation load in the digital camera 101 is high during continuous shooting, the computation for generating the defocus map can be distributed to the computer 102, thereby reducing the time required to calculate information related to the degree of deviation from the design positions of the optical system and the image sensor. In addition, by transmitting information on the conversion coefficient KX and the effective aperture value F', which are uniquely determined by the lens used and the shooting conditions, the computer 102 can also generate various distance information distributions. Alternatively, information on the conversion coefficient KX and the effective aperture value F' may be stored in advance in the computer 102, and the information may be read out from the stored information based on the received lens identification (ID) number and shooting information.

[0042] Fig. 8 is a block diagram showing a typical example of the functional configuration of the image processing unit 306 of the computer 102 of this embodiment. The operation of the image processing unit 306 will be described below with further reference to Fig. 5(b). Note that the operation of the image processing unit 306 is realized under the control of the system control unit 301.

[0043] First, the system control unit 301 receives the information transmitted in step S503, and loads the read data into the RAM 303 (step S504).

[0044] Next, in step S505, the depth direction estimation unit 800 estimates the depth direction of the image from the camera state detection information 803 (shooting conditions) at the time of acquiring the parallax image, which is recorded in the RAM 303. In this embodiment, the depth direction is estimated with reference to a surface where the defocus amount is zero. Here, the surface where the defocus amount is zero will be described with reference to FIG.

[0045] 9 shows a state where a planar subject 901 on the ground is photographed from a bird's-eye view of a digital camera 101 with the optical system and image sensor not displaced from their designed positions, and with the digital camera 101 having zero tilt with respect to the horizontal direction (x-axis direction in FIG. 9). If an autofocus frame 903 is located at the point where an optical axis 900 and the subject 901 intersect, a plane connecting the in-focus areas (hereinafter referred to as the focal plane) is a plane 902 that is parallel to the imaging unit 205 and perpendicularly intersects with the optical axis 900. Furthermore, the focal plane 902 in the image of the subject 901 can be represented by a straight line 904 that passes through the autofocus frame 903. A defocus map in the image of the subject 901 is shown in FIG. 10 at 1000, the autofocus frame at 1001, and the focal plane at 1002. 10, when an image is captured with a camera looking down with the optical system and image sensor not displaced from their designed positions and with zero tilt to the horizontal direction, the focal plane 1002 is a straight line horizontal to the image. Furthermore, since the vertical orientation of the camera at the time of capture is also known, the upper part of the focal plane 1002 is farther away and the lower part is closer. In other words, it can be estimated that the depth direction changes from the bottom to the top of the captured image. The depth direction estimation unit 800 outputs the equation of the straight line representing the focal plane 1002 as depth estimation information 804.

[0046] The deviation calculation unit 801 calculates information 805 related to the degree of deviation of the optical system that captured the parallax images and the image sensor from their designed positions, based on the defocus map 802 and the depth estimation information 804 (the equation of a straight line representing the focal plane) obtained by the depth direction estimation unit 800 (step S506).

[0047] Here, a phenomenon that occurs when the optical system and the image sensor are displaced from their designed positions will be described with reference to FIG. 11. FIG. 11(a) shows a state in which the optical system 204 and the image sensor 205 are in their designed positions. When an image is captured in this state, the focal plane 1100 is parallel to the image sensor 205. On the other hand, FIG. 11(b) shows a state in which the optical system 204 is displaced from its designed position and decentering occurs. In this case, according to Scheimpflug's law, the focal plane 1101 also tilts according to the angle θ formed by the optical system 204 and the image sensor 205. In the state of FIG. 11(b), the camera is in a bird's-eye view and the inclination of the camera relative to the horizontal direction is zero. In FIG. 12, 1200 shows a defocus map of an image captured of a planar subject on the ground, 1201 shows an autofocus frame, and 1202 shows a focal plane. It can be seen from FIG. 12 that the depth changes from the lower right to the upper left of the screen. Therefore, a deviation occurs from the direction of change in depth (FIG. 10) when the optical system and the image sensor are not displaced from their designed positions. This causes a mismatch between the user's sense of distance and the focal plane, resulting in photographic results that the user did not expect.

[0048] The deviation calculation unit 801 calculates an angle θ_diff between the equation of a line representing the focal plane 1202 in the defocus map 802 and the line 1002 representing the focal plane estimated by the depth direction estimation unit 800, and stores the angle in the RAM 303 as an evaluation value 805 indicating the deviation degree. FIG. 13 shows θ_diff. The larger θ_diff is, the greater the deviation of the optical system and the image sensor from their designed positions (calibration is required). If the camera is tilted relative to the horizontal direction when an image is captured, the angle of the tilt can be subtracted from θ_diff for correction, and the effect of the present invention can be obtained even when the image is captured with the camera tilted relative to the horizontal direction.

[0049] In the following step S507, the system control unit 301 compares the calculated θ_diff with a threshold value stored in advance, and if θ_diff is greater than the threshold value, executes step S508, and if θ_diff is equal to or less than the threshold value, ends the process.

[0050] In step S508, the system control unit 301 transmits the following information to the digital camera 101 via the communication unit 304 to notify the user that the optical system and image sensor in the camera they are using are misaligned from their designed positions: -Identification number of the camera that detected the misalignment -Identification number of the lens that detected the misalignment In step S509, the system control unit 201 in the digital camera 101 checks whether the information transmitted from the computer 102 has been received. If so, step S510 is executed, and if not, the process ends.

[0051] 14 on the display unit 210, and recommends sending the camera and lens to a customer center for repairs. The customer center receives camera and lens ID information and the like together with the image data from the user (digital camera 101), which is useful for identifying repair and malfunction information, collecting statistics, and the like.

[0052] As described above, according to this embodiment, it is possible to calculate information relating to the degree of deviation of the optical system and the image sensor from their designed positions and notify the user of the information, without impairing user convenience.

[0053] In addition, in this embodiment, a message is displayed to inform the user that the optical system and the image sensor are misaligned from their designed positions, but to make it easier for the user to recognize the occurrence of the misalignment, an image may be displayed on the display unit 210. Specifically, the display unit 210 may be configured to display the grayscale defocus map of Fig. 12 generated in step S502, or a defocus map converted into color values ​​by lookup table conversion or the like.

[0054] In the present embodiment, information is displayed to the user when there is a deviation from the design position of the optical system or the image sensor, but the information may be displayed when the deviation cannot be detected, or in either case. By configuring in this way, the user can know whether calibration is necessary or not when he or she needs the judgment result immediately.

[0055] In addition, in the present embodiment, the case where the defocus map is generated from the calculation of the amount of parallax using a pair of parallax images has been described as an example, but the present invention is not limited to this. As a method for generating the defocus map, for example, a configuration using a DFD (Depth From Defocus) method that acquires a defocus map from the correlation of two images with different focus positions and aperture values ​​may be used. Since it is possible to calculate information related to the degree of deviation of the optical system and the image sensor from their designed positions using images acquired in the aperture bracket shooting mode, it is possible to increase the opportunities for detecting deviations and provide information to the user at an appropriate time.

[0056] In addition, in this embodiment, the depth direction of the image is estimated from the camera state detection information, but the present invention is not limited to this, and for example, the depth direction can be estimated using information on the vanishing point. By configuring in this way, even a camera without a gyro or sensor for detecting the camera state can obtain the effect of the present invention, improving user convenience. Below, we will explain the estimation of the depth direction using vanishing point detection and the method of calculating information related to the degree of deviation from the design position of the optical system and the image sensor.

[0057] A vanishing point is a point where the straight lines on the screen plane that correspond to parallel lines in a three-dimensional space converge when the parallel lines are projected onto an image plane by perspective transformation. In other words, a vanishing point is an "infinitely distant point" on a flat image onto which a space that actually has depth is projected, and is recognized as a point where the extensions of lines parallel to the depth direction intersect, or a point where the extensions of a surface extending in the depth direction converge to infinity. Therefore, the straight lines in an image can be detected using a known method such as Hough transform, and the point where the detected multiple straight lines converge most can be detected as the vanishing point. The result of detecting the vanishing point in FIG. 6 is shown in FIG. 15.

[0058] 15 is the vanishing point. The depth direction can be estimated as a direction 1501 from the autofocus frame 600 toward the vanishing point. The depth direction estimation unit 800 outputs the direction 1501 toward the vanishing point as depth direction estimation information 804.

[0059] Deviation calculation unit 801 calculates the gradient (direction of change) of the defocus amount near the autofocus frame in defocus map 802 using known technology. Then, an evaluation value indicating the degree of deviation from the designed positions of the optical system and image sensor is calculated from the difference with depth direction estimation information 804. Specifically, the direction toward the vanishing point and the gradient direction of the defocus amount are each treated as vectors, and the difference between both vectors is used as the evaluation value. The greater the deviation of the optical system and image sensor from their designed positions, the larger the evaluation value.

[0060] In addition, the method of estimating the depth direction of an image by referring to features extracted from the image is not limited to the above vanishing point detection, but can also use information on changes in texture density. The depth direction of an image is detected by referring to changes in texture density. For example, the method described in “Texture Structure Classification and Depth Estimation using Multi-Scale Local Autocorrelation Features”, KANG Y, HASEGAWA O, NAGAHASHI H (Tokyo Inst. Technol.), JST-PRESTO (non-patent document) can be adopted.

[0061] Specifically, the depth direction estimation unit 800 refers to an image for recording still images, and utilizes the fact that when a uniform texture is present in the image (for example, a road in FIG. 6), the density of the texture decreases as it moves further away. In other words, when the depth direction estimation unit 800 detects an area in the image where the density of homogeneous texture gradually decreases, it determines that a plane covered with a certain texture is moving away from the shooting position. The direction moving away from the front is output as the depth direction estimation information 804. Since it is particularly easy to detect fine textures in the in-focus area, the depth direction can be estimated with high accuracy by making the above judgment for the vicinity of the autofocus frame. Furthermore, it is possible to use a known general object detection to detect in advance areas where a uniform texture is likely to exist, such as the ground or water surface of a road, or a hedge that is a structure laid in a vertical direction to the ground or water surface, and limit the target area. In this way, the processing time required for estimating the distribution of positions in the depth direction can be reduced.

[0062] Then, in the same manner as when a vanishing point is used, the deviation calculation unit 801 uses as an evaluation value the difference between the vector of the gradient (direction of change) of the defocus amount near the autofocus frame in the defocus map 802 and the depth direction vector estimated from the change in texture density.

[0063] In addition, in this embodiment, an evaluation value indicating the degree of deviation of the optical system and the image sensor from the design position is calculated from one captured image, and a determination is made as to whether or not a deviation has occurred. However, the present invention is not limited to this, and a configuration may be adopted in which a determination is made when the number of images captured by the user reaches a certain reference number. By making a determination from the evaluation values ​​of multiple captured images, it is possible to improve the accuracy of determining whether or not a deviation has occurred. In addition, the condition for whether or not to notify that the optical system and the image sensor have detected a deviation from the design position can be improved by checking whether or not the number of images in which a deviation has been detected has reached a certain reference number.

[0064] Also, instead of determining the degree of deviation from the design positions of the optical system and the image sensor for all captured images, it is preferable to perform a process of determining the degree of deviation after evaluating a large number of images in advance as to whether the images are suitable for determining the degree of deviation. Specifically, the above-mentioned general object detection is performed, and an image is evaluated as to whether it has a uniform texture such as a road and is suitable for estimating the depth direction. By configuring in this way, the processing time required for determining the degree of deviation can be reduced. In addition, since a subject having a texture such as a road is also suitable for detecting the phase difference of the parallax image in step S502, a more accurate evaluation value of the degree of deviation can be expected. In addition, by recording known GPS information as auxiliary information of the image, it is possible to determine whether a subject having a texture such as a road is likely to be captured in the captured image. By selecting images that are expected to have texture from a large number of images captured by the user in advance, the time required to calculate a highly accurate evaluation result can be shortened. In addition, in the case of a camera with a detachable optical system, statistics are taken on whether the optical system and the image sensor can detect deviation from the design position for each individual lens attached. This makes it possible to distinguish whether the misalignment is occurring in the optical system or in the image sensor, and provides the user with more detailed judgment results.

[0065] In addition, in the deviation calculation unit 801, by considering the following contents to obtain the gradient of the defocus map 802 with high accuracy, it is possible to obtain a highly accurate evaluation result. Specifically, a histogram (statistical information) is obtained in the calculated defocus map, and it is judged whether or not the gradient of the defocus amount can be obtained with high accuracy from the shape of the histogram. As will be described below, it is preferable to select an image in which the histogram width is wide and changes smoothly. FIG. 16 shows a histogram in the defocus map of FIG. 7. As shown in FIG. 16, FIG. 7 shows that the defocus amount is widely distributed from the front to the back, and the change in the defocus amount is also smooth, so that it can be said that the image is suitable for evaluating the direction of change in the defocus amount in the entire image. On the other hand, FIG. 17(b) shows a defocus map and FIG. 17(c) shows a histogram in an image in which a bust-up person is captured in portrait photography, as shown in FIG. 17(a). It can be seen that the defocus amount in the image is concentrated on the bust-up person, so that it is not suitable for evaluating the direction of change in the defocus amount in the entire image. In the deviation degree calculation unit 801, the histogram of the defocus map is checked before being compared with the depth direction estimation information 804, and if the image is not suitable for evaluating the deviation degree, the determination process is interrupted, thereby reducing the calculation time.

[0066] In step S502, in order to accurately obtain the phase difference of the parallax images, it is sufficient to select images with a high S / N ratio. Therefore, by giving priority to selecting images taken with as low a sensitivity as possible from a large number of images taken, the accuracy of the evaluation value can be improved.

[0067] In addition, since the phase difference of the parallax image is affected by the aberration in the optical system 204, it is preferable to correct the aberration grasped as the design information of the optical system before comparing it with the result estimated by the depth direction estimation unit 800. In addition, it is also possible to limit the area to be compared to an area that is less affected by the aberration. By taking the above measures, it is possible to calculate an evaluation result with higher accuracy.

[0068] Also, in step S510, when the digital camera 101 receives information indicating the occurrence of deviation of the optical system and the image sensor from the design positions, a display is output on the display unit of the digital camera 101 to prompt the user to send the camera and the lens to the customer center for repair. However, other measures can also be taken. Specifically, in step S508, an evaluation value 805 indicating the degree of deviation is also transmitted to the digital camera 101. Then, according to the evaluation value 805 indicating the degree of deviation, a simple calibration can be performed by driving the IS mechanism mounted on the optical system and the image sensor so that the optical system and the image sensor approach a state where there is no deviation from the design positions. Alternatively, the evaluation value 805 indicating the degree of deviation can be referred to and image processing (sharpness or blurring processing) can be performed on the area where the focal plane is tilted, so that the image can be processed to approach an image obtained when there is no deviation of the optical system and the image sensor from the design positions. Specifically, a blurring process is performed on an area where the defocus amount is closer to the in-focus state compared to a state where there is no deviation. Conversely, sharpness processing is applied to areas that are closer to the background or foreground than the original defocus amount. By configuring as described above, even if the user is unable to send the camera and lens for repair, it is possible to obtain an image with a depth of field that matches the user's expectations, thereby improving user convenience.

[0069] Furthermore, the information on the occurrence of the deviation of the optical system and the image sensor from the designed position may be sent not only to the user's camera but also to a customer center. By having the customer center manage the customer information registered by the user together with information on all the equipment owned, it becomes possible to further improve the convenience for users by shortening the time required for repairs, by recording the number of occurrences of deviation of the optical system and the image sensor from the designed position and a maintenance record.

[0070] Also, when the user uses a single camera and lens for photographing, the display unit 201 may be configured to display whether to execute an operation mode for determining whether the cause of the occurrence is due to the optical system or the image sensor. When the user selects the operation mode for determining the cause, the display unit 201 issues an instruction to prompt the user to take an image suitable for determining the cause. Specific instructions include having the user attach graph paper to a wall facing the user and take an image while changing the photographing conditions of the optical system (focal length, focus lens position, aperture). If the analysis results show that changing the photographing conditions of the optical system changes the judgment result, the lens is the cause, and if the occurrence of the deviation is detected regardless of the photographing conditions, the image sensor is the cause. With this configuration, it becomes possible to find the cause of the deviation of the optical system and the image sensor from the designed position, and to give a more accurate notification or repair.

[0071] [Second embodiment] Hereinafter, an image processing device, an image processing method, and an image processing program according to a second embodiment of the present invention will be described in detail with reference to the drawings. Note that components similar to those of the image processing device according to the first embodiment are given the same reference numerals and descriptions thereof will be omitted or simplified.

[0072] In the first embodiment, a configuration has been described in which information relating to the degree of deviation from the design positions of the optical system and the image sensor, which are internal parameters of the camera device 100, is calculated and notified to the user. In the second embodiment of the present invention, a configuration in which the position or orientation, which is an external parameter of the image processing device, is calibrated, will be described.

[0073] First, an imaging system according to the present embodiment will be described. The imaging system according to the present embodiment is for imaging an inspection target surface of a structure that is a target of social infrastructure inspection, and in particular for easily realizing frontal imaging of the inspection target surface or evaluation of the captured images. The imaging system according to the present embodiment includes a camera device as an imaging device that captures moving images or captures still images periodically / irregularly, a lens device attached to the camera device, and a pan head device that rotates the camera device.

[0074] First, an example of the hardware configuration of a camera device 1900 and a lens device 1913 according to this embodiment will be described with reference to the block diagram of Fig. 19A. However, in this embodiment as well, the imaging device may be configured with the same digital camera 101 as in the first embodiment. Fig. 19A shows a state in which a lens device 1913 is attached to the camera device 1900.

[0075] First, a hardware configuration example of the camera device 1900 will be described. The camera device 1900 according to this embodiment acquires distance information distribution at multiple positions within the imaging range of the camera device 1900, acquires information instructing the rotation or translation of the camera device 1900 based on the difference between the acquired distance information, and outputs the acquired information. Here, the distance information and distance information distribution may be in the form of any of the following: an image shift amount and an image shift amount distribution based on a pair of parallax images, a defocus amount and a defocus map acquired by any means, or subject distance information and a subject distance map, as in the first embodiment.

[0076] A CPU (Central Processing Unit) 1901 executes various processes using computer programs and data stored in a ROM (Read-Only Memory) 102 and a RAM (Random Access Memory) 1903. As a result, the CPU 1901 controls the overall operation of the camera device 1900, and executes or controls each process to be described later as being performed by the camera device 1900.

[0077] The ROM 1902 stores setting data for the camera device 1900, computer programs and data related to the startup of the camera device 1900, computer programs and data related to the basic operations of the camera device 1900, and the like.

[0078] The RAM 1903 has an area for storing computer programs and data read from the ROM 1902, and computer programs and data read from a memory card 1909 via a recording medium I / F 1908. The RAM 1903 also has an area for storing captured images output from the image sensor 1904, computer programs and data received from an external device via an external I / F 1910, and data received from the lens device 1913 by the camera communication unit 107. The RAM 1903 also has a work area used when the CPU 1901 executes various processes. In this way, the RAM 1903 can provide various areas as appropriate.

[0079] 2, and generates and outputs a captured image according to light incident via the lens device 1913. The display unit 1905 is a device such as a liquid crystal display (LCD) or an organic light emitting display (OLED) that displays images and characters on a display screen or a finder screen. Note that the display unit 105 does not have to be included in the camera device 1900, and may be, for example, an external device capable of wireless and / or radio communication with the camera device 1900.

[0080] The operation unit 1906 is a user interface such as a button, a dial, a touch panel, a joystick, etc., and the user can input various instructions to the CPU 1901 by operating it.

[0081] A camera communication unit 1907 performs data communication between the camera device 1900 and a lens device 1913. A recording medium I / F 1908 is an interface for mounting a memory card 1909 in the camera device 1900, and the CPU 1901 reads and writes data from and to the memory card 1909 via the recording medium I / F 1908.

[0082] The memory card 1909 is, for example, a card-type recording medium such as SD, CF, CFexpress, XQD, CFast, etc. The memory card 109 may also be one that records data in an external device via a wireless network.

[0083] The external I / F 1910 is a communication interface for performing data communication with an external device, and the CPU 1901 performs data communication with the external device via the external I / F 1910. The power supply unit 1910 supplies power to the camera device 1900 and manages the power supply.

[0084] The CPU 1901 , ROM 1902 , RAM 1903 , image sensor 1904 , display unit 1905 , operation unit 1906 , camera communication unit 1907 , recording medium I / F 1908 , external I / F 1910 , and power supply unit 1911 are all connected to a system bus 1912 .

[0085] Next, a description will be given of an example of the hardware configuration of the lens apparatus 1913. The CPU 1914 executes various processes using computer programs and data stored in the ROM 1915 and the RAM 1916. As a result, the CPU 1914 controls the operation of the entire lens apparatus 1913, and executes or controls each process to be described later as being performed by the lens apparatus 1913.

[0086] The ROM 1915 stores setting data for the lens apparatus 1913, computer programs and data related to the startup of the lens apparatus 1913, computer programs and data related to the basic operation of the lens apparatus 1913, and the like.

[0087] The RAM 1916 has an area for storing computer programs and data read from the ROM 1915, and data received from the camera device 1900 by a lens communication unit 1919. The RAM 1916 further has a work area used when the CPU 1914 executes various processes. In this way, the RAM 1916 can provide various areas as needed.

[0088] The lens communication unit 1919 performs data communication between the camera device 1900 and the lens device 1913. For example, the lens communication unit 1919 receives control information from the camera device 1900 to the lens device 1913, communicates the operating state of the lens device 1913 to the camera device 1900, and receives power supply from the camera device 1900.

[0089] The display unit 1917 is a liquid crystal display (LCD), an organic light emitting display (OLED), or the like, and is a device that displays the operating state of the lens device 1913. Note that the display unit 1917 does not have to be included in the lens device 1913, and may be, for example, an external device capable of wireless and / or radio communication with the lens device 1913.

[0090] The operation unit 1918 is a user interface such as a button, a dial, a touch panel, a joystick, etc., and the user can operate it to input various instructions to the CPU 114. In addition, the instructions input by the user operating the operation unit 1918 can also be transmitted to the camera device 1900 by the lens communication unit 1919.

[0091] The lens driving unit 1920 controls the optical lens of the lens device 1913 based on instructions from the CPU 1901 or CPU 114, thereby controlling the aperture, focus, zoom focus, image stabilization, etc. After the lens driving unit 1920 controls the aperture, focus, zoom focus, image stabilization, etc., the light that enters through the optical lens is received by the image sensor 1904, which generates and outputs a captured image according to the received light.

[0092] The CPU 1914 , ROM 1915 , RAM 1916 , lens communication unit 1919 , display unit 1917 , operation unit 1918 , and lens driving unit 1920 are all connected to a system bus 1921 .

[0093] Next, an example of the hardware configuration of the camera head device 2000 according to this embodiment will be described with reference to the block diagram of FIG.

[0094] The CPU 2001 executes various processes using computer programs and data stored in the ROM 2002 and the RAM 2003. In this way, the CPU 2001 controls the operation of the entire pan-head device 2000, and executes or controls each process to be performed by the pan-head device 2000, which will be described later.

[0095] The ROM 2002 stores setting data for the pan head device 2000, computer programs and data related to the startup of the pan head device 2000, computer programs and data related to the basic operations of the pan head device 2000, and the like.

[0096] The RAM 2003 has an area for storing computer programs and data read from the ROM 2002. The RAM 2003 also has a work area used when the CPU 2001 executes various processes. In this way, the RAM 2003 can provide various areas as needed.

[0097] The external I / F 2004 is a communication interface for receiving various instructions from the remote control device 2010 via wireless or wired communication. The remote control device 2010 is a device for inputting various instructions to the camera platform device 2000, and can input, for example, a change instruction for changing the pan angle or tilt angle of the camera device 1900 placed on the camera platform device 2000. The external I / F 2004 can also communicate with the camera device 1900 placed on the camera platform device 2000.

[0098] The power supply unit 2005 supplies power and manages the power supply in the pan / tilt head device 2000. The display unit 206 is a device such as a liquid crystal display (LCD) or an organic light emitting display (OLED) that displays the operating status of the pan / tilt head device 2000. Note that the display unit 2006 does not have to be included in the pan / tilt head device 2000, and may be, for example, an external device capable of wireless and / or radio communication with the pan / tilt head device 2000.

[0099] The operation unit 2007 is a user interface such as a button, dial, touch panel, joystick, etc., and the user can input various instructions to the CPU 2001 by operating it.

[0100] The driving unit 2008 includes a base (fixing member) for fixing the camera device 1900, and a driving mechanism for driving the base in the pan, tilt, and translation in the XYZ directions. The driving unit 2008 controls the driving mechanism to control the pan angle, tilt angle, and position in the XYZ directions of the camera device 1900 based on instructions received from the remote control device 210 via the external I / F 2004. In this embodiment, the camera device 1900 is mounted on the above-mentioned camera platform device 2000 to control the pan, tilt, and shooting position of the camera device 1900. However, the present invention is not limited to this, and can be applied to a device such as a drone in which at least one of the pan, tilt, and shooting position of the camera device 1900 is controlled by moving the device itself.

[0101] The CPU 2001 , ROM 2002 , RAM 2003 , external I / F 2004 , power supply unit 2005 , display unit 2006 , operation unit 2007 , and drive unit 2008 are all connected to a system bus 2009 .

[0102] Next, a functional configuration example of the camera device 1900 will be described with reference to the block diagram of Fig. 19B. In the following, each functional unit shown in Fig. 19B will be described as the subject of processing, but in reality, the operation of the functional unit is realized by the CPU 1901 executing a computer program corresponding to the functional unit. Also, at least a part of the functional units shown in Fig. 19B may be implemented by hardware.

[0103] The object recognition unit 1928 uses a known general object detection to recognize whether the inspection target surface of the structure that is the target of the social infrastructure inspection is captured in the captured image. Specifically, the object recognition unit 1928 stores features related to the structure that is the target of the infrastructure inspection in advance, and compares the captured image with the features of the stored image. This result is also used as information for estimating the depth direction in the image. If the result of the recognition is that the inspection target surface of the structure that is the target of the social infrastructure inspection is captured, a process is performed to calibrate the camera device 1900 so that it is in a direct relationship with the inspection target surface of the structure. Here, if the inspection target surface is a flat surface, the camera and the structure are in a direct relationship, so the defocus amount within the imaging range should be approximately uniform. As a goal of the calibration, similar to the method of determining the degree of deviation from the design positions of the optical system and the imaging element described in the first embodiment, the position and orientation of the camera device 1900 may be corrected so that each value of the distance information distribution within the imaging range becomes uniform (within a predetermined range). However, in the following embodiment, as an example, a method of simply setting control of the pan or tilt direction from the defocus amount of a part of the shooting range will be shown.

[0104] The determination unit 1922 acquires setting information indicating "the rotation direction and translation direction in which the camera device 1900 is operated so that the camera device 1900 faces the inspection target surface of the structure that is the subject of the social infrastructure inspection." The setting information is determined, for example, by the user operating the operation unit 1906. If the setting information indicates that the camera is driven in the rotation direction and horizontal direction (pan direction), the determination unit 1922 sets two areas aligned on the left and right within the imaging range of the camera device 1900 as "areas for acquiring the defocus amount" (for example, a position near the left end and a position near the right end within the imaging range). Here, the minimum unit of each area is one pixel.

[0105] On the other hand, if the camera drive indicated by the setting information is in the rotational and vertical directions, the determination unit 1922 sets two areas aligned vertically within the imaging range of the camera device 1900 as "areas for acquiring the defocus amount" (for example, positions near the top and bottom of the imaging range). Here, too, the minimum unit of each area is one pixel.

[0106] Furthermore, if the driving of the camera indicated by the setting information is translational movement, the determination unit 1922 sets four areas aligned vertically and horizontally within the imaging range of the camera device 1900 as "areas for acquiring the defocus amount." Again, the minimum unit of each area is one pixel.

[0107] Furthermore, this embodiment does not use setting information by the user (or does not depend on setting information), and may acquire distance information in multiple regions, i.e., acquire a distance information distribution, as in the first embodiment, and control the driving of the camera head device 2000 (position and orientation of the camera) based on the analysis results of the distribution information. In this case, the "region for acquiring the defocus amount" is, for example, the entire region in which the defocus amount can be acquired. Since the two-dimensional or three-dimensional tilt of the distance information can be known by plane detection, for example, by acquiring the distance information distribution, the position and orientation of the camera may be controlled so that the tilt is close to zero in each direction when facing forward.

[0108] The control unit 1924 acquires the defocus amount from the "area for acquiring the defocus amount" determined by the determination unit 1922 within the imaging range of the camera device 1900. The acquisition unit 1923 acquires the defocus amount acquired by the control unit 1924. The difference calculation unit 1925 calculates the difference between one defocus amount acquired by the acquisition unit 1923 and the other defocus amount.

[0109] The determination unit 1926 determines notification information for notifying "the degree of rotation or degree of translation (including the direction) for driving the camera device 1900" based on the difference calculated by the difference calculation unit 1925. The output unit 1927 outputs the notification information determined by the determination unit 1926 to the pan head device 2000 via the external I / F 1910. The pan head device 2000 acquires the notification information via the external I / F 2004, and controls the camera device 1900 by the drive unit 2008 based on the notification information so that the camera device 1900 is in a desired position and orientation.

[0110] In this embodiment, such an imaging system is used to image a social infrastructure structure to be inspected, and the social infrastructure structure is inspected based on the captured image obtained by imaging. An imaging method for imaging a social infrastructure structure using the imaging system according to this embodiment will be described with reference to FIG.

[0111] FIG. 21(a) shows an example of an inspection target surface of a social infrastructure structure to be inspected. The social infrastructure structure 2100 shown in FIG. 21(a) is a wall-like structure having a side surface 2101 and elongated horizontally. Reference number 2102 indicates a joint portion generated when the social infrastructure structure 2100 is divided based on a drawing and constructed by pouring. The portion 2102 is also called a pouring joint, but is called a joint here for ease of understanding. The joint portion 2102 is also used as a unit for performing inspection work because it can be visually observed. Reference number 2103 indicates an area to be inspected in one inspection (inspection target area), and the imaging system captures an imaging area 2104 including the inspection target area 2103. In the captured image of the imaging area 2104, a "partial image corresponding to the periphery of the inspection target area 2103 in the imaging area 2104" serves as information for grasping the positional relationship with the adjacent inspection target areas. Therefore, this partial image is also used for alignment when combining into one image including the entire social infrastructure structure 2100. In addition, this partial image corresponding to the periphery is also used for inspecting a wide range of abnormalities that are not limited to one inspection target area.

[0112] Fig. 21(b) shows how such an imaging area 2104 is imaged using the imaging system according to this embodiment. In Fig. 21(b), a camera device 1900 is attached to a pan head device 2000 having a tripod 2108, and a lens device 1913 is attached to the camera device 1900. The width (horizontal size in the figure) of an imaging range 2109 on the inspection target surface imaged by a combination of the camera device 1900 and the lens device 1913 corresponds to the width (horizontal size in the figure) of the imaging area 2104.

[0113] Then, when the imaging of the inspection target area 2103 is completed, an imaging of an unimaged inspection target area adjacent to the inspection target area 2103 is performed. The imaging system according to this embodiment is moved to a position indicated by reference number 2110, and an imaging of an inspection target area within an imaging range 2112 is performed in a similar manner. When the imaging at the position indicated by reference number 2110 is completed, the imaging system according to this embodiment is moved to a position indicated by reference number 2111 in order to image an inspection target area adjacent to the inspection target area, and an imaging of an inspection target area within an imaging range 2113 is performed in a similar manner. Furthermore, when the camera device 1900 is mounted on a mobile object such as a drone, the user manually or automatically moves the mobile object to each imaging position, and images are sequentially taken.

[0114] In this embodiment, the camera device 1900 needs to face the inspection target area. In this embodiment, it is determined whether the camera device 1900 faces the inspection target area, and if the camera device 1900 does not face the inspection target area, a notification is issued to rotate or translate the camera device 1900 so that the camera device faces the inspection target area.

[0115] In order to perform this notification, as described above, the control unit 1924 acquires the defocus amount at the position determined by the determination unit 1922. The method of acquiring the defocus amount is the same as step S502 in the first embodiment, so the description will be omitted. Here, the acquired defocus amount has a continuous value, and the defocus amount corresponding to the degree of focus can be determined as "-11" in a front focus state, "0" in a focused state, and "+7" in a back focus state. Also, as in the first embodiment, data representing a spatial (two-dimensional) defocus amount distribution in the shooting range may be created, and the control unit 1924 may acquire the defocus amount at the position determined by the determination unit 1922 in the defocus amount distribution (distance information distribution).

[0116] Next, the operation of the imaging system according to this embodiment will be described with reference to the flowchart of FIG. 22. As described above, the user installs the imaging system according to this embodiment facing the surface to be inspected in order to image the surface to be inspected. At this time, the user can install the camera device 1900 in a direction that is considered to be approximately facing the area to be inspected. However, if there is no precise measurement information on the reference points of the structure and the installation location and the surroundings, the camera device 1900 cannot be installed in a direction that is accurately facing the area. When the camera device 1900 is installed and the power of the camera device 1900 is turned on, the captured image captured by the image sensor 1904 is displayed as a live view image on the display screen on the back of the camera device 1900 by the display unit 1905. Then, the process according to the flowchart of FIG. 22 is started.

[0117] In step S2200, the object recognition unit 1928 performs a general object detection process on the captured image. In this embodiment, the general objects to be detected include the inspection target surface of the structure to be imaged, so that information on the feature amount indicating the inspection target surface is stored in the ROM 1902 in advance.

[0118] In step S2216, the object recognition unit 1928 judges whether the object detected in step S2200 is an inspection target surface of a structure to be imaged in a directly opposed relationship with the camera device 1900. If it is judged to be an inspection target surface, the process proceeds to step S2201 and continues. On the other hand, if it is judged not to be an inspection target surface, the process according to the flowchart in FIG. 22 ends.

[0119] In step S2201, the determination unit 1922 acquires setting information indicating "driving of the camera device 1900 so that the camera device 1900 faces the inspection target surface directly."

[0120] For example, as shown in FIG. 23, the operation unit 1906 controls "driving the camera device 1900 so that the camera device 1900 faces the surface to be inspected" (the orientation detection direction). That is, the operation unit 2007 has a switch for setting at least one of "vertical direction", "horizontal direction", and "translation". By operating this switch, the user can set the orientation detection direction to either the vertical direction (rotation axis = tilt axis) or the horizontal direction (rotation axis = pan axis). The determination unit 1922 acquires the orientation detection direction set by the switch as setting information. As shown in FIG. 21(a) and (b), when an image of a horizontally long structure is captured by moving it horizontally, the orientation detection direction in the horizontal (rotation) direction is selected.

[0121] As described above, when control is performed including translational movement in the XYZ directions so as to obtain an image in which orientation is corrected and in focus in multiple regions (for example, in mode setting), the orientation detection direction is not set in step S2201. The control unit 1924 estimates the position and orientation of the plane of the subject to be focused on based on the distance information distribution acquired corresponding to multiple regions of the captured image as in the first embodiment, and controls the position and orientation of the pan head device 2000 (camera device 1900).

[0122] In the following, as an example of setting the orientation detection direction to either the vertical direction (rotation axis = tilt axis) or the horizontal direction (rotation axis = pan axis), a case will be described in which the orientation detection direction is set to the horizontal direction.

[0123] Next, in step S2202, since the orientation detection direction is horizontal, the determination unit 1922 sets two regions aligned horizontally within the imaging range of the camera device 1900 as "regions for acquiring a defocus amount". For example, as shown in FIG. 24(a), the determination unit 1922 sets a region 2400 near the left end and a region 2401 near the right end of an imaging range 2104 that falls within an imaging range 2402 of the camera device 1900 in a social infrastructure structure 2100 as "regions for acquiring a defocus amount". Furthermore, this embodiment is not limited to this, and even when the orientation detection direction is set, the defocus amount of the entire screen (entire image) may be acquired as in the first embodiment.

[0124] In step S2203, the control unit 1924 acquires the defocus amount in the position set in step S2202 (area 2400 and area 2401 in the case of FIG. 24(a)) as described above. At this time, the camera device 1900 does not need to perform a focusing operation on the inspection target surface, and acquires the defocus amount in the area set in step S2202.

[0125] In step S2204, the acquisition unit 1923 acquires the "defocus amount in the left region" and the "defocus amount in the right region" acquired in step S2203. Then, the difference calculation unit 1925 calculates a difference by subtracting the "defocus amount in the right region" from the "defocus amount in the left region".

[0126] In step S2206, the determination unit 1926 acquires, as rotation instruction information (notification information), "information indicating the rotation direction and degree of rotation of the camera device 1900" corresponding to the difference between the defocus amounts calculated in step S2204.

[0127] 25, a table 2515 in which rotation instruction information corresponding to the difference between the defocus amounts is registered is stored in the ROM 1902. A section of the difference between the defocus amounts is registered in a column 2516. For example, in a row 2519 of the column 2516, a section of the difference between the defocus amounts "+11 or more" is registered, and in a row 2524 of the column 2516, a section of the difference between the defocus amounts "-5 to -10" is registered.

[0128] Icons corresponding to the amount of rotation when rotating the camera device 1900 to the left are registered in column 2517. The icon registered in row 2519 in column 2517 represents a larger amount of rotation than the amount of rotation represented by the icon registered in row 2520 in column 2517. The icon registered in row 2520 in column 2517 represents a larger amount of rotation than the amount of rotation represented by the icon registered in row 2521 in column 2517. The icons registered in rows 2522 to 2525 in column 2517 represent that there is no need to rotate to the left.

[0129] Icons corresponding to the amount of rotation when rotating the camera device 1900 to the right are registered in column 2518. The icon registered in row 2525 in column 2518 represents a larger amount of rotation than the amount of rotation represented by the icon registered in row 2524 in column 2518. The icon registered in row 2524 in column 2518 represents a larger amount of rotation than the amount of rotation represented by the icon registered in row 2523 in column 2518. The icons registered in rows 2519 to 2522 in column 2518 represent that right rotation is not necessary.

[0130] Therefore, for example, when the difference between the defocus amounts calculated in step S2204 is “+7”, the identification unit 1926 acquires, as rotation instruction information, two icons registered in row 2520 corresponding to the interval “+10 to +5” that includes the difference “+7”.

[0131] Also, for example, when the difference between the defocus amounts calculated in step S2204 is "-12", the determination unit 1926 acquires, as rotation instruction information, two icons registered in row 2525 corresponding to the section "-11 or less" that includes the difference "-12".

[0132] In other words, the table in FIG. 25 registers rotation instruction information for notifying the rotation direction according to the sign of the difference between the defocus amounts and the degree of rotation according to the absolute value of the difference between the defocus amounts.

[0133] In step S2214, the output unit 1927 outputs the rotation instruction information acquired in step S2206 to the display unit 1905 as "notification information for notifying the user of the rotation direction and degree of the camera device 1900". The display unit 1905 displays the notification information on a display screen on the rear side of the camera device 1900. For example, as shown in FIG. 24(a), an icon 2405 acquired from the column 2517 is displayed on the lower left side of a live view image 2404 displayed on the display screen on the rear side of the camera device 1900. Also, an icon 2406 acquired from the column 2518 is displayed on the lower right side of the live view image 2404. Note that the display positions of the icon 2405 and the icon 2406 are not limited to a specific display position, and for example, they may be displayed superimposed on the live view image 2404. Also, in FIG. 24(a), icons 2400a and 2401a are displayed in a superimposed manner at positions corresponding to positions 2400 and 2401, respectively, in a live view image 2404.

[0134] The user, viewing the displayed icons 2405 and 2406, recognizes the notification to rotate the camera device 1900 to the left, and rotates the camera device 1900 to the left. The state after the camera device 1900 in the state of Fig. 24(a) has been rotated to the left is shown in Fig. 24(b).

[0135] Since icons 2409 and 2410 are still displayed in the state of Fig. 24(b), the user similarly recognizes the notification to rotate the camera device 1900 left and rotates the camera device 1900 left. Here, it is indicated that neither icon 2406 nor icon 2410 needs to be rotated right. On the other hand, it is indicated that both icons 2405 and 2409 need to be rotated left, but icon 2409 indicates a smaller amount of rotation than icon 2405. Fig. 24(c) shows the state after the camera device 1900 in the state of Fig. 24(b) has been further rotated left.

[0136] 24(c), an icon 2413 indicating that there is no need to rotate left and an icon 2414 indicating that there is no need to rotate right are displayed. When a user sees the displayed icons 2413 and 2414, he or she recognizes the notification that there is no need to rotate the camera device 1900 to the right or left, and does not rotate the camera device 1900.

[0137] 23 is a diagram showing a state in which the camera device 1900 is mounted on a camera platform device 2000, and a remote control device 2010 is connected to the camera platform device 2000 for performing pan / tilt operations and image capture operations of the camera device 1900. At this time, the remote control device 2010 is connected to the camera device 1900 via an external I / F 1910 of the camera device 1900, thereby enabling image capture by the camera device 1900.

[0138] Returning to Fig. 22, in step S2215, the CPU 1901 determines whether or not a termination condition for the processing according to the flowchart in Fig. 22 is satisfied. For example, when the user operates the operation unit 1906 to input an instruction to terminate the processing or turns off the power of the camera device 1900, the CPU 1901 determines that the termination condition for the processing according to the flowchart in Fig. 22 is satisfied.

[0139] As a result of such a determination, if the termination condition of the processing according to the flowchart in FIG. 22 is satisfied, the processing according to the flowchart in FIG. 22 is terminated, and if the termination condition is not satisfied, the processing proceeds to step S2203.

[0140] In this way, by setting the camera device 1900 mounted on the pan head device 2000 as shown in FIG. 23 facing the surface to be inspected, it is possible to notify the user of rotation and translation instruction information for orienting the camera device 1900 to the surface to be inspected. Then, the user who has received this notification operates the pan head device 2000 and the like in accordance with the notification, so that the camera device 1900 can be accurately orientated to the surface to be inspected, and accurate inspection of the abnormality is possible. At the same time, by accurately orienting the camera device 1900, when imaging adjacent areas of the surface to be inspected, it is possible to continuously image the surface to be inspected under uniform conditions by translating the camera device 1900. Even if the image sensor 1904 and the lens device 1913 of the camera device 1900 deviate from the design position due to aging, the camera device 1900 can be accurately orientated to the surface to be inspected, so that accurate inspection of the abnormality is possible.

[0141] In this embodiment, the rotation direction for orientation is the horizontal (rotation) direction, and the pan axis of the camera head device 2000 is operated, but the orientation detection direction may be switched to issue an orientation rotation instruction for the vertical (rotation) direction, and the tilt axis may be operated. Furthermore, the horizontal (rotation) direction and the vertical (rotation) direction may be detected simultaneously, and rotation instruction information for each direction may be presented.

[0142] In addition, in this embodiment, an example of the defocus amount value is presented, and three types of rotation instruction information are defined. However, since the defocus amount value differs depending on the type of image plane phase difference sensor used, it may be multiplied by an appropriate coefficient or the like and the types are not limited to this.

[0143] In addition, in the present embodiment, icons indicating both the direction of rotation and the degree of rotation are displayed, but an icon indicating the direction of rotation and an icon indicating the degree of rotation may be displayed separately, or only one of them may be displayed. Furthermore, the information indicating the direction of rotation or the degree of rotation is not limited to an icon, and may be, for example, text information. Furthermore, the method of notifying the direction of rotation or the degree of rotation is not limited to a specific method.

[0144] In the present embodiment, icons are displayed for directions in which rotation is not required, but icons may not be displayed for directions in which rotation is not required. For directions in which rotation is required, other information such as text information may be displayed in addition to icons.

[0145] In addition, in this embodiment, the camera device 1900 is mounted on the pan head device 200, but as described above, the camera device 1900 may be mounted on a UAV (unmanned aerial vehicle) such as a drone device. By configuring in this way, it is possible to capture an image of the inspection target surface of a target structure in an environment where a pan head cannot be installed.

[0146] Furthermore, in this embodiment, the user is notified of rotation and / or translation instruction information, but the rotation and / or translation instruction information may be output to the camera platform device 2000. The camera platform device 2000 may be configured to control the rotation of the camera device 1900 in accordance with the rotation and / or translation instruction information, and automatically orient the camera device 1900 directly toward the surface to be inspected. This configuration reduces the amount of work required by the user to operate the camera device, improving convenience.

[0147] Furthermore, in this embodiment, the defocus amount (distance information distribution) is calculated by the camera device 1900. However, as in the first embodiment, the defocus amount may be calculated by a computer communicatively connected via a communication circuit.

[0148] Furthermore, in this embodiment, the distance information distribution is calculated in order to control the position and orientation of the camera device 1900 by operating the pan head device 2000, but the use of the calculated distance information distribution is not limited to this.

[0149] For example, the CPU 1901 records the image data of a pair of images having parallax captured by the image sensor 1904 and the shooting conditions including at least the F value and the KX value in the memory card 1909 in association with the image data. Based on the recorded image data of the pair and the shooting conditions, the CPU 1901 or the CPU of the external device to which each data is output generates and acquires a distance information distribution. Here, the acquired distance information distribution is treated as a defocus amount distribution, and a blur map is generated by converting each defocus amount based on the shooting conditions, the F value (or effective F value) and the conversion coefficient KX. The blur map may be used for quality evaluation of the blur in the captured image. In particular, in shooting for social infrastructure inspection, when inspecting the deformation of the inspection target surface, the inspection target surface must be evaluated with an image that is not out of focus in order to correctly detect cracks and measure the crack width. Therefore, by referring to the defocus amount distribution (or blur map), for example, by performing measurements only in the area (imaging range) where no blur occurs, a more accurate inspection can be performed. Furthermore, when the CPU 1901 determines that the captured image contains a blur with a standard or higher amount of blur at a predetermined rate or more, the CPU 1901 may notify the user that the captured image is NG (undetectable abnormality). Possible notification methods include displaying an image or icon using the display unit 1905, or displaying light, sound, vibration, or the like from other devices. The CPU 1901 may also generate the above-mentioned blur map and simply generate an image that visualizes each amount of blur and display it on the display unit. The user can manually or automatically redo the image capture or move the camera device 1900 while referring to the blur map.

[0150] Although the preferred embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and various modifications and changes are possible within the scope of the gist of the present invention.

[0151] [Other embodiments] The object of the present invention can also be achieved as follows: A storage medium on which software program code describing procedures for implementing the functions of each of the above-described embodiments is recorded is supplied to a system or device. Then, a computer (or a CPU, MPU, etc.) of the system or device reads out and executes the program code stored in the storage medium.

[0152] In this case, the program code itself read out from the storage medium realizes the novel functions of the present invention, and the storage medium storing the program code and the program constitute the present invention.

[0153] Furthermore, examples of storage media for supplying the program code include flexible disks, hard disks, optical disks, magneto-optical disks, etc. Also usable are CD-ROMs, CD-Rs, CD-RWs, DVD-ROMs, DVD-RAMs, DVD-RWs, DVD-Rs, magnetic tapes, non-volatile memory cards, ROMs, etc.

[0154] The functions of the above-mentioned embodiments are realized by making the computer executable the program code that has been read out. Furthermore, the functions of the above-mentioned embodiments are also realized by the processing of an operating system (OS) or the like running on the computer, which performs part or all of the actual processing based on the instructions of the program code.

[0155] In addition, the following cases are also included: First, the program code is read from a storage medium and written into a memory in an expansion board inserted into a computer or in an expansion unit connected to the computer, and then, based on the instructions of the program code, a CPU or the like in the expansion board or expansion unit performs all or part of the actual processing. [Explanation of symbols]

[0156] 100 Image processing device 101 Digital Camera 102 Computer 103 Communication Circuit 1900 Camera Equipment 1913 Lens device 2000 Panhead device 2010 Remote Control Device

Claims

1. an input means for inputting a distance information distribution calculated from an image captured by an optical system that forms an image of the object on an image sensor of the imaging means; an estimation means for estimating a depth direction in the image based on a photographing condition of the imaging means; From the relationship between the distance information distribution and the estimated depth direction, and determining means for determining an evaluation value indicating a degree of deviation in a depth direction of a subject in the image.

2. a first acquisition means for acquiring photographing conditions including at least an F-number and a conversion coefficient for converting an image shift amount into a defocus amount, the F-number being related to an image captured by the imaging means; a second acquiring means for acquiring a distance information distribution which is a distribution of distance information corresponding to each region of an image captured by the imaging means; and an image processing means for normalizing the distance information distribution based on the F-number and the conversion coefficient.

13. An image processing device comprising:

3. 3. The image processing apparatus according to claim 1, wherein the distance information distribution is information related to a distribution of a defocus amount of a subject normalized by an F-number and a permissible circle of confusion diameter.

4. 3. The image processing device according to claim 1, wherein the distance information distribution is any one of information related to a distribution of a parallax amount of a subject, information related to a distribution of a defocus amount of a subject, information related to a distribution of a defocus amount of a subject normalized by an F-number and a permissible circle of confusion diameter, and information related to a distribution of an actual distance from a shooting position to a subject.

5. 5. The image processing apparatus according to claim 1, wherein the information relating to the distribution of the amount of parallax of the subject is obtained from a pair of images having a parallax with respect to each other.

6. The image processing device according to any one of claims 1 to 5, characterized in that the shooting conditions are at least one of the following: posture information of the device when the image was shot, a vanishing point in the image, a change in texture density in the image, or a determination result as to whether or not a structure with a known shape is captured in the image.

7. The relationship in the depth direction is 7. The image processing device according to claim 1, wherein the angle is formed between a line where the defocus amount in the distance information distribution is zero and a line indicating the in-focus area calculated by the depth direction estimating means.

8. The relationship in the depth direction is The image processing device according to claim 1, characterized in that the defocus amount is the difference between a vector of the gradient of the defocus amount in the distance information distribution and a vector of a direction toward the vanishing point in the image calculated by the depth direction estimating means, or a vector of a direction of change in texture density in the image.

9. What is the degree of deviation in the depth direction of the subject in the image? 3. The image processing apparatus according to claim 1, wherein the difference is a difference in defocus amount at a plurality of positions in the distance information distribution.

10. 9. The image processing apparatus according to claim 1, further comprising a notification unit that notifies the user of the evaluation value.

11. The image processing device according to any one of claims 1 to 10, characterized in that the determination means determines an evaluation value indicating the degree of deviation when it determines that the input image includes general objects including the ground, the water surface, and structures laid vertically to the ground or the water surface.

12. 12. The image processing apparatus according to claim 11, wherein the statistics of the distance information distribution are a histogram of the distance information distribution.

13. 13. The image processing device according to claim 1, further comprising: a correction device for correcting the degree of deviation to be smaller by controlling an IS mechanism, applying image processing to the image, or rotating the image processing device, depending on an evaluation value indicating the degree of deviation.

14. The image processing device according to any one of claims 1 to 13, characterized in that an evaluation value indicating the degree of deviation is associated with information of the imaging element and the optical system that acquired the image for which the evaluation value was calculated, and the information is output to an external device.

15. an input step of inputting a distance information distribution calculated from an image captured by an optical system that forms an image of the object scene on an image sensor of an image capturing means; an estimation step of estimating a depth direction in the image from a photographing condition of the imaging means; From the relationship between the distance information distribution and the estimated depth direction, and determining an evaluation value indicating a degree of deviation in a depth direction of the subject in the image.

16. a first acquisition step of acquiring photographing conditions including at least an F-number and a conversion coefficient for converting an image shift amount into a defocus amount, the F-number being related to an image captured by the imaging means; a second acquisition step of acquiring a distance information distribution which is a distribution of distance information corresponding to each region of the image captured by the imaging means; and an image processing step of normalizing the distance information distribution based on the F-number and the conversion coefficient.

13. An image processing method comprising:

17. 15. A computer-executable program in which procedures for implementing the functions of each of the control means of the image processing apparatus according to claim 1 are described.

18. 15. A computer-readable storage medium storing a program for causing a computer to execute the functions of each of the means of the image processing apparatus according to claim 1.

Citation Information

Patent Citations

  • Information processor, method for processing information, and program

    JP2019078582A

  • Diagnostic instrument of stereo camera carried on robot and diagnostic method of stereo camera carried on robot device

    JP2004306249A