Imaging device, imaging method, and program
The imaging device adjusts focus based on object position and movement within a set target region, ensuring accurate focus on moving objects and avoiding focus on stationary objects.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- JVC KENWOOD CORP
- Filing Date
- 2021-09-27
- Publication Date
- 2026-05-15
AI Technical Summary
Existing imaging devices with autofocus methods struggle to appropriately focus on objects within a changing imaging region.
An imaging device equipped with an object information acquisition unit, target region acquisition unit, and focus position control unit that adjusts the focus position based on the position and movement of objects within a set target region.
Enables precise focusing on moving objects within a dynamic imaging area, suppressing focus on stationary objects and maintaining focus on objects entering or leaving the target region.
Smart Images

Figure 0007859029000001 
Figure 0007859029000002 
Figure 0007859029000003
Abstract
Description
Technical Field
[0001] The present invention relates to an imaging device, an imaging method, and a program.
Background Art
[0002] An imaging device with an autofocus method for automatically setting the focus position is known. For example, Patent Document 1 describes that focusing is performed at a predetermined position designated by the user.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] In an imaging device with an autofocus method, it is required to appropriately focus.
[0005] In view of the above problems, an object of the present invention is to provide an imaging device, an imaging method, and a program capable of appropriately focusing.
Means for Solving the Problems
[0006] An imaging device according to an aspect of the present invention is an imaging device capable of imaging an object, including an imaging element, an object information acquisition unit that acquires position information of an object existing in an imaging region of the imaging element, a target region acquisition unit that sets a target region to move within the imaging region, and a focus position control unit that controls the focus position of the imaging device to focus on the object when the object exists within the target region.
[0007] An imaging method according to one aspect of the present invention is an imaging method for imaging an object, comprising the steps of: acquiring positional information of an object present in an imaging area; setting a target area to move within the imaging area; and, if an object is present in the target area, controlling the focal position of an imaging device to focus on that object.
[0008] A program according to one aspect of the present invention is a program that causes a computer to execute an imaging method for imaging an object, the program causing the computer to execute the following steps: acquiring positional information of an object present in an imaging area; setting a target area to move within the imaging area; and, if an object is present in the target area, controlling the focal position of an imaging device to focus on that object. [Effects of the Invention]
[0009] According to the present invention, it is possible to properly focus the image. [Brief explanation of the drawing]
[0010] [Figure 1] Figure 1 is a schematic block diagram of an imaging device according to the first embodiment. [Figure 2] Figure 2 is a schematic diagram illustrating an example of a target area. [Figure 3] Figure 3 is a schematic diagram illustrating an example of a target area. [Figure 4] Figure 4 is a flowchart illustrating the process flow for setting the focal point. [Figure 5] Figure 5 is a schematic diagram illustrating an example of a target area according to the second embodiment. [Figure 6] Figure 6 is a schematic diagram showing an example where multiple reference objects are set. [Figure 7] Figure 7 is a flowchart illustrating the process flow for setting the focal point. [Figure 8] Figure 8 is a schematic diagram illustrating an example where the motion of an object is subject to predetermined conditions. [Modes for carrying out the invention]
[0011] Embodiments of the present invention will be described in detail below with reference to the drawings. However, the present invention is not limited to the embodiments described below.
[0012] (First Embodiment) (Configuration of the imaging device) Figure 1 is a schematic block diagram of an imaging device according to the first embodiment. The imaging device 100 according to the first embodiment is an imaging device that captures images of objects within the imaging range. The imaging device 100 is an autofocus camera capable of automatically setting the focal position. The imaging device 100 may be a video camera that captures moving images by capturing images at predetermined frame intervals, or it may be a camera that captures still images. The imaging device 100 may be used for any purpose, for example, as a surveillance camera set up at a predetermined location inside or outside a facility.
[0013] As shown in Figure 1, the imaging device 100 includes an optical element 10, an image sensor 12, an image processing circuit 13, an object position measuring unit 14, an input unit 16, a display unit 18, a communication unit 20, a storage unit 22, and a control unit 24.
[0014] The optical element 10 is, for example, an element of an optical system such as a lens. There may be one optical element 10 or more.
[0015] The image sensor 12 is an element that converts light incident through the optical element 10 into an image signal, which is an electrical signal. The image sensor 12 is, for example, a CCD (Charge Coupled Device) sensor or a CMOS (Complementary Metal Oxide Semiconductor) sensor.
[0016] The image processing circuit 13 generates image data for each frame from the image signal generated by the imaging device 12. The image data is data that includes, for example, the luminance and color information of each pixel in one frame, and may be data to which a gradation is assigned for each pixel.
[0017] The object position measurement unit 14 is a sensor that measures the position of an object to be measured relative to the imaging device 100 (the relative position of the object). The object here may be any object, which may be a living thing or an inanimate object, and the same applies hereinafter. Also, the object here may refer to a movable object, but is not limited thereto and may refer to an immovable object.
[0018] In the present embodiment, the object position measurement unit 14 measures the distance from the imaging device 100 to the object as the relative position of the object. The object position measurement unit 14 may be any sensor capable of measuring the relative position of the object. For example, it may be a TOF (Time Of Flight) sensor. When the object position measurement unit 14 is a TOF sensor, for example, a light emitting element that irradiates light (e.g., an LED (Light Emitting Diode)) and a light receiving unit that receives light are provided, and the distance to the object is measured based on the flight time of the light irradiated from the light emitting element to the object and returned to the light receiving unit. In addition to measuring the distance from the imaging device 100 to the object as the relative position of the object, the object position measurement unit 14 may also measure, for example, the direction in which the object exists with respect to the imaging device 100. In other words, the object position measurement unit 14 may measure the position (coordinates) of the object in the coordinate system with the imaging device 100 as the origin as the relative position of the object.
[0019] The input unit 16 is a mechanism that receives an input (operation) from the user and may be, for example, a button, a keyboard, a touch panel, or the like.
[0020] The display unit 18 is a display panel that displays an image. In addition to the image captured by the imaging device 100, the display unit 18 may also be able to display an image for the user to set the target area AR described later.
[0021] The communication unit 20 is a communication module that communicates with external devices, and may be, for example, an antenna or a Wi-Fi® module. The imaging device 100 communicates with external devices via wireless communication, but it may also use wired communication, and the communication method is arbitrary.
[0022] The memory unit 22 is a memory that stores captured image data and various information such as calculation contents and programs of the control unit 24. For example, it includes at least one of the following: RAM (Random Access Memory), main memory such as ROM (Read Only Memory), and external memory such as HDD (Hard Disk Drive). The program for the control unit 24 stored in the memory unit 22 may be stored on a recording medium that the imaging device 100 can read.
[0023] The control unit 24 is an arithmetic unit and includes arithmetic circuits such as a CPU (Central Processing Unit). The control unit 24 includes a target area acquisition unit 30, an object information acquisition unit 32, a focus position control unit 34, an imaging control unit 36, and an image acquisition unit 38. The control unit 24 reads a program (software) from the storage unit 22 and executes it to realize the target area acquisition unit 30, the object information acquisition unit 32, the focus position control unit 34, the imaging control unit 36, and the image acquisition unit 38, and performs their processing. The control unit 24 may perform these processes with a single CPU, or it may have multiple CPUs and perform the processing with those multiple CPUs. In addition, at least a part of the processing of the target area acquisition unit 30, the object information acquisition unit 32, the focus position control unit 34, the imaging control unit 36, and the image acquisition unit 38 may be realized with hardware circuits.
[0024] (Target area acquisition unit) The target area acquisition unit 30 acquires information on the target area AR set within the imaging area of the imaging device 100. The target area AR is an area set to automatically adjust the focal position. The information on the target area AR refers to the shape information and movement information of the target area AR, which will be explained in more detail later. The target area AR will be explained below.
[0025] Figures 2 and 3 are schematic diagrams illustrating an example of a target area. Figure 2 is a view of the imaging device 100 and the target area AR from above in the vertical direction, and Figure 3 is a view of the imaging device 100 and the target area AR from the horizontal direction. Hereinafter, direction Z will be defined as the vertical direction, direction X as one horizontal direction perpendicular to direction Z, and direction Y as a direction perpendicular to both direction Z and direction X (horizontal direction). As shown in Figures 2 and 3, the range in which an image can be captured by the imaging device 100 is defined as the imaging area AR0. The imaging area AR0 refers to the area (space) that falls within the field of view of the image sensor 12, or in other words, the range in real space that is captured as an image. The target area AR is the area (space) set within the range of the imaging area AR0.
[0026] The target area acquisition unit 30 sets the target area AR so that the target area AR moves within the imaging area AR0. The target area acquisition unit 30 acquires shape information and movement information of the target area AR, and based on the shape information and movement information of the target area AR, sets the target area AR so that the target area AR moves within the imaging area AR0. The shape information of the target area AR is information indicating the shape and size of the target area AR, and the movement information of the target area AR is information indicating how the target area AR moves. The movement information of the target area AR may be, for example, the position of the reference coordinates of the target area AR at each time interval, or it may be the initial position of the reference coordinates of the target area AR, the direction of movement of the reference coordinates of the target area AR, and the speed of movement. Here, the reference coordinates are the center coordinates of the target area AR, and the target area AR is set as a circular (spherical) area with a predetermined radius centered on the reference coordinates. It is preferable for the target area acquisition unit 30 to move the target area AR so that the shape and size of the target area AR remain the same.
[0027] More specifically, it is preferable that the target area AR is located within the imaging area AR0 and within the region between the first position AX1 and the second position AX2. In other words, it is preferable that the target area AR is located within the imaging area AR0 and moves within the region between the first position AX1 and the second position AX2 (in other words, does not move outside this region). The first position AX1 is a position where the distance from the imaging device 100 is the first distance L1, and the second position AX2 is a position where the distance from the imaging device 100 is the second distance L2, which is shorter than the first distance L1. As shown in Figures 2 and 3, in this embodiment, the first position AX1 can be said to be a virtual plane within the imaging area AR0 that includes each position (coordinate) where the distance from the imaging device 100 is the first distance L1. Similarly, the second position AX2 can be said to be a virtual plane within the imaging area AR0 that includes each position (coordinate) where the distance from the imaging device 100 is the second distance L2. In other words, the target region AR may be set to move within a space enclosed by a virtual plane whose distance from the imaging device 100 is a second distance L2 and a virtual plane whose distance from the imaging device 100 is a first distance L1, within the imaging region AR0. Note that the first position AX1 is not limited to all positions (coordinates) included in the first position AX1 being on a virtual plane whose distance from the imaging device 100 is a first distance L1; at least some of the positions (coordinates) included in the first position AX1 may be on a virtual plane whose distance from the imaging device 100 is a first distance L1. Similarly, the second position AX2 may be on a virtual plane whose distance from the imaging device 100 is a second distance L2, at least some of the positions (coordinates) included in the second position AX2.
[0028] The size and shape of the target area AR are not limited to the above description and may be arbitrary; it does not have to be a circular (spherical) area with a predetermined radius centered on the reference coordinates. Furthermore, in the above description, the target area AR was defined as an area set within the imaging area AR0, but it is not limited to that. For example, if the range within which the object position measurement unit 14 can measure distance is defined as the distance measurement area (distance measurement space), then the target area AR may be an area set within the distance measurement area. In this case, the imaging area AR0 in Figures 2 and 3 may be treated as the distance measurement area.
[0029] The target area acquisition unit 30 may acquire shape information and movement information of the target area AR by any method. For example, the shape information and movement information of the target area AR may be set in advance. In this case, the target area acquisition unit 30 may read the pre-set shape information and movement information of the target area AR from the storage unit 22, or it may acquire the shape information and movement information of the target area AR from other devices via the communication unit 20. Also, for example, if the shape information and movement information of the target area AR are not set in advance, the target area acquisition unit 30 may automatically set the shape information and movement information of the target area AR. Also, for example, the user may set the shape information and movement information of the target area AR. In this case, for example, the user may input the shape information and movement information of the target area AR (for example, the size of the target area AR and the position of the reference coordinates for each time period) into the input unit 16, and the target area acquisition unit 30 may set the target area AR based on the shape information and movement information of the target area AR specified by the user.
[0030] (Object information acquisition unit) The object information acquisition unit 32 acquires positional information of objects located within the imaging area AR0. The object information acquisition unit 32 controls the object position measurement unit 14 to measure the relative position of the object with respect to the imaging device 100. The object information acquisition unit 32 acquires the measurement result of the relative position of the object with respect to the imaging device 100, obtained by the object position measurement unit 14, as the object's positional information. The object information acquisition unit 32 acquires the object's positional information sequentially by acquiring the object's positional information at predetermined time intervals. In addition, the object information acquisition unit 32 can also acquire information indicating the shape of the object (for example, the object's 3D shape) based on the object's positional information. For example, the object information acquisition unit 32 can acquire the object's 3D shape by accumulating multiple pieces of positional information, such as TOF image information.
[0031] (Focus position control unit) The focus position control unit 34 sets the focal position of the imaging device 100. The focus position control unit 34 controls the focal position by controlling the position of the optical element 10, that is, by moving the position of the optical element 10.
[0032] The focus position control unit 34 adjusts the focus position to an object that exists within the target area AR. Here, the object preferably refers to a moving object. The focus position control unit 34 sets the focus position to the position of the object that is determined to exist within the target area AR. In this embodiment, the focus position control unit 34 determines whether an object exists within the target area AR based on the object's position information acquired by the object information acquisition unit 32. If the position of the object acquired by the object information acquisition unit 32 coincides with the position of the target area AR at that time, the focus position control unit 34 determines that the object exists within the target area AR and adjusts the focus position to the position of that object acquired by the object information acquisition unit 32. On the other hand, the focus position control unit 34 does not adjust the focus position to an object that does not exist within the target area AR.
[0033] The focus position control unit 34 maintains its focus on the object as long as the object is within the target area AR. That is, based on the object's position information acquired by the object information acquisition unit 32 at predetermined time intervals, the focus position control unit 34 determines whether the object continues to be within the target area AR, and maintains its focus on the object as long as the object continues to be within the target area AR. On the other hand, if the object that has been focused moves outside the target area AR, that is, if it is no longer within the target area AR, the focus position control unit 34 shifts its focus away from the object and focuses on a location other than the object.
[0034] Furthermore, the focus position control unit 34 does not need to focus on objects that are already within the target area AR from the time the imaging device 100 starts operating (the moment it becomes ready to image). In other words, the focus position control unit 34 may focus on objects that enter the target area AR after the start of operation. To put it another way, the focus position control unit 34 may focus on objects that are within the target area AR at a certain point in time but were not within the target area AR at a time prior to that point, starting from the moment they begin to enter the target area AR. To put it another way, the focus position control unit 34 may recognize an object as a target to focus on when it moves from outside the target area AR into the target area AR. In other words, the focus position control unit 34 may focus on objects that have moved from outside the target area AR into the target area AR.
[0035] Furthermore, if no object is present within the target area AR, the focus position control unit 34 may adjust the focus position to a pre-set position. The set position can be set arbitrarily, but it is preferable that it be set within the target area AR, such as the center position of the target area AR.
[0036] Furthermore, it is preferable that the focus position control unit 34 does not focus on stationary objects, but rather on moving objects. More specifically, if a stationary (non-moving) object becomes located within the target area AR due to the movement of the target area AR, the focus position control unit 34 does not focus on that object. In other words, the focus position control unit 34 does not treat a stationary object as an object to focus on, even if that object is located within the target area AR, and does not focus on that object. On the other hand, the focus position control unit 34 focuses on a moving object when that object is located within the target area AR, i.e., when a moving object reaches the target area AR. Whether an object is moving can be determined based on the object's position information obtained by the object information acquisition unit 32. That is, if the position information of an object changes continuously over time, it can be determined that the object is moving.
[0037] An example of the process of adjusting the focal position described above will be explained using Figure 2. Figure 2 shows an example where the target area AR moves in the order of position AR1, position AR2, position AR3, and position AR4. In the example in Figure 2, there is no object in the target area AR at position AR1, so when the target area AR is at position AR1, the focal position control unit 34 does not adjust the focal position to an object, but adjusts the focal position to the set position. Also, when the target area AR moves from position AR1 to position AR2, a stationary object Aa is located within the target area AR. In this case, since object Aa is stationary and the stationary object Aa is located within the target area AR due to the movement of the target area AR, the focal position control unit 34 does not adjust the focal position to object Aa, but adjusts the focal position to the set position. Note that the set position here is set relative to the target area AR, so the set position also moves along with the movement of the target area AR. It is preferable that the set position moves while maintaining the same position (relative position) with respect to the target area AR.
[0038] When the target area AR moves from position AR2 to position AR3, the moving object Ab is positioned within the target area AR. In this case, since the moving object Ab enters the target area AR, the focus position control unit 34 focuses on object Ab and maintains focus on object Ab while object Ab is located within the target area AR. Subsequently, when the target area AR moves from position AR3 to position AR4, object Ab moves outside the target area AR. When object Ab moves outside the target area AR, the focus position control unit 34 defocuses from object Ab and focuses on the set position. In other words, from the moment the moving object Ab enters the target area AR, the focus position control unit 34 focuses on object Ab, moves the focus position in accordance with the moving object Ab while object Ab is moving within the target area AR, and defocuses from object Ab when object Ab moves outside the target area AR.
[0039] The focal position may be set by the user. In this case, for example, it may be possible to switch between an auto mode in which the focal position is set automatically and a manual mode in which the user sets the focal position. In auto mode, the focal position is set by the focal position control unit 34 as described above. On the other hand, in manual mode, the user inputs an operation to set the focal position to the input unit 16, and the focal position control unit 34 sets the focal position according to the user's operation.
[0040] (Image Control Unit) The imaging control unit 36 controls the imaging device 100 to capture an image. The imaging control unit 36 controls, for example, the image sensor 12 to acquire an image signal. For example, the imaging control unit 36 may have the image sensor 12 acquire an image signal automatically, or it may have the image signal acquired in response to user operation.
[0041] (Image acquisition unit) The image acquisition unit 38 acquires image data acquired by the image sensor 12. The image acquisition unit 38 controls, for example, the image processing circuit 13 to cause the image processing circuit 13 to generate image data from the image signal generated by the image sensor 12, and acquires that image data. The image acquisition unit 38 stores the image data in the storage unit 22.
[0042] (Focus position setting flow) Next, the processing flow for setting the focal position described above will be explained. Figure 4 is a flowchart illustrating the processing flow for setting the focal position. As shown in Figure 4, the control unit 24 sets the target area AR so that the target area AR moves using the target area acquisition unit 30 (step S10). Then, the control unit 24 acquires the position information of the object using the object information acquisition unit 32 (step S12). The order in which steps S10 and S12 are performed is arbitrary. The control unit 24 determines whether the object is located within the target area AR based on the object's position information using the focal position control unit 34 (step S14). If the object is not located within the target area AR (step S14; No), the process returns to step S10 and continues to acquire the object's position information while updating the target area AR (i.e., moving the target area AR). On the other hand, if the object is located within the target area AR (step S14; Yes), the focal position control unit 34 determines whether the object is moving (step S16). If the object in the target area AR is not moving (step S16; No), the focus position control unit 34 returns to step S10 without focusing on the object, and continues to acquire the object's position information while updating the target area AR. If the object in the target area AR is moving (step S16; Yes), the focus position control unit 34 focuses on the object (step S18). After that, it continues to acquire the object's position information while updating the target area AR by acquiring the position information of the reference object, and determines whether the object has moved outside the target area AR (step S20). If the object does not move outside the target area AR (step S20; No), that is, if the object remains within the target area AR, it returns to step S18 and continues to focus on the object. If the object moves outside the target area AR (step S20; Yes), the focus position control unit 34 defocuses from the object (step S22). If the process is not terminated thereafter (Step S24; No), the process returns to Step S10; if the process is terminated (Step S24; Yes), this process is terminated.
[0043] (effect) As described above, the imaging device 100 according to this embodiment includes an image sensor 12, an object information acquisition unit 32, a target area acquisition unit 30, and a focus position control unit 34. The object information acquisition unit 32 acquires position information of objects present in the imaging area AR0 of the image sensor 12. The target area acquisition unit 30 sets the target area AR to move within the imaging area AR0. The focus position control unit 34 controls the focus position of the imaging device 100 so as to focus on an object present in the target area AR.
[0044] In autofocus imaging devices, it is necessary to appropriately adjust the focal position. In contrast, the imaging device 100 according to this embodiment is set to move the target area AR, and when an object is present within the target area AR, the imaging device 100 controls the focal position to focus on that object. Therefore, for example, when the area of interest changes over time in surveillance, it becomes possible to appropriately adjust the focus in accordance with that change.
[0045] The focus position control unit 34 may not focus on a stationary object if that object is located within the target area AR, but may focus on a moving object if that object is located within the target area AR. Therefore, it is possible to suppress the focus position from being set on a stationary object that has entered the area as a result of the movement of the target area AR, and to appropriately focus on a moving object that has entered the target area AR.
[0046] The target area acquisition unit 30 may set the target area AR such that it is located between a first position AX1, where the distance from the imaging device 100 is a first distance L1, and a second position AX2, where the distance from the imaging device 100 is a second distance L2, which is shorter than the first distance L1. Therefore, the focal position can be appropriately adjusted for objects that enter the target area AR.
[0047] (Second Embodiment) Next, a second embodiment will be described. The second embodiment differs from the first embodiment in that the target area AR is set based on the position information of the moving reference object B. The parts of the second embodiment that are common to the first embodiment will not be described.
[0048] Figure 5 is a schematic diagram illustrating an example of a target area according to the second embodiment. As shown in Figure 5, in the second embodiment, the target area acquisition unit 30 sets the target area AR based on the position information of the moving reference object B. The reference object B is a moving object located within the imaging area AR0, which serves as the reference for setting the position of the target area AR.
[0049] Reference object B may be an object located within the imaging region AR0, between the first position AX1 and the second position AX2. However, reference object B is not limited to being located between the first position AX1 and the second position AX2, but may be at any position.
[0050] Reference object B may be set in any way; for example, the target area acquisition unit 30 may automatically set reference object B. In this case, for example, the target area acquisition unit 30 may select reference object B in any way from among the objects located within the imaging area AR0. Alternatively, for example, reference object B may be set by the user. In this case, for example, the user may input information for selecting reference object B into the input unit 16, and the target area acquisition unit 30 may set reference object B based on the information for specifying reference object B specified by the user. In this case, for example, the display unit 18 may display an image of the imaging area AR in real time, and the user may input information for selecting reference object B by selecting an image of reference object B from among the objects shown in the image of the imaging area AR.
[0051] The target area acquisition unit 30 sets the target area AR based on the position information of the reference object B acquired by the object information acquisition unit 32. In this embodiment, the target area acquisition unit 30 sets a predetermined area (space) of a predetermined size around the reference object B, that is, an area of a predetermined size that includes the position of the reference object B, as the target area AR. In the example in Figure 5, the target area acquisition unit 30 sets a circle (here, a sphere) with a predetermined radius centered on the position of the reference object B as the target area AR. Furthermore, in this embodiment, as described above, since the reference object B is located within the area AR0a between the first position AX1 and the second position AX2, the target area AR will also be located within the area AR0a between the first position AX1 and the second position AX2. However, the target area AR is not limited to being set as a sphere centered on the position of the reference object B, but may be an area arbitrarily set based on the position information of the reference object B. Also, the target area AR does not have to be located within the area AR0a between the first position AX1 and the second position AX2.
[0052] Figure 6 is a schematic diagram showing an example where multiple reference objects are set. Multiple reference objects B may be set. In this case, the target area acquisition unit 30 sets the target area AR based on the positional information of the multiple reference objects B. For example, as shown in Figure 6, the target area acquisition unit 30 may set the area (space) enclosed by multiple reference objects B as the target area AR.
[0053] As the reference object B moves as described above, the object information acquisition unit 32 sequentially acquires the position information of the reference object B. The target area acquisition unit 30 sequentially sets the target area AR based on the position information of the reference object B acquired by the object information acquisition unit 32. The target area acquisition unit 30 sets the target area AR so that it moves in accordance with the movement of the reference object B, that is, in accordance with the change in the position information of the reference object B. It is preferable for the target area acquisition unit 30 to set the target area AR so that it moves while maintaining the same position (relative position) of the target area AR with respect to the reference object B. In other words, the target area acquisition unit 30 sequentially updates the position of the target area AR while maintaining the same position of the target area AR with respect to the reference object B as the reference object B moves.
[0054] An example of the process of adjusting the focal position described above will be explained using Figure 5. Figure 5 shows an example where the reference object B moves in the order of position B1, position B2, position B3, and position B4, and the target area AR is set as an area centered on the reference object B. In this case, the target area AR also moves along with the movement of the reference object B. In the following, the position of the target area AR when the reference object B is at position B1 will be referred to as position AR1, the position of the target area AR when the reference object B is at position B2 will be referred to as position AR2, the position of the target area AR when the reference object B is at position B3 will be referred to as position AR3, and the position of the target area AR when the reference object B is at position B4 will be referred to as position AR4. In the example in Figure 5, since there is no object within the target area AR at position AR1, when the reference object B is at position B1 (the target area AR is at position AR1), the focal position control unit 34 does not adjust the focal position to an object, but adjusts the focal position to the set position. Furthermore, when the target region AR moves from position AR1 to position AR2, the stationary object Aa is positioned within the target region AR. In this case, since object Aa is stationary and the stationary object Aa is positioned within the target region AR due to the movement of the target region AR, the focus position control unit 34 does not focus on object Aa, but instead focuses on the set position. Note that the set position here is set relative to the target region AR, so the set position also moves along with the movement of the target region AR. It is preferable that the set position moves while maintaining the same position (relative position) with respect to the target region AR.
[0055] When the target area AR moves from position AR2 to position AR3, the moving object Ab is located within the target area AR. In this case, since the moving object Ab is located within the target area AR, the focus position control unit 34 adjusts its focus position to object Ab and continues to adjust its focus position to object Ab while object Ab is located within the target area AR. Subsequently, when the target area AR moves from position AR3 to position AR4, object Ab is located outside the target area AR. When object Ab is located outside the target area AR, the focus position control unit 34 defocuses from object Ab and adjusts its focus position to the set position.
[0056] Next, the processing flow for setting the focal position in the second embodiment will be described. Figure 7 is a flowchart illustrating the processing flow for setting the focal position. As shown in Figure 7, the control unit 24 acquires position information of the reference object B using the object information acquisition unit 32 (step S30), and the target area acquisition unit 30 sets the target area AR based on the position information of the reference object B (step S32). Then, the control unit 24 acquires position information of the object using the object information acquisition unit 32 (step S34). The order in which steps S30, S32, and S34 are performed is arbitrary. The control unit 24 determines whether the object is located within the target area AR based on the object's position information using the focal position control unit 34 (step S36). If the object is not located within the target area AR (step S36; No), the process returns to step S30, and the acquisition of the object's position information continues while updating the target area AR by acquiring the position information of the reference object. On the other hand, if the object is located within the target area AR (step S36; Yes), the focal position control unit 34 determines whether the object is moving (step S38). If the object in the target area AR is not moving (step S38; No), the focus position control unit 34 returns to step S30, updates the target area AR by acquiring the position information of the reference object, and continues to acquire the position information of the object. If the object in the target area AR is moving (step S38; Yes), the focus position control unit 34 adjusts its focus position to that object (step S40). After that, it continues to acquire the position information of the object by updating the target area AR by acquiring the position information of the reference object, and determines whether the object has moved outside the target area AR (step S42). If the object does not move outside the target area AR (step S42; No), that is, if the object remains within the target area AR, the unit returns to step S40 and continues to adjust its focus position to that object. If the object moves outside the target area AR (step S42; Yes), the focus position control unit 34 defocuses its focus position from that object (step S44). If the process is not terminated thereafter (Step S46; No), the process returns to Step S30; if the process is terminated (Step S46; Yes), this process is terminated.
[0057] As described above, in the second embodiment, the target area acquisition unit 30 sets the target area AR to move based on the position information of the moving reference object B acquired by the object information acquisition unit 32. That is, the target area acquisition unit 30 sets the target area AR to move in accordance with the movement of the reference object B. Therefore, for example, when an object of interest moves during surveillance, the target area AR can be moved in accordance with the object, making it possible to appropriately focus on the vicinity of the moving object.
[0058] Furthermore, the target area acquisition unit 30 is configured to move the target area AR in accordance with the movement of the reference object B, so as to maintain the same position of the target area AR relative to the reference object B. Therefore, by appropriately moving the target area AR to match the object of interest, it becomes possible to focus more appropriately on the vicinity of the moving object.
[0059] (Third embodiment) Next, a third embodiment will be described. The third embodiment differs from the first embodiment in that it focuses on an object that is located within the target area AR and satisfies predetermined conditions. Parts of the third embodiment that are common to the first embodiment will not be described. The third embodiment is also applicable to the first embodiment.
[0060] In the third embodiment, the focus position control unit 34 focuses on an object that is located within the target area AR and satisfies predetermined conditions. The focus position control unit 34 does not focus on an object that does not satisfy at least one of the conditions of being located within the target area AR and satisfying predetermined conditions. The focus position control unit 34 maintains focus on the object for the duration that the object remains located within the target area AR while satisfying predetermined conditions. On the other hand, if the object no longer satisfies at least one of the conditions of being located within the target area AR and satisfying predetermined conditions, the focus position control unit 34 defocuses from that object. That is, for example, if the object satisfies predetermined conditions but moves outside the target area AR, or if the object is located within the target area AR but no longer satisfies predetermined conditions, the focus position control unit 34 defocuses from that object.
[0061] The focus position control unit 34 may determine whether predetermined conditions are met by any method, for example, by determining whether predetermined conditions are met based on at least one of the object's position information and the object's image. Here, the object's position information may refer to the measurement result of the object position measuring unit 14, and the object's image may refer to image data of the object acquired by the image sensor 12.
[0062] The predetermined conditions here can be any conditions other than the object being within the target area AR. For example, the predetermined conditions may be at least one of the following: the object is performing a predetermined motion, the object has a predetermined shape, and the object is facing a predetermined direction. Alternatively, any two of these may be predetermined conditions, or all of them may be predetermined conditions. If multiple predetermined conditions are set, the focus position control unit 34 determines that the predetermined conditions are met only when all of the conditions are met.
[0063] The following describes the case where the motion of an object is subject to predetermined conditions. In this case, the focus position control unit 34 determines whether an object is performing the predetermined motion based on the position information of the object acquired continuously in a time series. The focus position control unit 34 focuses on objects that are located within the target area AR and are performing the predetermined motion. The focus position control unit 34 does not focus on objects that do not satisfy at least one of the conditions of being located within the target area AR and performing the predetermined motion. The focus position control unit 34 continues to focus on an object for the duration that the object is located within the target area AR and continues to perform the predetermined motion. On the other hand, if the object no longer satisfies at least one of the conditions of being located within the target area AR and performing the predetermined motion, the focus position control unit 34 removes the focus from that object. Note that the motion of an object here refers to the manner of movement of the object, and may refer to, for example, the direction and speed of movement of the object. For example, if a predetermined motion refers to movement in the vertical downward direction at a speed of 10 m / h or more, the focus position control unit 34 adjusts the focus position to the object moving in the vertical downward direction at a speed of 10 m / h or more within the target area AR. Note that the motion of an object is not limited to the direction and speed of movement of the object, but may refer to any manner of movement. For example, the motion of an object may refer to at least one of the direction and speed of movement of the object.
[0064] Figure 8 is a schematic diagram illustrating an example where the motion of an object is subject to predetermined conditions. In the example in Figure 8, the predetermined condition is that the object moves vertically downward (opposite to the Z direction), i.e., the direction of the object's movement. In the example in Figure 8, object A moves vertically downward from position A0a, through positions A1a and A2a to position A3a, and stops at position A3a. Position A0a is outside the target region AR, while positions A1a, A2a, and A3a are inside the target region AR. In this case, when object A is at position A0a, the focus position control unit 34 does not focus on object A because object A is outside the target region AR, but instead focuses on a set position, for example. Then, when object A is at position A1a, i.e., when object A enters the target region AR while moving vertically downward, the focus position control unit 34 focuses on object A. The focus position control unit 34 continues to focus on object A even when object A is at position A2a, and when object A moves to position A3a and stops, it moves the focus position away from object A and returns the focus position to the set position.
[0065] Next, we will explain the case where the shape of an object is subject to predetermined conditions. In this case, the focus position control unit 34 determines whether an object has the predetermined shape based on the image data in which the object is captured. It focuses on objects that are located within the target area AR and have the predetermined shape. The focus position control unit 34 does not focus on objects that do not satisfy at least one of the conditions of being located within the target area AR and having the predetermined shape. The focus position control unit 34 continues to focus on an object as long as that object has the predetermined shape and remains located within the target area AR. On the other hand, if the object no longer satisfies at least one of the conditions of being located within the target area AR and having the predetermined shape, the focus position control unit 34 defocuses from that object. The shape of an object here may be, for example, at least one of the size of the object and the external shape of the object. For example, if the predetermined shape refers to being larger than or equal to a predetermined size, the focus position control unit 34 focuses on objects of a predetermined size or larger that are located within the target area AR. Furthermore, the 3D shape information acquired by the object information acquisition unit 32 may be used to acquire the shape information of the object.
[0066] The following describes the case where the orientation of an object is subject to predetermined conditions. In this case, the focus position control unit 34 determines whether the object is facing the predetermined direction based on the image data in which the object is captured. It focuses on objects that are located within the target area AR and facing the predetermined direction. The focus position control unit 34 does not focus on objects that do not satisfy at least one of the conditions of being located within the target area AR and facing the predetermined direction. The focus position control unit 34 continues to focus on the object for as long as the object it has focused on remains located within the target area AR while facing the predetermined direction. On the other hand, if the object no longer satisfies at least one of the conditions of being located within the target area AR and facing the predetermined direction, the focus position control unit 34 removes the focus from that object. Note that the 3D shape information acquired by the object information acquisition unit 32 may be used to acquire information on the orientation of the object.
[0067] The predetermined conditions may be set in any way, for example, they may be set in advance. In this case, the focus position control unit 34 may read information indicating the predetermined conditions (e.g., direction of movement and speed of movement) from the storage unit 22, or it may obtain the predetermined conditions from other devices via the communication unit 20. Also, for example, if the predetermined conditions are not set in advance, the focus position control unit 34 may set the predetermined conditions automatically. Also, for example, a user may set the predetermined conditions. In this case, for example, the user may input information specifying the predetermined conditions (e.g., direction of movement and speed of movement) into the input unit 16, and the focus position control unit 34 may set the predetermined conditions based on the information specified by the user.
[0068] As described above, in the third embodiment, the focal position control unit 34 may focus on an object that is in the target region AR and is performing a predetermined motion. The focal position control unit 34 continues to focus on the object while it is performing the predetermined motion, and moves the focal position away from the object when the object stops performing the predetermined motion. In this way, by making the fulfillment of a predetermined motion, in addition to being in the target region AR, a condition for focusing the focal position, it becomes possible to track an object performing a specific movement and appropriately focus the focal position.
[0069] In the third embodiment, the focus position control unit 34 may focus on an object that is located in the target area AR and has a predetermined shape. By making the condition for focusing the object a predetermined shape in addition to being located in the target area AR, it becomes possible to track an object of a specific shape and appropriately adjust the focus position.
[0070] In the third embodiment, the focus position control unit 34 may focus on an object that is located in the target area AR and facing a predetermined direction. By making it a condition for focusing that the object is facing a predetermined direction in addition to being located in the target area AR, it becomes possible to track an object facing a specific direction and appropriately adjust the focus position.
[0071] Although embodiments of the present invention have been described above, the embodiments are not limited by the content of these embodiments. Furthermore, the aforementioned components include those that can be easily imagined by those skilled in the art, those that are substantially the same, and those that are equivalent. Moreover, the aforementioned components can be combined as appropriate, and the configurations of each embodiment can be combined. Furthermore, various omissions, substitutions, or modifications of the components can be made without departing from the gist of the embodiments described above. In addition, although the operation of focusing was described as a characteristic feature in each embodiment, the operation of focusing may be combined with other operations. For example, the operation of focusing may be combined with the operation of zooming in and out. Also, in the description of each embodiment, the operation of focusing may be replaced with other operations. For example, in the description of each embodiment, the operation of focusing may be replaced with the operation of zooming in and out. Furthermore, the control unit 24 of the imaging device in each embodiment may be configured to notify a predetermined recipient via the communication unit 20 when set conditions are met, such as when an object enters or leaves a predetermined target area AR, or when an object moves in a predetermined direction. The conditions set here may refer to, for example, the trigger being to focus on an object when that object moves into the target area of AR. [Explanation of Symbols]
[0072] 10 Optical elements 12 Image sensor 14 Object position measurement section 30 Target Area Acquisition Unit 32 Object information acquisition unit 34 Focus Position Control Unit AR target area AR0 imaging area B Reference object
Claims
1. An imaging device capable of imaging an object, Image sensor and An object information acquisition unit that acquires positional information of an object present in the imaging area of the image sensor, A target area acquisition unit that sets the target area to move within the imaging area, A focal position control unit controls the focal position of the imaging device such that it focuses on an object that is located within the target area and is performing a predetermined motion, keeps the focal position focused on the object while the object is performing the predetermined motion, and moves the focal position away from the object when the object stops performing the predetermined motion. It has, The focal position control unit does not adjust the focal position for objects that are within the target area at the time the imaging device starts operating. Imaging device.
2. The imaging apparatus according to claim 1, wherein the focal position control unit does not adjust the focal position to an object if a stationary object is located within the target area, and adjusts the focal position to an object if a moving object is located within the target area.
3. The imaging apparatus according to claim 1 or 2, wherein the target area acquisition unit is set to move the target area based on the position information of a moving reference object acquired by the object information acquisition unit.
4. The imaging apparatus according to claim 3, wherein the target area acquisition unit is configured to move the target area in accordance with the movement of the reference object so as to maintain the same position of the target area with respect to the reference object.
5. The imaging device according to any one of claims 1 to 4, wherein the target area acquisition unit sets the target area so that it is located between a first position where the distance from the imaging device is a first distance and a second position where the distance from the imaging device is a second distance shorter than the first distance.
6. An imaging method for imaging an object, A step to acquire positional information of objects present in the imaging area, The steps include setting the target area to move within the imaging area, The steps include controlling the focal position of the imaging device such that, for an object located within the target area and performing a predetermined motion, the focal position is aligned with the object, the focal position is kept aligned with the object while the object is performing the predetermined motion, and the focal position is moved away from the object when the object stops performing the predetermined motion, Includes, In the step of controlling the focal position, the focal position is not adjusted for objects that are within the target area at the time the imaging device starts operating. Imaging method.
7. A program that causes a computer to execute an imaging method for capturing images of an object, A step to acquire positional information of objects present in the imaging area, The steps include setting the target area to move within the imaging area, The steps include controlling the focal position of the imaging device such that, for an object located within the target area and performing a predetermined motion, the focal position is aligned with the object, the focal position is kept aligned with the object while the object is performing the predetermined motion, and the focal position is moved away from the object when the object stops performing the predetermined motion, The computer is made to execute the above, In the step of controlling the focal position, the focal position is not adjusted for objects that are within the target area at the time the imaging device starts operating. program.