Image processing device, image processing method and program
The image processing device uses a smaller output target area with out-of-frame monitor areas to track subjects efficiently, addressing the issue of device size and cost in multiple imaging unit setups.
Patent Information
- Application Number
- JP2022127807
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-08-10
- Publication Date
- 2024-10-02
- Estimated Expiration
- 2042-08-10
AI Technical Summary
The use of multiple imaging units to track a subject results in a larger device size and increased manufacturing costs.
An image processing device that sets an output target area smaller than the frame image area with an out-of-frame monitor area biased in a predetermined direction from the center, allowing detection of subjects outside the output target area using a single imaging unit.
Enables subject tracking with a simpler configuration, reducing processing load and device size while maintaining high frame rates and avoiding increased manufacturing costs.
Smart Images

Figure 0007559810000001 
Figure 0007559810000002 
Figure 0007559810000003
Abstract
Description
[Technical field]
[0001] The present invention relates to an image processing device, an image processing method, and a program. [Background technology]
[0002] Conventionally, various techniques have been proposed for tracking a subject detected in a moving image including a plurality of frame images. For example, Patent Document 1 discloses a technique in which a subject is photographed by two imaging units having different angles of view, and when the subject moves out of the angle of view of one imaging unit, the subject is detected in the photographing range of the other imaging unit capable of photographing at a wider angle, and notification information relating to the position of the subject is output. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2012-29245 A Summary of the Invention [Problem to be solved by the invention]
[0004] However, providing two imaging units to detect the subject to be tracked poses problems such as an increase in the size of the device and an increase in manufacturing costs.
[0005] An object of the present invention is to provide an image processing device, an image processing method, and a program that are capable of detecting a subject to be tracked with a simpler configuration. [Means for solving the problem]
[0006] In order to solve the above problems, an image processing device according to the present invention includes a processing unit that sets an output target area smaller than a frame image area related to a plurality of frame images in a central portion of the frame image area as a range in which image data is output, and sets an outside-frame monitor area, which is a target for detecting a subject, in a position offset in a predetermined direction from the central portion and within the frame of the output target area in the frame image area. The processing unit acquires a first image and a second image generated after the first image, which are included in the multiple frame images, and executes a detection process for the first image and the second image to detect a subject within the output target area and the outside-frame monitor area. If the detection process detects a subject within the output target area of the first image and also detects the subject within a certain outside-frame monitor area of the second image, the processing unit resets the output target area in the second image to a position that includes at least a portion of the certain outside-frame monitor area at an end.
[0007] In order to solve the above problems, an image processing method according to the present invention is an image processing method executed by a computer of an image processing device, which sets an output target area smaller than a frame image area relating to a plurality of frame images in a central portion of the frame image area as a range in which image data is output, and sets an outside-frame monitor area, which is a target for detecting a subject, in a position offset in a predetermined direction from the central portion within the frame outside of the output target area in the frame image area. The setting process includes a setting process for acquiring a first image and a second image generated after the first image, which are included in the plurality of frame images, and executing a detection process for detecting a subject within the output target area and the outside-frame monitor area for the first image and the second image, and when the detection process detects a subject within the output target area of the first image and also detects the subject within a certain outside-frame monitor area of the second image, resetting the output target area in the second image to a position that includes at least a portion of the certain outside-frame monitor area at an end.
[0008] In order to solve the above-mentioned problems, a program according to the present invention causes a computer of an image processing device to set an output target area smaller than a frame image area in a center portion of the frame image area relating to a plurality of frame images as a range in which image data is output. death, A frame-outside monitor area for detecting a subject is set at a position offset in a predetermined direction from the center of the frame image area outside the output target area. and the setting means functions as a setting means for acquiring a first image and a second image generated after the first image, which are included in the plurality of frame images, and executing a detection process for the first image and the second image to detect a subject within the output target area and the outside-frame monitor area, and when the detection process detects a subject within the output target area of the first image and also detects the subject within a certain outside-frame monitor area of the second image, resets the output target area in the second image to a position that includes at least a portion of the certain outside-frame monitor area at an end. Effect of the Invention
[0009] According to the present invention, it is possible to detect a subject to be tracked with a simpler configuration. [Brief description of the drawings]
[0010] [Figure 1] FIG. 2 is a block diagram showing a functional configuration of the electronic device. [Diagram 2] 4 is a diagram showing a frame image region relating to a plurality of frame images captured by an imaging section; FIG. [Diagram 3]13 is a diagram showing a frame image area when a subject is detected in the outer-frame monitor area. FIG. [Figure 4] FIG. 13 is a diagram showing a frame image area in a state in which an outer-frame monitor area has been reset. [Diagram 5] 13 is a diagram showing a frame image area when a subject is detected in the outside-frame monitor area after resetting. FIG. [Figure 6] FIG. 13 is a diagram showing the frame image area in a state where the outer-frame monitor area has been reset for the second time. [Figure 7] 13 is a diagram showing an example of setting an outer-frame monitor area at a position adjacent to the outer edge of a frame image area. FIG. [Figure 8] 13 is a diagram showing an example of setting an outer-frame monitor area at a position adjacent to the outer side of an output target area. FIG. [Figure 9] 13 is a flowchart showing a control procedure for subject tracking processing. [Figure 10] 13 is a flowchart showing a control procedure for subject tracking processing. [Figure 11] 13 is a flowchart showing a control procedure of an area resetting process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0012] <Configuration of Electronic Device 1> FIG. 1 is a block diagram showing the functional configuration of an electronic device 1 according to the present embodiment. The electronic device 1 (image processing device) includes a CPU 11 (Central Processing Unit), a RAM 12 (Random Access Memory), a storage unit 13, an imaging unit 14, an image processing unit 15 having an image processing CPU 151 (Digital Signal Processor), a display unit 16, an operation unit 17, a bus 18, and the like. Each unit of the electronic device 1 is connected via the bus 18. The electronic device 1 of this embodiment is, for example, a smartphone capable of capturing moving images and still images using the imaging unit 14. However, the electronic device 1 is not limited to this, and may be other devices capable of capturing moving images, such as a tablet terminal, a digital camera, a video camera, a notebook PC, a stationary PC, or a drive recorder.
[0013] The CPU 11 is a processor that reads and executes the control program 131 stored in the storage unit 13 and performs various arithmetic processing to control the operation of the electronic device 1. The electronic device 1 may have multiple processors (e.g., multiple CPUs), and the multiple processes executed by the CPU 11 of the present embodiment may be executed by the multiple processors. In this case, the multiple processors may be involved in a common process, or the multiple processors may independently execute different processes in parallel.
[0014] The RAM 12 provides a working memory space for the CPU 11 and stores temporary data. A detection target presence flag 121 and a searching flag 122, which are referenced in a subject tracking process described later, are stored in the RAM 12. The detection target presence flag 121 and the searching flag 122 are 1-bit data that can take two values, "1 (on)" and "0 (off)."
[0015] The storage unit 13 is a non-transitory recording medium readable by the CPU 11 and the image processing CPU 151 as a computer, and stores a control program 131, an image processing program 132, and various data. The storage unit 13 includes a non-volatile memory such as a flash memory. The control program 131 and the image processing program 132 are stored in the storage unit 13 in the form of computer-readable program codes. The data stored in the storage unit 13 include captured image data 133, output image data 134, subject data 135, and area setting data 136. The contents of these data will be described later.
[0016] The imaging unit 14 includes a camera having an optical system that forms an image of incident light and an imaging element that detects the incident light formed by the optical system, and generates captured image data 133 relating to an image captured by the camera based on a detection signal output from the imaging element of the camera. The optical system is, for example, composed of a mirror and a lens group. The imaging element is not particularly limited as long as it is capable of photoelectrically converting incident light, and may be, for example, a CCD (Charge Coupled Device) or a CMOS (Complementary Metal Oxide Semiconductor). The imaging unit 14 amplifies and A / D converts the detection signal from the imaging element to generate the captured image data 133. The imaging unit 14 also captures a plurality of frame images relating to a moving image (moving image) at a frame rate according to the control of the CPU 11, and generates a plurality of captured image data 133 relating to the plurality of frame images. The generated captured image data 133 is stored in the storage unit 13. The resolution of the frame images captured by the imaging unit 14 corresponds to the number of imaging elements the camera has. For example, the number of pixels in the vertical and horizontal directions of a frame image is the same as the number of pixels in the vertical and horizontal directions of image pickup elements arranged in a camera.
[0017] The image processing CPU 151 of the image processing unit 15 is a processor (one or more processing units) that reads and executes the image processing program 132 stored in the storage unit 13, and performs various arithmetic processing, thereby executing various processes on the captured image data 133. Note that the image processing unit 15 may have multiple processors (e.g., multiple CPUs and / or DSPs (Digital Signal Processors)), and the multiple processes executed by the image processing CPU 151 of this embodiment may be executed by the multiple processors. In this case, the multiple processors constitute "one or more processing units." In this case, the multiple processors may be involved in a common process, or the multiple processors may independently execute different processes in parallel. The multiple processors may include the CPU 11.
[0018] The image processing CPU 151 of the image processing unit 15 extracts, for example, a part of the captured image data 133 relating to a frame image to generate output image data 134. The image processing CPU 151 also executes a subject tracking process for tracking a subject in a plurality of frame images. The subject tracking process will be described in detail later. The image processing CPU 151 may also perform various image conversion processes, such as shading correction and color correction, on the captured image data 133 and / or the output image data 134. The image processing unit 15 may also include an internal storage unit for image processing separate from the RAM 12 and the storage unit 13, and some of the programs and data stored in the RAM 12 and / or the storage unit 13 may be stored in the storage unit for image processing.
[0019] The display unit 16 includes a display device such as a liquid crystal display. The display unit 16 plays back and displays the captured moving image and displays the target captured by the imaging unit 14 as a live view image (through image) in real time in accordance with the output image data 134 and the control signal transmitted from the CPU 11.
[0020] The operation unit 17 has a touch panel provided over the display screen of the display unit 16, and operation buttons provided on the housing of the electronic device 1. The operation unit 17 detects contact with a finger or the like on the touch panel and operations on the operation buttons, and outputs an operation signal according to the detection result to the CPU 11.
[0021] <Electronic device operation> Next, the operation of electronic device 1 will be described, focusing on the operation of shooting a moving image and the operation of tracking a subject while shooting the moving image.
[0022] FIG. 2 is a diagram showing a frame image area 20 relating to a plurality of frame images captured by the imaging section 14. As shown in FIG. In the following description, the upper left vertex of the rectangle formed by the frame image area 20 in FIG. 2 is taken as the origin, the X-axis is an axis parallel to the outer side extending in the left-right direction of the frame image area 20 and with a positive direction from the origin to the right, and the Y-axis is an axis parallel to the outer side extending in the up-down direction of the frame image area 20 and with a positive direction from the origin to the bottom. The frame image area 20 is an area made up of pixels arranged in the same manner as each frame image. Therefore, the number of pixels in the X and Y directions of the frame image area 20 is the same as the number of pixels in the X and Y directions of each frame image (captured image data 133). Furthermore, any pixel position within the frame image area 20 can be identified using the X and Y coordinates.
[0023] In the center of the frame image area 20, a rectangular output target area 21 smaller than the frame image area 20 is set as a range in which image data is output. The image processing CPU 151 of the image processing unit 15 of this embodiment extracts image data of a portion within the range of the output target area 21 from the entirety (corresponding to the frame image area 20) of each frame image (captured image data 133), and outputs it to the CPU 11 as output image data 134. That is, the image processing CPU 151 extracts an output image having a smaller angle of view than the frame image from each frame image, and outputs it to the CPU 11. The CPU 11 records a plurality of output image data 134 relating to the generated plurality of output images in the storage unit 13 as reproducible video data. In parallel, the CPU 11 transmits the generated plurality of output image data 134 as it is to the display unit 16, thereby displaying the subject being photographed by the imaging unit 14 on the display unit 16 in real time as a live view image. The plurality of output image data 134 may be simply displayed on the display unit 16 as a live view image without being recorded as video data.
[0024] In this way, the amount of image data to be read can be reduced by making the output target area 21, a part of the frame image area 20, the output target of the image data. Also, it is possible to shorten the read time of the image data to achieve a high frame rate, or to lower the transfer rate (read speed) of the image data while maintaining the read time.
[0025] The size of the output target area 21 (the number of pixels in the X and Y directions (resolution)) is set according to the output standard that the output image data 134 to be output must satisfy. The output standard is not particularly limited, and may be, for example, HD (1280×720 pixels) or full HD (1920×1080 pixels). In addition, the output target area 21 does not necessarily have to be similar in shape to the frame image area 20.
[0026] The center of the frame image area 20 where the output target area 21 is set includes the center point of the frame image area 20 (the intersection of the diagonals of the rectangle). In this embodiment, the range where the output target area 21 is set in FIG. 2 is the center of the output target area 21. In FIG. 2, the output target area 21 is set at a position where the center point of the frame image area 20 and the center point of the output target area 21 overlap. However, this is not limited to this, and the center point of the output target area 21 may be slightly shifted from the center point of the frame image area 20. The position of the output target area 21 shown in FIG. 2 is an initial position, and as described later, the position of the output target area 21 is changed depending on the tracking situation of the subject. The setting range of the output target area 21 in the frame image area 20 (for example, the X coordinate and Y coordinate of a pair of opposite vertices of a rectangle formed by the setting range) is stored in the area setting data 136 of the storage unit 13, and is updated when changed.
[0027] In this embodiment, an example will be described in which a person riding a bicycle and moving in the +X direction is photographed as subject 30 by electronic device 1 held and fixed in the user's hand. Thus, the subject 30 moving in the +X direction and the background of subject 30 are captured in the multiple frame images. Although the background of subject 30 is omitted in FIG. 2, the background is actually captured over the entire frame image area 20. Meanwhile, as described above, during shooting, the range of output target area 21 in frame image area 20 is displayed on display unit 16 as a live view image.
[0028] FIG. 2 shows frame image Im1 (first image) among the multiple frame images. In frame image Im1, subject 30 (specifically, the front end of the bicycle included in subject 30) reaches the right end of output target area 21. Also, in FIG. 2, the position of subject 30 in a certain frame image generated before frame image Im1 among the multiple frame images is shown by a dashed line. Thus, subject 30 moves from the dashed line position to the right end of output target area 21 from the certain frame image to frame image Im1. From such a movement history, subject 30 is highly likely to move further in the +X direction and go outside output target area 21. Note that in this embodiment, "subject 30 going outside output target area 21" means "at least a part of subject 30 (for example, the front end of the bicycle included in subject 30) going outside output target area 21".
[0029] If subject 30 goes outside output target area 21 displayed as a live view image on display unit 16, the user will be unable to see the entire subject 30 on display unit 16. It would be ideal if the user could capture subject 30 again within output target area 21 by changing the orientation of electronic device 1 themselves, but depending on the movement and size of subject 30, it is not necessarily easy to perform such an operation appropriately every time.
[0030] Therefore, when the subject 30 goes outside the output target area 21, the image processing CPU 151 of the image processing unit 15 of this embodiment attempts to detect the subject 30 in a part of the frame image area 20 outside the frame of the output target area 21. Then, when the image processing CPU 151 detects the subject 30, it resets the output target area 21 so that the detected subject 30 is included in the output target area 21 (i.e., it changes the position of the output target area 21 in the frame image area 20). In other words, when the subject 30 goes outside the output target area 21, the image processing CPU 151 resets the output target area 21 so as to track the subject 30. The operation related to tracking the subject 30 will be described below.
[0031] In order to track the subject 30, the image processing CPU 151 sets in advance rectangular outside-frame monitor areas 22a to 22d (hereinafter, when referring to any one of the outside-frame monitor areas 22a to 22d, it will be referred to as "outside-frame monitor area 22") to detect the subject 30 at positions offset in a predetermined direction from the center of the output target area 21 in the frame image area 20. In detail, as shown in FIG. 2, the outside-frame monitor area 22a is set at a position offset in the +X direction from the output target area 21, the outside-frame monitor area 22b is set at a position offset in the +Y direction from the output target area 21, the outside-frame monitor area 22c is set at a position offset in the -X direction from the output target area 21, and the outside-frame monitor area 22d is set at a position offset in the -Y direction from the output target area 21. In this way, the image processing CPU 151 sets one outside-frame monitor area 22 for each of the four sides of the output target area 21. Among these, the length and extension range of the outside-frame monitor areas 22a and 22c in the Y direction are the same as the length and extension range of the output target area 21 in the Y direction. Moreover, the length and extension range of the outside-frame monitor areas 22b and 22d in the X direction are the same as the length and extension range of the output target area 21 in the X direction. Moreover, the width of the outside-frame monitor areas 22a and 22c in the X direction is determined within a range equal to or less than the distance in the X direction between the output target area 21 and the outer side of the frame image area 20. Moreover, the width of the outside-frame monitor areas 22b and 22d in the Y direction is determined within a range equal to or less than the distance in the Y direction between the output target area 21 and the outer side of the frame image area 20. Moreover, the length of the outside-frame monitor areas 22a and 22c in the Y direction may be longer than the length of the output target area 21 in the Y direction. Moreover, the length of the outside-frame monitor areas 22b and 22d in the X direction may be longer than the length of the output target area 21 in the X direction. In the example shown in FIG. 2, the image processing CPU 151 sets the outside-frame monitor area 22 at a position that does not contact the outer periphery of the output target area 21 (i.e., at a position where a gap is created between the output target area 21 and the outside-frame monitor area 22).
[0032] The image processing CPU 151 also sets a rectangular in-frame monitor area 23, which is a target for detecting a subject, at an end of the frame of the output target area 21. FIG. 2 shows one in-frame monitor area 23 set at an end of the output target area 21 along the side of the outside-frame monitor area 22a (+X direction side). The size (number of pixels) of this in-frame monitor area 23 in the X direction and Y direction can be the same as the size (number of pixels) of the outside-frame monitor area 22a in the X direction and Y direction. Although omitted in FIG. 2, the in-frame monitor area 23 is also set at an end of the output target area 21 along the side of the outside-frame monitor area 22b, an end of the output target area 21 along the side of the outside-frame monitor area 22c, and an end of the output target area 21 along the side of the outside-frame monitor area 22d. The in-frame monitor areas 23 set on the outside-frame monitor area 22b side and the outside-frame monitor area 22d side can be the same size as the outside-frame monitor areas 22b and 22d. Moreover, the inside-frame monitor area 23 set on the outside-frame monitor area 22c side can be made the same size as the outside-frame monitor area 22c.
[0033] The setting ranges of the outside-frame monitor area 22 and the inside-frame monitor area 23 in the frame image area 20 (for example, the X and Y coordinates of a pair of opposite vertices of a rectangle formed by the setting ranges) are stored in area setting data 136 of the storage unit 13.
[0034] When imaging section 14 starts capturing an image, image processing CPU 151 executes detection processing for detecting subject 30 in output target area 21 of frame image area 20. Image processing CPU 151 determines detected subject 30 as a tracking target. For example, the detection process may be a process of extracting and identifying the subject 30, which is a tracking target (detection target) included in the output target area 21, based on the result of a predetermined image recognition process on image data of a portion of the captured image data 133 of a certain frame image that corresponds to the output target area 21. Specifically, a certain image pattern expressing the characteristics of the subject 30 may be searched for in the portion of the captured image data 133 that corresponds to the output target area 21 by pattern matching process, and the subject 30 may be identified based on the search result. Alternatively, the portion of the captured image data 133 that corresponds to the output target area 21 may be input to a machine learning model that has been machine-learned in advance using an image of the subject 30 as training data, and the subject 30 may be identified based on the recognition result of the subject 30 by the machine learning model. Alternatively, the detection process may be a process of extracting and identifying, as subject 30, an object captured in the vicinity of a tapped point on display unit 16, based on an operation of the user tapping on the point.
[0035] Information related to the identified subject 30 is stored in the subject data 135 of the storage unit 13. The information stored in the subject data 135 may be any information necessary for detecting the subject 30 in the subsequent detection process. For example, it may be image data of a portion of the captured image data 133 corresponding to the identified subject 30, or data related to the features of the subject 30 used in the extraction and identification of the subject 30 described above. In this embodiment, the image of the subject 30 (a person riding a bicycle) shown in FIG. 2 is stored in the subject data 135. In addition, when the subject 30 is identified by the detection process in the output target area 21, the detection target presence flag 121 is set to "1 (on)".
[0036] When the subject 30 is specified by the detection process in the output target area 21, the image processing CPU 151 executes the detection process for detecting the subject 30 in the in-frame monitor area 23 of the output target area 21 every time a frame image is acquired thereafter. In this detection process, the image processing CPU 151 detects whether or not at least a part of the subject 30 has entered the in-frame monitor area 23 based on the information stored in the subject data 135. Then, after detecting the subject 30 in the in-frame monitor area 23 in a certain frame image, if the subject 30 reaches the end of the in-frame monitor area 23 (i.e., the end of the output target area 21) in the next frame image, the image processing CPU 151 determines that the subject 30 has gone outside the output target area 21 in the next frame image, and starts tracking the subject 30. In the frame image Im1 shown in FIG. 2, the subject 30 has reached the end of the in-frame monitor area 23 (the output target area 21). Therefore, from the frame image acquired next to frame image Im1, image processing CPU 151 starts tracking subject 30 outside output target area 21. When tracking of subject 30 starts, searching flag 122 is set to "1 (ON)".
[0037] When tracking of the subject 30 outside the output target area 21 is started, the image processing CPU 151 executes a detection process for detecting the subject 30 in the outside-frame monitor area 22 every time a frame image is acquired. The detection process here can be performed in the same manner as the detection process in the inside-frame monitor area 23 described above. In addition, in the detection process in the outside-frame monitor area 22, the subject 30 may be detected based on information related to a portion of the information related to the subject 30 stored in the subject data 135, which is information related to a portion of the subject 30 in the last frame image (frame image Im1 in FIG. 2) before tracking started that was in the inside-frame monitor area 23. For example, the subject 30 in the outside-frame monitor area 22 may be detected based on image data related to a portion of the subject 30 in FIG. 2 that is in the inside-frame monitor area 23 (the forward portion including the front wheel of the bicycle). In addition, the image processing CPU 151 may execute a detection process in each of the four outside-frame monitor areas 22a to 22d. Alternatively, the detection process may be executed only on the outside-frame monitor area 22 (outside-frame monitor area 22a in FIG. 2) adjacent to the inside-frame monitor area 23 in which the subject 30 was last detected.
[0038] FIG. 3 is a diagram showing the frame image area 20 when a subject 30 is detected in the outside-frame monitor area 22a. FIG. 3 shows a frame image Im2 (a second image) that was generated after the frame image Im1 among a plurality of frame images. The frame image Im2 does not necessarily have to be the image next to the frame image Im1, and one or more other frame images may be sandwiched between the frame image Im1 and the frame image Im2. In the frame image Im2, a part of the subject 30 (the part on the front side including the front wheel of the bicycle) is within the outside-frame monitor area 22a. Therefore, the image processing CPU 151 detects that the subject 30 is located within the outside-frame monitor area 22a by the detection process in the outside-frame monitor area 22a. It is assumed that the subject 30 has also moved slightly in the -Y direction from the state shown in FIG. 2.
[0039] In this way, if subject 30 is detected by detection processing in the in-frame monitor area 23 of frame image Im1 and then subject 30 is detected by detection processing in the outside-frame monitor area 22a of frame image Im2, image processing CPU 151 re-sets output target area 21 in frame image Im2 to a position that includes at least a portion of the outside-frame monitor area 22a at its end.
[0040] FIG. 4 is a diagram showing the frame image area 20 in a state in which the outer-frame monitor area 22 has been reset. The X coordinate of the right edge of the reset output target area 21 shown in Fig. 4 is the same as the X coordinate of the right edge of the outside-frame monitor area 22a before resetting shown in Fig. 3. That is, the reset output target area 21 is an area that includes at least a part of the outside-frame monitor area 22a before resetting at its end in the +X direction. In other words, the image processing CPU 151 resets the output target area 21 in the frame image Im2 to a position such that the output target area 21 is an area that includes at least a part of the outside-frame monitor area 22a at its end.
[0041] Here, the position of the output target area 21 in the Y direction is also adjusted to match the position of the detected subject 30 in the Y direction. That is, the output target area 21 is reset to a position shifted toward the -Y direction side from the output target area 21 before resetting shown in FIG. 3 so that the subject 30 in the frame image Im2 is positioned approximately at the center in the Y direction of the reset output target area 21. More specifically, the image processing CPU 151 determines the position of the reset output target area 21 so that the position of the subject 30 in the in-frame monitor area 23 in the output target area 21 before resetting in the frame image Im1 coincides with the position of the subject 30 in the in-frame monitor area 23 in the output target area 21 after resetting in the frame image Im2. This makes it possible to track the subject 30 not only in its movement in the X direction but also in its movement in the Y direction. When tracking in the Y direction is not performed, the output target area 21 may be reset to a position that includes the entire outside-frame monitor area 22a shown in FIG. 3 at its end.
[0042] In the frame image Im2, image data of a portion corresponding to the reset output target area 21 is extracted to generate output image data 134. Thus, the recorded moving image and the preview image displayed on the display unit 16 are adjusted to a state in which the entire subject 30 is captured at the right edge in the frame of the frame image Im2. In other words, the subject 30 that went outside the output target area 21 after the frame of the frame image Im1 is tracked, and is adjusted to enter the output target area 21 again in the frame of the frame image Im2. Also, when the subject 30 is detected in the outside-frame monitor area 22 and the output target area 21 is reset, the searching flag 122 is temporarily set to "0 (off)". However, when the subject 30 goes outside the output target area 21 again as described later, the searching flag 122 is set to "1 (on)" again.
[0043] Furthermore, when resetting the output target area 21, the image processing CPU 151 also resets the four outside-frame monitor areas 22. In detail, the image processing CPU 151 resets the outside-frame monitor areas 22a-22d so that the positional relationship between the output target area 21 and the outside-frame monitor areas 22a-22d after the output target area 21 has been reset (FIG. 4) is the same as the positional relationship between the output target area 21 and the outside-frame monitor areas 22a-22d before the output target area 21 has been reset (FIG. 3). In FIG. 4, it is assumed that the outside-frame monitor area 22a after the resetting is in contact with the outer side of the frame image area 20. Furthermore, the image processing CPU 151 also resets the in-frame monitor area 23 in accordance with the position of the output target area 21 after resetting.
[0044] When the output target area 21, the outside-frame monitor area 22, and the inside-frame monitor area 23 are reset, a detection process for the subject 30 is executed in the inside-frame monitor area 23, in the same manner as after the initial setting of the output target area 21, and it is determined whether or not the subject 30 has left the output target area 21. Furthermore, when it is determined that the subject 30 has left the output target area 21, tracking of the subject 30 is started, and a detection process for the subject 30 is executed in the outside-frame monitor area 22.
[0045] FIG. 5 is a diagram showing the frame image area 20 when a subject 30 is detected in the outside-frame monitor area 22a after the resetting. 5 shows frame image Im3, which was generated after frame image Im2, among multiple frame images. When focusing on the combination of frame image Im2 and frame image Im3, frame image Im2 corresponds to the "first image" and frame image Im3 corresponds to the "second image." In frame image Im3, a part of subject 30 is within outside-frame monitor area 22a after resetting. Note that subject 30 has also moved slightly in the -Y direction from the state shown in FIG. 4.
[0046] In this way, when subject 30 is detected by detection processing in the in-frame monitor area 23 of frame image Im2 shown in FIG. 4 and then subject 30 is detected by detection processing in the outside-frame monitor area 22a of frame image Im3 shown in FIG. 5, image processing CPU 151 resets output target area 21 in frame image Im3 to a position that includes at least a portion of the outside-frame monitor area 22a in FIG. 4 at its edge.
[0047] FIG. 6 is a diagram showing the frame image area 20 in a state in which the outer-frame monitor area 22 has been reset for the second time. The X coordinate of the right edge of the reset output target area 21 shown in Fig. 6 is the same as the X coordinate of the right edge of the outside-frame monitor area 22a before resetting shown in Fig. 5. Therefore, the reset output target area 21 is in contact with the outer edge in the +X direction of the frame image area 20. In this way, if the outside-frame monitor area 22a before resetting was in contact with the outer edge of the frame image area 20, the image processing CPU 151 resets the output target area 21 to a position in contact with the outer edge of the frame image area 20.
[0048] Moreover, the output target area 21 is reset to a position shifted toward the -Y direction side from the output target area 21 before resetting shown in Fig. 5 so that the subject 30 in the frame image Im3 is positioned approximately at the center in the Y direction of the output target area 21. More specifically, the image processing CPU 151 determines the position of the output target area 21 after resetting so that the position of the subject 30 in the in-frame monitor area 23 in the output target area 21 before resetting, in the frame image Im2, matches the position of the subject 30 in the in-frame monitor area 23 in the output target area 21 after resetting, in the frame image Im3.
[0049] Furthermore, when resetting the output target area 21 for the second time, the image processing CPU 151 also resets the outside-frame monitor area 22. However, since the output target area 21 is already in contact with the outer edge of the frame image area 20 on the +X side here, it is not possible to set the outside-frame monitor area 22a at a position offset in the +X direction from the output target area 21. For this reason, the resetting of the outside-frame monitor area 22a is omitted. Furthermore, since the output target area 21 has shifted twice to the -Y direction side, it is not possible to reset the outside-frame monitor area 22d on the -Y direction side so that its positional relationship with the output target area 21 is the same before and after the resetting. For this reason, as shown in FIG. 6, the outside-frame monitor area 22d is reset to a position in contact with the outer edge of the frame image area 20 on the -Y direction side.
[0050] In the above description, it is assumed that the subject 30 that has gone outside the output target area 21 heads toward the outside-frame monitor area 22a, but the subject 30 may return to the output target area 21 before entering the outside-frame monitor area 22a. For this reason, when tracking of the subject 30 is started, a detection process is also executed in the inside-frame monitor area 23 (or the entire output target area 21) in parallel with the detection process in the outside-frame monitor area 22a. When the subject 30 is detected in the inside-frame monitor area 23 (or the output target area 21) after tracking starts, the output target area 21, the outside-frame monitor area 22, and the inside-frame monitor area 23 are not reset, and tracking ends. Also, the searching flag 122 is set to "0 (off)".
[0051] In addition, after the subject 30 leaves the output target area 21 and tracking of the subject 30 is started, if a predetermined tracking duration time has elapsed without the subject 30 being detected in the detection process in either the outside-frame monitor area 22 or the output target area 21, tracking of the subject 30 may be stopped. This makes it possible to avoid unnecessary continuation of tracking when tracking becomes impossible due to the subject 30 moving in an unexpected direction or the orientation of the imaging unit 14 of the electronic device 1 being changed to a different orientation from that of the subject 30. When tracking is stopped, the detection target flag 121 and the searching flag 122 are set to "0 (off)". In addition, the output target area 21, the outside-frame monitor area 22, and the inside-frame monitor area 23 are reset to the initial state positions shown in FIG. 2. The above tracking duration time is set in advance and stored in the storage unit 13. The tracking duration time may be changeable by a user's operation on the operation unit 17.
[0052] In the above description, when setting the output target area 21 for the first time shown in Fig. 2, the outside-frame monitor areas 22a-22d are set at positions that do not contact either the outer edge (periphery) of the output target area 21 or the outer edge of the frame image area 20, but this is not limiting. For example, as shown in Fig. 7, the outside-frame monitor areas 22a-22d may be set at positions that contact the outer edge of the frame image area 20. Furthermore, as shown in Fig. 8, the outside-frame monitor areas 22a-22d may be set at positions that contact the outer edge of the output target area 21. Furthermore, the initial positions and / or sizes of the output target area 21, the outside-frame monitor area 22, and the inside-frame monitor area 23 may be changeable by a user's operation on the operation unit 17.
[0053] <Subject tracking processing> Next, the subject tracking process executed by the image processing CPU 151 of the image processing section 15 to realize the above-mentioned operation related to tracking of the subject 30 will be described. 9 to 11 are flowcharts showing the control procedure of the subject tracking process. The subject tracking process starts when the imaging unit 14 starts capturing an image after the electronic device 1 is started.
[0054] When the subject tracking process is started, the image processing CPU 151 sets the detection target presence flag 121 and the searching flag 122 to "0" (step S101).
[0055] The image processing CPU 151 sets the output target area 21, the outside-frame monitor area 22, and the inside-frame monitor area 23 in a predetermined initial position (the position shown in FIG. 2) in the frame image area 20, and stores the setting contents in the area setting data 136 (step S102).
[0056] The image processing CPU 151 acquires (step S103) output image data 134 relating to the next frame image (the first frame image, if shooting has just started) generated by the imaging section 14. In this embodiment, acquiring output image data 134 relating to the frame image corresponds to "acquiring an image."
[0057] The image processing CPU 151 determines whether the detection target presence flag 121 is "1" (step S104) and whether the searching flag 122 is "1" (step S105). When the image processing CPU 151 determines that the detection target presence flag 121 is "0" ("NO" in step S104) and that the searching flag 122 is "0" ("NO" in step S105), it executes the above-mentioned detection process in the output target area 21 (step S106).
[0058] When the image processing CPU 151 identifies the subject 30 to be detected (tracked) in the output target area 21 through the detection process ("YES" in step S107), it generates subject data 135 related to the identified subject 30 and stores it in the storage unit 13 (step S108). In addition, the image processing CPU 151 sets the detection target presence flag 121 to "1" (step S109).
[0059] When step S109 is completed, or when the subject 30 to be detected is not identified in step S107 ("NO" in step S107), the image processing CPU 151 extracts image data of a portion corresponding to the output target area 21 from the captured image data 133, and outputs it to the CPU 11 as output image data 134 (step S110). After that, the image processing CPU 151 determines whether or not there is a next frame image (step S111). When it is determined that there is a next frame image (step S111), the image processing CPU 151 returns the process to step S103, and acquires the captured image data 133 related to the next frame image.
[0060] In processing related to a frame image acquired after the detection target presence flag 121 is set to "1", the image processing CPU 151 determines in step S105 that the detection target presence flag 121 is "1" ("YES" in step S105). In this case, the image processing CPU 151 executes a detection process in the in-frame monitor area 23 (step S112). Furthermore, the image processing CPU 151 detects the subject 30 in the in-frame monitor area 23 by the detection process, and determines whether or not the subject 30 has reached an end of the in-frame monitor area 23 (step S113). When the subject 30 is detected in the in-frame monitor area 23 and it is determined that the subject 30 has reached the end of the in-frame monitor area 23 ("YES" in step S113), the image processing CPU 151 determines that the subject 30 will go outside the output target area 21 in the next frame image, sets the searching flag 122 to "1", and starts tracking the subject 30 (step S114). The image processing CPU 151 also shifts the process to step S110.
[0061] On the other hand, if it is determined that the subject 30 is not detected in the in-frame monitor area 23, or that the subject 30 is detected but has not reached the end of the in-frame monitor area 23 ("NO" in step S113), the image processing CPU 151 keeps the searching flag 122 at "0" and transitions to step S110.
[0062] In processing related to a frame image acquired after the searching flag 122 is set to "1", the image processing CPU 151 determines in step S104 that the searching flag 122 is "1" ("YES" in step S104) and transitions the processing to step S115 in FIG. 10.
[0063] In step S115, the image processing CPU 151 executes detection processing in the outside-frame monitor area 22. If it is determined that the subject 30 has been detected in the outside-frame monitor area 22 ("YES" in step S116), the image processing CPU 151 executes area resetting processing (step S117).
[0064] FIG. 11 is a flowchart showing a control procedure for the area resetting process. When the area resetting process is called, the image processing CPU 151 resets the output target area 21 so that it is an area including the outside-frame monitor area 22 in which the subject 30 is detected at its edge, and updates the area setting data 136 according to the resetting content (step S201). Also, it resets the inside-frame monitor area 23 at the edge of the reset output target area 21, and updates the area setting data 136 according to the resetting content (step S202).
[0065] The image processing CPU 151 determines whether it is possible to set the four outside-frame monitor areas 22a-22d in a predetermined positional relationship with respect to the reset output target area 21 (step S203), and if it is determined that it is possible ("YES" in step S203), it resets the four outside-frame monitor areas 22a-22d in a predetermined positional relationship with respect to the output target area 21 (step S204). Also, the image processing CPU 151 updates the area setting data 136 according to the contents of the resetting.
[0066] If it is determined that the four outside-frame monitor areas 22a to 22d cannot be set in a predetermined positional relationship with respect to the reset output target area 21 ("NO" in step S203), the image processing CPU 151 determines whether or not there is space to set each outside-frame monitor area 22 (step S205). If it is determined that there is space to set each outside-frame monitor area 22 ("YES" in step S205), the image processing CPU 151 resets the outside-frame monitor areas 22 that cannot be set in a predetermined positional relationship to positions that contact the outer side of the frame image area 20, and resets the remaining outside-frame monitor areas 22 in a predetermined positional relationship (step S206). Furthermore, the image processing CPU 151 updates the area setting data 136 according to the contents of the resetting.
[0067] If it is determined that there is no space to set any of the outside-frame monitor areas 22 ("NO" in step S205), the image processing CPU 151 resets each of the three (or two) settable outside-frame monitor areas 22 in a predetermined positional relationship, and resets the outside-frame monitor areas 22 that cannot be reset in the predetermined positional relationship to a position adjacent to the outer edge of the frame image area 20 (step S207). Also, the image processing CPU 151 updates the area setting data 136 according to the contents of the resetting.
[0068] When any one of steps S204, S206, and S207 is completed, the image processing CPU 151 ends the area resetting process and shifts the process to step S118 in Fig. 10. In step S118, the image processing CPU 151 sets the searching flag 122 to "0" and shifts the process to step S110 in Fig. 9.
[0069] 10, when it is determined that the subject 30 has not been detected by the detection process in the outside-frame monitor area 22 ("NO" in step S116), the image processing CPU 151 executes detection process in the inside-frame monitor area 23 of the output target area 21 to determine whether the subject 30 has returned to the inside-frame monitor area 23 (step S119). When it is determined that the subject 30 has been detected in the inside-frame monitor area 23 ("YES" in step S120), the image processing CPU 151 sets the searching flag 122 to "0" (step S121) and transitions the process to step S110 in FIG.
[0070] If it is determined that the subject 30 has not been detected in the in-frame monitor area 23 ("NO" in step S120), the image processing CPU 151 determines whether or not a predetermined tracking duration has elapsed (step S122). If it is determined that the tracking duration has not elapsed ("NO" in step S122), the image processing CPU 151 shifts the process to step S110 in FIG. 9. If it is determined that the tracking duration has elapsed ("YES" in step S122), the image processing CPU 151 determines that the subject 30 will not move to the out-frame monitor area 22 or return to the output target area 21 (i.e., determines that the subject 30 has been lost), and stops tracking the subject 30. Furthermore, the image processing CPU 151 sets the detection target flag 121 and the searching flag 122 to "0" (step S123). Thereafter, the image processing CPU 151 shifts the process to step S102 in FIG. 9, and resets the output target area 21, the outside-frame monitor area 22, and the inside-frame monitor area 23 to their initial positions. In step S111 of FIG. 9, if it is determined that there is no next frame image ("NO" in step S111), the image processing CPU 151 ends the subject tracking process.
[0071] <Effects> As described above, the electronic device 1 as an image processing device in this embodiment is equipped with an image processing CPU 151 as a processing unit, and the image processing CPU 151 sets an output target area 21 smaller than the frame image area 20 in the center of the frame image area 20 relating to a plurality of frame images as the range in which image data is output, and sets an outside-frame monitor area 22, which is the target for detecting the subject 30, in a position outside the frame of the output target area 21 in the frame image area 20, offset in a predetermined direction from the center. Thereby, by executing a detection process for detecting subject 30 in outer-frame monitor area 22 of frame image area 20, it is possible to detect subject 30 that has gone outside output target area 21. Therefore, compared to a configuration in which subject 30 is detected by targeting the entire frame image area 20, the processing load on image processing CPU 151 can be reduced, and subject 30 can be detected in a shorter time. In addition, the amount of image data to be read can be reduced by setting the output target area 21, which is a part of the frame image area 20, as the output target of the image data. Therefore, it is possible to shorten the read time of the image data and achieve a high frame rate, or to lower the transfer rate (read speed) of the image data while maintaining the read time. In addition, since the subject 30 to be tracked can be detected using multiple frame images captured by a single imaging unit 14, it is possible to detect the subject 30 to be tracked while avoiding an increase in the size of the device or an increase in manufacturing costs.
[0072] Furthermore, the image processing CPU 151 acquires a frame image Im1 (first image) and a frame image Im2 (second image) generated after the frame image Im1, which are included in the multiple frame images, and executes a detection process for detecting the subject 30 within the output target area 21 and the outside-frame monitor area 22 for the frame images Im1 and Im2. When the detection process detects the subject 30 within the output target area 21 of the frame image Im1 and also detects the subject 30 within a certain outside-frame monitor area 22 of the frame image Im2, the image processing CPU 151 resets the output target area 21 in the frame image Im2 to a position that includes at least a part of the certain outside-frame monitor area 22 at its edge. This allows the output target area 21 to be reset so that the subject 30 falls within the output target area 21 when the tracking target subject 30 is detected in the frame image Im2. Therefore, even if the user does not adjust the shooting direction of the electronic device 1, the tracking target subject 30 can be automatically captured in the video being recorded or in the preview image being displayed on the display unit 16. For example, even if the subject 30 moves suddenly or the user unintentionally changes the direction of the electronic device 1, and the subject 30 goes outside the output target area 21, the user can continue shooting by keeping the subject 30 within the angle of view without performing any special operation.
[0073] Furthermore, the image processing CPU 151 sets an in-frame monitor area 23 at an end of the frame of the output target area 21, and when the image processing CPU 151 detects the subject 30 in a certain in-frame monitor area 23 of the frame image Im1 by the detection process and detects the subject 30 in a certain outside-frame monitor area 22 of the frame image Im2, it resets the output target area 21 in the frame image Im2 to a position that includes at least a part of the certain outside-frame monitor area 22 at its end. This makes it possible to determine whether the subject 30 has gone outside the output target area 21 by executing the detection process for detecting the subject 30 in the in-frame monitor area 23, which is part of the output target area 21. This makes it possible to reduce the processing load on the image processing CPU 151 for this determination, and also to shorten the processing time.
[0074] Furthermore, the image processing CPU 151 sets an in-frame monitor area 23 at an end of the frame of the output target area 21, and when the detection process detects the subject 30 in a certain in-frame monitor area 23 in the frame image Im1 and detects the subject 30 in a certain outside-frame monitor area 22 in the frame image Im2, it resets the output target area 21 in the frame image Im2 and determines the position of the output target area 21 after resetting so that the position of the subject 30 in the certain in-frame monitor area 23 in the output target area 21 before resetting in the frame image Im1 coincides with the position of the subject 30 in the certain in-frame monitor area 23 in the output target area 21 after resetting in the frame image Im2. This makes it possible to prevent the position of the subject 30 in the output target area 21 from changing before and after the subject 30 goes outside the output target area 21. Therefore, it is possible to fit the subject 30 to be tracked into the output target area 21 while suppressing visual discomfort caused by resetting the output target area 21.
[0075] Furthermore, when the certain outside-frame monitor area 22 is in contact with the outer edge of the frame image area 20, the image processing CPU 151 resets the output target area 21 to a position in contact with the outer edge of the frame image area 20. By configuring the output target area 21 to be able to move to a position in contact with the outer edge of the frame image area 20 in this manner, it is possible to track the subject 30 using the entire frame image area 20 and fit it within the output target area 21.
[0076] Furthermore, when resetting the output target area 21, the image processing CPU 151 resets the outside-frame monitor area 22 so that the positional relationship between the output target area 21 and the outside-frame monitor area 22 after the resetting of the output target area 21 is the same as the positional relationship between the output target area 21 and the outside-frame monitor area 22 before the resetting of the output target area 21. As a result, even if the subject 30 again moves outside the output target area 21 after the output target area 21 is reset, the tracking target subject 30 can be detected by performing detection processing in the outside-frame monitor area 22.
[0077] Furthermore, if the image processing CPU 151 cannot reset the outside-frame monitor area 22 so that the positional relationship between the output target area 21 and the outside-frame monitor area 22 after the resetting of the output target area 21 is the same as the positional relationship between the output target area 21 and the outside-frame monitor area 22 before the resetting of the output target area 21, the image processing CPU 151 resets the outside-frame monitor area 22 to a position that contacts the outer edge of the frame image area 20. This makes it possible to appropriately set the outside-frame monitor area 22 and detect the subject 30 to be tracked, even if the subject 30 moves near the outer edge of the frame image area 20.
[0078] Moreover, the output target area 21 is rectangular, and the image processing CPU 151 sets one outside-frame monitor area 22 for each of the four sides of the output target area 21. As a result, even if the subject 30 goes outside the output target area 21 from any of the four sides, the subject 30 can be detected by detection processing in any of the outside-frame monitor areas 22.
[0079] Furthermore, the image processing CPU 151 may set the outside-frame monitor area 22 at a position that contacts the outer edge of the frame image area 20. This makes it possible to detect the subject 30 to be tracked when the subject 30 moves near the outer edge of the frame image area 20. Furthermore, since the frequency of resetting the output target area 21, the outside-frame monitor area 22, and the inside-frame monitor area 23 associated with the detection of the subject 30 can be kept to a minimum, the processing load of the image processing CPU 151 can be effectively reduced.
[0080] Furthermore, in the above embodiment, the image processing CPU 151 sets the outside-frame monitor area 22 at a position that does not contact the outer periphery of the output target area 21. This makes it possible to make it take a certain amount of time or more until the subject 30 to be tracked moves outside the output target area 21 and is detected in the outside-frame monitor area 22. This makes it possible to reduce the frequency of resetting the output target area 21, the outside-frame monitor area 22, and the inside-frame monitor area 23 associated with detection of the subject 30 in the outside-frame monitor area 22, and to reduce the processing load on the image processing CPU 151.
[0081] Furthermore, the image processing CPU 151 may set the outside-frame monitor area 22 at a position that is in contact with the outer periphery of the output target area 21. This allows the subject 30 to be immediately detected in the outside-frame monitor area 22 that is in contact with the outer periphery of the output target area 21 when the subject 30 in the tracking process moves outside the output target area 21. This allows the output target area 21 to be reset before the subject 30 moves significantly out of the output target area 21, so that the subject 30 is contained within the output target area 21. This provides a visual effect that makes it appear as if the subject 30 to be tracked is being kept contained within the output target area 21. In other words, the subject 30 can be tracked more smoothly and accurately.
[0082] Furthermore, the image processing CPU 151 outputs the output image data 134 as image data relating to the portion of the multiple frame images within the output target area 21. This makes it possible to reduce the amount of image data to be read out. Therefore, it is possible to shorten the readout time of the image data and achieve a high frame rate, or to lower the transfer rate (readout speed) of the image data while maintaining the readout time.
[0083] Moreover, electronic device 1 includes imaging section 14 that captures a plurality of frame images, and image processing CPU 151 acquires the plurality of frame images captured by imaging section 14. This makes it possible to track subject 30 appearing in the plurality of frame images captured by imaging section 14 in real time.
[0084] Moreover, the image processing method executed by the image processing CPU 151 (computer) of the electronic device 1 (image processing device) according to this embodiment sets an output target area 21 smaller than the frame image area 20 as a range in which image data is output in the center of the frame image area 20 related to a plurality of frame images, and sets an outside-frame monitor area 22 for detecting the subject 30 in a position offset in a predetermined direction from the center inside the frame of the output target area 21 in the frame image area 20. Thereby, by executing a detection process for detecting the subject 30 in the outside-frame monitor area 22 of the frame image area 20, it is possible to detect the subject 30 that has gone outside the output target area 21. Therefore, it is possible to reduce the processing load of the image processing CPU 151, and also possible to detect the subject 30 in a shorter time. In addition, by setting the output target area 21 of a part of the frame image area 20 as the output target of the image data, it is possible to reduce the amount of image data to be read. In addition, since the subject 30 to be tracked can be detected using a plurality of frame images captured by one imaging unit 14, it is possible to detect the subject 30 to be tracked while avoiding an increase in size of the device and an increase in manufacturing costs.
[0085] Moreover, the image processing program 132 (program) according to this embodiment causes the image processing CPU 151 (computer) of the electronic device 1 (image processing device) to execute a process of setting an output target area 21 smaller than the frame image area 20 as a range in which image data is output in the center of the frame image area 20 related to a plurality of frame images, and a process of setting an outside-frame monitor area 22 for detecting the subject 30 in a position offset in a predetermined direction from the center, within the outside of the frame of the output target area 21 in the frame image area 20. This allows the subject 30 that has gone outside the output target area 21 to be detected by executing a detection process for detecting the subject 30 in the outside-frame monitor area 22 of the frame image area 20. This reduces the processing load of the image processing CPU 151, and allows the subject 30 to be detected in a shorter time. Furthermore, by setting the output target area 21, which is a part of the frame image area 20, as the output target of the image data, the amount of image data to be read out can be reduced. In addition, since the subject 30 to be tracked can be detected using multiple frame images captured by a single imaging unit 14, it is possible to detect the subject 30 to be tracked while avoiding an increase in the size of the device or an increase in manufacturing costs.
[0086] <Other> The description of the above embodiment is merely an example of the image processing device, image processing method, and program according to the present invention, and the present invention is not limited to this. For example, in the above embodiment, the image processing CPU 151 of the image processing unit 15 is exemplified as the "one or more processing units", but this is not limited thereto. For example, the CPU 11 may execute part of the processing executed by the image processing CPU 151 in the above embodiment, in which case the image processing CPU 151 and the CPU 11 correspond to the "one or more processing units". Also, the CPU 11 may execute all of the processing executed by the image processing CPU 151 in the above embodiment, in which case the CPU 11 corresponds to the "one or more processing units".
[0087] Furthermore, the multiple frame images are not limited to those captured by the imaging unit 14. For example, the multiple frame images may be those included in existing video data. That is, the subject 30 tracking technology of the present invention may be applied when cutting out and downsizing image data corresponding to the output target area 21 from multiple frame images of existing video data. Therefore, the electronic device 1 as an image processing device does not need to include the imaging unit 14, and may acquire multiple frame images from outside and perform image processing.
[0088] In the above embodiment, "subject 30 going outside output target area 21" means "at least a part of subject 30 (for example, the front end of a bicycle included in subject 30) going outside output target area 21", but it may be "the entire subject 30 going outside output target area 21". In this case, in step S113 of Fig. 9, if the entire subject 30 goes outside in-frame monitor area 23, it should be judged as "YES".
[0089] Furthermore, the output target area 21 may be a shape other than a rectangle, for example, a polygon other than a rectangle, a circle, or an ellipse. In these cases, the subject 30 can be tracked in the same manner as in the above embodiment by setting the outside-frame monitor area 22 at a position offset in a predetermined direction from the center where the output target area 21 is set. The shape of the outside-frame monitor area 22 may be a shape corresponding to the shape of the outer periphery of the output target area 21. For example, when the outer periphery of the output target area 21 is a circle, at least a portion of the outer periphery of the outside-frame monitor area 22 that faces the output target area 21 may be an arc shape.
[0090] In the above description, an example has been disclosed in which the flash memory of the storage unit 13 is used as a computer-readable medium for the program according to the present invention, but the present invention is not limited to this example. As other computer-readable media, information recording media such as HDD (Hard Disk Drive), SSD (Solid State Drive), and CD-ROM can be applied. In addition, carrier waves are also applied to the present invention as a medium for providing data of the program according to the present invention via a communication line.
[0091] Furthermore, the detailed configuration and detailed operation of each component of the electronic device 1 (image processing device) in the above embodiment can of course be modified as appropriate without departing from the spirit of the present invention.
[0092] Although the embodiments of the present invention have been described, the scope of the present invention is not limited to the above-described embodiments, but includes the scope of the invention described in the claims and its equivalents. [Explanation of symbols]
[0093] 1 Electronic equipment (image processing equipment) 11 CPU 12 RAM 13 Storage section 14 Imaging unit 15 Image processing section 151 Image processing CPU (processing unit) 16 Display 17 Control section 18 Bus 20 Frame Image Area 21 Output target area 22, 22a~22d Outside monitor area 23 Inner frame monitor area 30 Subject 121 Detection target presence flag 122 Searching Flag 131 Control Program 132 Image processing program (program) 133 Captured image data 134 Output image data (image data) 135 Subject Data 136 Area setting data Im1~Im3 Frame images (1st image, 2nd image)
Claims
1. an output target area smaller than the frame image area is set in the center of the frame image area related to the plurality of frame images as a range in which image data is to be output; a frame-outside monitor area for detecting a subject is set at a position offset in a predetermined direction from the center of the frame image area, outside the frame of the output target area; A processing unit is provided, The processing unit includes: Acquiring a first image and a second image generated after the first image, the first image and the second image being included in the plurality of frame images; performing a detection process for detecting a subject within the output target area and the outside-frame monitor area for the first image and the second image; when a subject is detected in the output target area of the first image and in a certain outside-frame monitor area of the second image by the detection process, the output target area of the second image is reset to a position that includes at least a part of the certain outside-frame monitor area at an end thereof; Image processing device.
2. The processing unit: A monitor area is set at an end of the frame of the output target area, when the subject is detected in the inside-frame monitor area of the first image and the subject is detected in the outside-frame monitor area of the second image by the detection process, the output target area of the second image is reset to a position that includes at least a part of the outside-frame monitor area at an end thereof. The image processing device according to claim 1 .
3. The processing unit: A monitor area is set at an end of the frame of the output target area, When the subject is detected in a certain in-frame monitor area of the first image and the subject is detected in the certain outside-frame monitor area of the second image by the detection process, the output target area of the second image is reset; determining a position of the output target area after the resetting such that a position of the subject in the certain frame monitor area in the output target area before the resetting in the first image coincides with a position of the subject in the certain frame monitor area in the output target area after the resetting in the second image; The image processing device according to claim 1 .
4. When the certain outside-frame monitor area is in contact with an outer edge of the frame image area, the processing unit resets the output target area to a position in contact with the outer edge of the frame image area. The image processing device according to any one of claims 1 to 3.
5. When the processing unit resets the output target area, the processing unit resets the outside-frame monitor area so that a positional relationship between the output target area and the outside-frame monitor area after the resetting of the output target area is identical to a positional relationship between the output target area and the outside-frame monitor area before the resetting of the output target area. The image processing device according to any one of claims 1 to 3.
6. When the processing unit cannot reset the outside-frame monitor area so that the positional relationship between the output target area and the outside-frame monitor area after the resetting of the output target area is identical to the positional relationship between the output target area and the outside-frame monitor area before the resetting of the output target area, the processing unit resets the outside-frame monitor area to a position adjacent to the outer edge of the frame image area. The image processing device according to claim 5 .
7. The output target area is rectangular, the processing unit sets one outside-frame monitor area for each of the four sides of the output target area; The image processing device according to claim 1 .
8. The processing unit sets the outer-frame monitor area at a position adjacent to an outer edge of the frame image area. The image processing device according to claim 1 .
9. The processing unit sets the outside-frame monitor area at a position that does not contact an outer periphery of the output target area. The image processing device according to claim 1 .
10. The processing unit sets the outside-frame monitor area to a position that contacts the outer periphery of the output target area. The image processing device according to claim 1 .
11. The processing unit outputs image data relating to a portion of the plurality of frame images within the output target area. The image processing device according to claim 1 .
12. An imaging unit that captures the plurality of frame images, The processing unit acquires the plurality of frame images captured by the imaging unit. The image processing device according to claim 1 .
13. An image processing method executed by a computer of an image processing device, comprising: an output target area smaller than the frame image area is set in the center of the frame image area related to the plurality of frame images as a range in which image data is to be output; a frame-outside monitor area for detecting a subject is set at a position offset in a predetermined direction from the center of the frame image area, outside the frame of the output target area; Including the setting process, The setting process includes: Acquiring a first image and a second image generated after the first image, the first image and the second image being included in the plurality of frame images; performing a detection process for detecting a subject within the output target area and the outside-frame monitor area for the first image and the second image; when a subject is detected in the output target area of the first image and in a certain outside-frame monitor area of the second image by the detection process, the output target area of the second image is reset to a position that includes at least a part of the certain outside-frame monitor area at an end thereof; Image processing methods.
14. A computer of an image processing device, an output target area smaller than the frame image area is set in the center of the frame image area related to the plurality of frame images as a range in which image data is to be output; a frame-outside monitor area for detecting a subject is set at a position offset in a predetermined direction from the center of the frame image area, outside the frame of the output target area; Function as a setting tool, The setting means is Acquiring a first image and a second image generated after the first image, the first image and the second image being included in the plurality of frame images; performing a detection process for detecting a subject within the output target area and the outside-frame monitor area for the first image and the second image; when a subject is detected in the output target area of the first image and in a certain outside-frame monitor area of the second image by the detection process, the output target area of the second image is reset to a position that includes at least a part of the certain outside-frame monitor area at an end thereof; program.
Citation Information
Patent Citations
Imaging apparatus
JP2009147572A
Imaging device and imaging method
JP2011004151A
Imaging apparatus
JP2012029245A
Photographing apparatus and photographing method
JP2015111939A
Image processing device, electronic apparatus, image processing method, and program
JP2018097870A
