Imaging device, imaging method, and imaging program
The imaging device uses a fixed-point imaging unit and learning models to specify subject positions by associating image data with actual positions, addressing the lack of clear positioning methods in existing technologies and enhancing operational efficiency.
Patent Information
- Application Number
- JP2023075530
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-05-01
- Publication Date
- 2024-10-04
- Estimated Expiration
- 2039-02-12
AI Technical Summary
Existing imaging technologies fail to provide a method for accurately specifying the position of a subject based on image data, lacking clear guidance on how to determine the subject's position using the angle of view and installation angle of the imaging unit.
An imaging device with a fixed-point imaging unit that generates image data, stores position information associated with each pixel where a subject exists, and utilizes learning models to recognize and specify the subject's position using image position information, including power generation panels for operation in various locations.
Enables accurate specification of a subject's position by associating image data with actual positions, simplifying the imaging system configuration and reducing the need for repeated manual correlation, while operating efficiently without relying on conventional stereo camera systems.
Smart Images

Figure 0007561911000001 
Figure 0007561911000002 
Figure 0007561911000003
Abstract
Description
[Technical field]
[0001] The present invention relates to an imaging apparatus, an imaging method, and an imaging program. [Background technology]
[0002] Conventionally, there is a technology that recognizes a subject based on an image captured by an imaging unit and obtains the position of the subject, etc. Patent Document 1 describes a method of creating a difference image from two images captured by an imaging unit (a reference image serving as a standard and an image in which the subject appears), recognizing the subject from the difference image, and acquiring the position of the recognized subject based on the angle of view, installation angle, and installation position of the imaging unit. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2016-181786 A Summary of the Invention [Problem to be solved by the invention]
[0004] However, although Patent Document 1 describes acquiring the position of the subject based on the angle of view, installation angle, and installation position of the imaging unit, it does not describe how to specifically acquire the position of the subject based on the angle of view, installation angle, and installation position of the imaging unit. Furthermore, in the past, there were cases where a subject was imaged by an imaging unit, and the task of matching the position of the subject on an image based on image data generated by the imaging unit with the actual position of the subject was repeatedly performed, and then the position of a subject newly imaged by the imaging unit was identified based on the matching.
[0005] An object of the present invention is to provide an imaging apparatus, an imaging method, and an imaging program that provide a technique for identifying the position of a subject. [Means for solving the problem]
[0006] One embodiment of an imaging device includes a fixed-point imaging unit that images a subject and generates image data, a memory unit that, when a subject is present in image data captured by the fixed-point imaging unit, stores image position information in which position information indicating the actual position of the subject is associated with each pixel in the image data in which the subject is present, and an identification unit that, when a new subject is captured by the fixed-point imaging unit, identifies the position of the new subject based on the image data in which the new subject is present and the image position information.
[0007] An imaging device according to one aspect may include at least one of a power generation panel that receives light and generates electricity, and the fixed point imaging unit may be supplied with power from at least one of the power generation panel and the power source.
[0008] In one embodiment of the imaging device, the memory unit may further store a correspondence relationship that associates a subject with a feature of the subject, and may further include a recognition unit that extracts the feature of the subject from an image based on image data generated by the fixed-point imaging unit based on the correspondence relationship that is the result of learning the feature of the subject in advance, and recognizes the subject from the extracted feature.
[0009] The imaging device according to one aspect may include an acquisition unit that acquires image position information based on the height of a subject in image data captured by the fixed-point imaging unit and the angle of view of the fixed-point imaging unit.
[0010] In one aspect of the imaging device, the acquisition unit includes a first acquisition unit that acquires in advance the height of the subject, the angle of view of the fixed-point imaging unit, and the width of an image captured by the fixed-point imaging unit; a second acquisition unit that acquires the number of pixels constituting image data per meter based on the height of the subject acquired by the first acquisition unit when the subject moves; a third acquisition unit that acquires a relationship between a Y coordinate that is a depth direction coordinate of the image based on the image data and the number of pixels per meter of the subject acquired by the second acquisition unit; a fourth acquisition unit that acquires an actual image width at a predetermined position based on the width of the image acquired by the first acquisition unit and the number of pixels per meter acquired by the second acquisition unit; and a fourth acquisition unit that acquires an actual image width at a predetermined position based on the width of the image acquired by the first acquisition unit and the number of pixels per meter acquired by the second acquisition unit. and a fifth acquisition unit that acquires a first distance which is the distance to a center position of the fixed-point imaging unit and acquires a second distance which is the distance from the ground to the center position; a sixth acquisition unit that determines the angle between the ground and a center line in the imaging direction of the fixed-point imaging unit based on the first and second distances acquired by the fifth acquisition unit; a seventh acquisition unit that acquires the height from the ground to the fixed-point imaging unit based on the first and second distances acquired by the fifth acquisition unit and the angle acquired by the sixth acquisition unit; and an eighth acquisition unit that acquires the position from the imaging position where the fixed-point imaging unit is located to the subject based on the height from the ground to the fixed-point imaging unit acquired by the seventh acquisition unit and the angle acquired by the sixth acquisition unit, and further acquires image position information based on acquiring multiple positions of the subject.
[0011] In one embodiment of the imaging device, the acquisition unit may be provided with a ninth acquisition unit that acquires a width ratio relative to the Y coordinate based on the width of a reference position in the Y coordinate direction and the width of a predetermined position in the Y coordinate direction, among the widths of the actual image acquired by the fourth acquisition unit.
[0012] In one embodiment of the imaging method, a computer executes the following steps: a fixed-point imaging step of imaging a subject using a fixed-point imaging unit to generate image data; a storage step of storing, in a memory unit, position information indicating the actual position of the subject when the subject is present in the image data captured by the fixed-point imaging unit, image position information corresponding to each pixel in which the subject is present in the image data; and, when a new subject is captured by the fixed-point imaging unit, an identification step of identifying the position of the new subject based on the image data in which the new subject is present and the image position information.
[0013] One embodiment of the imaging program provides a computer with a fixed-point imaging function for imaging a subject using a fixed-point imaging unit to generate image data; a memory function for storing, in a memory unit, position information indicating the actual position of the subject when a subject is present in image data captured by the fixed-point imaging unit, image position information corresponding to each pixel in which the subject is present in the image data; and an identification function for, when a new subject is captured by the fixed-point imaging unit, identifying the position of the new subject based on the image data in which the new subject is present and the image position information. Effect of the Invention
[0014] One embodiment of the imaging device stores image position information in a memory unit in advance, and when an image of a subject is captured by a fixed-point imaging unit, the position of the subject is identified based on the image position information, thereby providing a method for identifying the position of the subject. Furthermore, the imaging method and imaging program according to one aspect can achieve the same effects as the imaging device according to the above aspect. [Brief description of the drawings]
[0015] [Figure 1] 1 is a block diagram illustrating an imaging device according to an embodiment. [Diagram 2] FIG. 13 is a diagram for explaining a case where image position information is acquired. [Diagram 3] 4A to 4C are diagrams for explaining an example of an image captured by a fixed-point imaging unit; [Figure 4]13 is a graph showing the relationship between the Y coordinate and the number of pixels. [Diagram 5] 11 is a graph for explaining an example of image position information. [Figure 6] 13 is a graph showing the relationship between the Y coordinate and the ratio of the image width. [Figure 7] 1 is a first flowchart illustrating an imaging method according to an embodiment. [Figure 8] 11 is a second flowchart illustrating an imaging method according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0016] Hereinafter, one embodiment of the present invention will be described. An imaging device according to an embodiment is configured to capture an image of a subject using a fixed-point imaging unit, and acquire the distance from the fixed-point imaging unit to the subject based on an image in which the subject is recorded. When the fixed-point imaging unit is placed at a predetermined position, the imaging device identifies the position of the person by having, for example, a person walk within the imaging range of the fixed-point imaging unit (acquires image position information). As a result, even when a new subject is captured by the fixed-point imaging unit, the imaging device identifies the position of the subject based on the image position information, i.e., acquires the distance from the fixed-point imaging unit to the subject within the image.
[0017] FIG. 1 is a block diagram illustrating an imaging device according to an embodiment.
[0018] The imaging device 1 includes a fixed-point imaging unit 11, a storage unit 12, an identification unit 13, a recognition unit 14, and an acquisition unit 15. The imaging device 1 also includes at least one of a power generation panel 16 and a power source 17.
[0019] The fixed-point imaging unit 11 captures an image of a subject and generates image data. That is, the fixed-point imaging unit 11 generates a moving image or a still image continuously at a predetermined time interval. The fixed-point imaging unit 11 is disposed at a predetermined location and captures an image in a predetermined direction. The fixed-point imaging unit 11 is installed on a pole or the like fixed to the ground, or on a movable tripod or the like. When the fixed-point imaging unit 11 is installed on a movable tripod or the like, it can be moved together with the tripod. This allows the fixed-point imaging unit to be easily placed in a location desired by the user, and to be placed in the desired location only for the period required by the user. If there is distortion or the like in the image captured by the fixed-point imaging unit 11, this will affect the positional accuracy when acquiring the position of the subject. For this reason, it is preferable that the fixed-point imaging unit 11 uses an imaging lens or the like that can obtain an image with relatively little distortion.
[0020] The fixed point imaging unit 11 is powered by at least one of a power generation panel 16 and a power source 17, for example. The power generation panel 16 receives light and generates power. The power generation panel 16 may be a device that utilizes energy harvesting technology, that is, a device that harvests energy from the surrounding environment and converts it into power. As a specific example, the power generation panel 16 may be a solar panel. The power generated by the power generation panel 16 may be stored in a battery or the like and supplied to the fixed point imaging unit 11 from the battery. Power source 17 is, for example, a primary battery, a secondary battery, a commercial power source, etc. When a primary battery or a secondary battery is used as power source 17, the primary battery or the secondary battery is arranged in imaging device 1 so as to be replaceable. When a secondary battery is used as power source 17, the secondary battery may be arranged in imaging device 1 so as to be rechargeable. In addition, the power generation panel 16 or the power source 17 may supply power to the storage unit 12, the identification unit 13, the recognition unit 14, and the acquisition unit 15 in addition to the fixed point imaging unit 11.
[0021] The storage unit 12 stores a correspondence relationship (learning model) that associates a subject with the characteristics of the subject. The correspondence relationship is used when the recognition unit 14 recognizes the subject. The correspondence relationship is generated by performing deep learning, for example. That is, the correspondence relationship is generated by learning the characteristics of the subject based on performing deep learning, and associating the subject with the characteristics of the subject. The subject used when generating the correspondence relationship is not a subject that is constantly photographed by the fixed-point imaging unit (a "new subject" to be described later), but a subject that is used only when generating the correspondence relationship (learning model). The correspondence relationship is generated by the recognition unit 14, for example, and stored in the storage unit 12. Alternatively, the correspondence relationship may be generated by another device (not shown). The correspondence relationship generated by another device may be downloaded (stored) in the storage unit 12 via a recording medium such as an external memory or a communication network.
[0022] Furthermore, when a subject exists in the image data captured by the fixed point imaging unit 11, the storage unit 12 stores image position information in which position information indicating the actual position of the subject is associated with each pixel in the image data in which the subject exists. A method for generating the image position information will be described later.
[0023] When a subject is recorded in the image data generated by the fixed-point imaging unit 11, the recognition unit 14 recognizes the subject based on the correspondence relationship (learning model) stored in the storage unit 12. That is, the recognition unit 14 learns the characteristics of the subject in advance and stores the correspondence relationship (learning model) in the storage unit 12. The recognition unit 14 extracts the characteristics of the subject from an image based on the image data generated by the fixed-point imaging unit 11 based on the correspondence relationship (learning model), and recognizes the subject from the extracted characteristics. The recognition unit 14 learns the features of the subject in advance by using, for example, deep learning. The recognition unit 14 stores in the storage unit 12 a relationship (correspondence) that associates the features of the subject as a result of the learning with the subject corresponding to the features. In this case, the recognition unit 14 may learn the features of the subject in advance based on the subject included in the image data generated by the fixed-point imaging unit 11. Furthermore, the recognition unit 14 may recognize the subject by, for example, performing pattern matching, instead of using deep learning.
[0024] The acquisition unit 15 acquires image position information in the image data based on the height of the subject recorded in the image data generated by the fixed point imaging unit 11 and the angle of view of the fixed point imaging unit 11. That is, the acquisition unit 15 acquires information on the position in the image (image position information) based on the image captured by the fixed point imaging unit 11. In detail, when the above-mentioned recognition unit 14 recognizes a subject based on the image data captured by the fixed point imaging unit 11, the acquisition unit 15 acquires position information (image position information (information related to the distance from the fixed point imaging unit 11 to the subject)) in the image captured by the fixed point imaging unit 11 based on the height of the subject and the angle of view of the fixed point imaging unit 11.
[0025] FIG. 2 is a diagram for explaining the case where image position information is acquired. FIG. 3 is a diagram for explaining an example of an image captured by the fixed-point imaging unit. Fig. 4 is a graph showing the relationship between the Y coordinate and the number of pixels. The horizontal axis of Fig. 4 shows the Y coordinate, and the vertical axis shows the number of pixels per meter. Here, the depth direction in the image captured by the fixed-point imaging unit is the Y coordinate, and the width direction of the image is the X coordinate. Fig. 5 is a graph for explaining an example of image position information, in which the horizontal axis indicates the Y coordinate, and the vertical axis indicates the distance from the position on the ground where the fixed-point imaging unit is disposed to an arbitrary Y coordinate position. Fig. 6 is a graph showing the relationship between the Y coordinate and the ratio of the image width. The horizontal axis of Fig. 6 shows the Y coordinate, and the vertical axis shows the ratio of the image width.
[0026] Here, in FIG. 2, the Y-axis direction (Y-coordinate direction) is the depth direction. In FIG. 2, when the subject 110 at a predetermined position in the Y-axis direction (Y-coordinate direction) is imaged by the fixed-point imaging unit 11, the image at the predetermined position is indicated by the symbol 100a. The width (size in the X-axis direction) of the image 100a is indicated by the symbol w. If the center position of the image 100a is indicated by the symbol Pc, the distance from the fixed-point imaging unit 11 to the center position Pc is indicated by the first distance L1, and the distance from the center position Pc to the ground is indicated by the second distance L2. In addition, the angle between the ground and a straight line from the fixed-point imaging unit 11 along the Y-axis direction to a position corresponding to the ground in the image 100a is indicated by the symbol θ. Furthermore, the height of the fixed-point imaging unit 11 from the ground is indicated by H, the ground position at the position where the fixed-point imaging unit 11 is disposed is indicated by P0, and the distance from the ground position P0 along the Y-axis direction to the image 100a is indicated by the third distance L3. The acquisition unit 15 acquires the third distance L3, and associates a position in the image captured by the fixed point imaging unit 11 with the third distance L3, thereby acquiring image position information.
[0027] Specifically, as shown in FIG. 1, the acquisition unit 15 includes a first acquisition unit 151, a second acquisition unit 152, a third acquisition unit 153, a fourth acquisition unit 154, a fifth acquisition unit 155, a sixth acquisition unit 156, a seventh acquisition unit 157, an eighth acquisition unit 158 and a ninth acquisition unit 159.
[0028] The first acquisition section 151 acquires the height of the subject, the angle of view of the fixed-point imaging section 11, and the width of the image captured by the fixed-point imaging section 11 in advance. In order to acquire image position information, first, subject 110 is moved within the imaging range of fixed-point imaging unit 11. Subject 110 is, for example, a person. When subject 110 is a person, for example, the height of the person (height of the subject) is input using an input device (not shown). First acquisition unit 151 acquires the input height of the person. Furthermore, the first acquisition unit 151 acquires the angle of view θ2 captured by the fixed-point imaging unit 11. The angle of view θ2 is input, for example, using an input device (not shown). The first acquisition unit 151 acquires the input angle of view θ2. The angle of view θ2 is determined by the planar size of an imaging element (not shown) of the fixed-point imaging unit 11, the focal length of an imaging lens (not shown) of the fixed-point imaging unit 11, and the like. Moreover, the first acquisition unit 151 acquires the width (for example, the number of pixels) of the image obtained by the fixed point imaging unit 11. The width of the image (image width) is input using, for example, an input device (not shown).
[0029] The second acquisition unit 152 acquires the number of pixels constituting the image data per 1 meter based on the height of the subject acquired by the first acquisition unit 151. The second acquisition unit 152 acquires the number of pixels per meter in the image captured by the fixed-point imaging unit 11 at any position in the image by having the subject (person) 110 walk within the imaging range. That is, the second acquisition unit 152 acquires the size (length) of 1 meter in the image 100a based on the height of the person acquired by the first acquisition unit 151, and further acquires the number of pixels of the image per acquired size of 1 meter. 3, the size of the image sensor used in the fixed point imaging unit 11 (the image obtained by the fixed point imaging unit 11) is 1280 pixels x 960 pixels. When the subject 110 (not shown in FIG. 3) is recorded in the image shown in FIG. 3, the second acquisition unit 152 acquires the number of pixels per meter based on the height of the subject 110 and the number of pixels of the image sensor (image).
[0030] The third acquisition unit 153 acquires the relationship between the Y coordinate, which is the coordinate in the depth direction of the image based on the image data, and the number of pixels per meter of the subject acquired by the second acquisition unit 152. In the example shown in Figure 3, the vertical direction of the image corresponds to the depth direction in real space, and the vertical coordinate of the image is the Y coordinate. Also, in the example shown in Figure 3, the horizontal direction of the image corresponds to the width direction in real space, and the horizontal coordinate of the image is the X coordinate. And if the top left pixel in Figure 3 is the origin coordinate (0,0), then the coordinate of the top right pixel is (1280,0). The coordinate of the pixel at the center of Figure 3 is (640,480). The coordinate of the bottom left pixel in Figure 3 is (0,960), and the coordinate of the bottom right pixel is (1280,960).
[0031] For example, by having a subject (person) walk vertically and horizontally within the imaging range of the fixed-point imaging unit 11 (the range surrounded by coordinates (0,0), coordinates (1280,0), coordinates (1280,960), and coordinates (0,960)), the third acquisition unit 153 acquires the number of pixels per meter at multiple Y coordinate positions.
[0032] As shown in an example in Fig. 4, the relationship between the Y coordinate acquired by the third acquisition unit 153 and the number of pixels per meter is linear. Here, as shown in Fig. 2, the numerical value of the Y coordinate increases as the subject approaches the fixed point imaging unit 11. That is, as the Y coordinate increases (as the subject approaches the fixed point imaging unit 11), the number of pixels per meter increases. In other words, as the Y coordinate decreases (as the subject moves away from the fixed point imaging unit 11), the number of pixels per meter decreases.
[0033] The fourth acquisition unit 154 acquires the actual width w of the image 100a in which the subject 110 is detected at a specified position based on the width of the image acquired by the first acquisition unit 151 and the number of pixels per meter acquired by the second acquisition unit 152. Consider image 100a at the Y coordinate position (a predetermined position in the Y coordinate direction) where subject 110 is located, as exemplified in Fig. 2. Since the number of pixels in the width direction of the image captured by fixed-point imaging unit 11 (1280 pixels in the example illustrated in Fig. 3) is acquired by first acquisition unit 151, fourth acquisition unit 154 acquires the actual length of width w of image 100a at the predetermined position of the Y coordinate based on the number of pixels per meter.
[0034] The fifth acquisition unit 155 acquires a first distance, which is the distance from the fixed-point imaging unit 11 to the center position Pc in the image 100a, based on the width w of the actual image acquired by the fourth acquisition unit 154 and the angle of view θ2 acquired by the first acquisition unit 151, and acquires a second distance, which is the distance from the ground to the center position Pc. The fifth acquisition unit 155 acquires an actual distance (first distance L1) from the fixed-point imaging unit 11 to the center position Pc of the image 100a based on the actual length of the width w of the image 100a at the predetermined position of the Y coordinate and the angle of view θ2 of the fixed-point imaging unit 11. The fifth acquisition unit 155 also acquires an actual distance (second distance L2) from the center position Pc of the image 100a to the ground based on the number of pixels of the image, the number of pixels per meter, the actual length of the width w of the image 100a at the predetermined position of the Y coordinate, and the angle of view of the fixed-point imaging unit 11.
[0035] The sixth acquisition unit 156 obtains an angle θ between the ground and the center line in the imaging direction of the fixed point imaging unit 11, based on the first distance L1 and the second distance L2 obtained by the fifth acquisition unit 155. That is, the sixth acquisition unit 156 obtains the angle θ between the ground and the fixed point imaging unit 11, based on the first distance L1 and the second distance L2 obtained by the fifth acquisition unit 155, by using a trigonometric function.
[0036] The seventh acquisition unit 157 acquires the height H from the ground to the fixed point imaging unit 11 based on the first distance L1 and the second distance L2 acquired by the fifth acquisition unit 155 and the angle θ acquired by the sixth acquisition unit 156. That is, the seventh acquisition unit 157 acquires the height H from the ground to the fixed point imaging unit 11 based on the first distance L1, the second distance L2, and the angle θ by using a trigonometric function.
[0037] The eighth acquisition unit 158 acquires the position from the imaging position where the fixed-point imaging unit 11 is located to the subject based on the height H from the ground to the fixed-point imaging unit 11 acquired by the seventh acquisition unit 157 and the angle θ acquired by the sixth acquisition unit 156, and further acquires image position information based on acquiring multiple positions of the subject. That is, the eighth acquisition unit 158 acquires a distance L3 from the ground position P0 where the fixed-point imaging unit 11 is disposed to a predetermined position of the Y coordinate (image 100a) based on the height H from the ground to the fixed-point imaging unit 11 and the angle θ between the fixed-point imaging unit 11 and the ground. The eighth acquisition unit 158 acquires information about the position in the image (image position information) by associating the distance L3 with the Y coordinate at the predetermined position in the image. In addition, the eighth acquisition unit 158 acquires image position information based on acquiring the distance from the ground position P0 where the fixed-point imaging unit 11 is disposed to the subject (person) 110 at any position within the imaging range by moving the subject 110 within the imaging range of the fixed-point imaging unit 11. The eighth acquisition unit 158 stores the image position information in the storage unit 12.
[0038] The image position information is information indicating the distance in meters from the fixed-point imaging unit 11 to the position (coordinates) of any pixel in an image captured by the fixed-point imaging unit 11. As a specific example, the image position information is information indicating that the pixel coordinates (640,480) shown in FIG. 3 are 10 m away from the fixed-point imaging unit 11, the pixel coordinates (640,720) are 15 m away from the fixed-point imaging unit 11, and the pixel coordinates (640,840) are 20 m away from the fixed-point imaging unit 11.
[0039] 5, the image position information is information indicating that the distance from ground position P0 where the fixed-point imaging unit 11 is disposed becomes closer as the Y coordinate increases. In other words, the image position information is information indicating that the distance from ground position P0 where the fixed-point imaging unit 11 is disposed becomes farther as the Y coordinate decreases.
[0040] Here, the ninth acquisition unit 159 acquires a width ratio relative to the Y coordinate based on the width at a reference position in the Y coordinate direction and the width at a specified position in the Y coordinate direction, among the actual widths w of each of the multiple images acquired by the fourth acquisition unit 154. That is, the fourth acquisition unit 154 acquires the actual image width w. At a position where the subject 110 is not present (Y coordinate corresponding to a position where no person is walking), the fourth acquisition unit 154 cannot acquire the actual image width w. For this reason, when the fourth acquisition unit 154 acquires the image width w at multiple positions of the Y coordinate, the ninth acquisition unit 159 calculates the image width at an arbitrary position of the Y coordinate based on the image width w at the multiple positions. For example, the ninth acquisition unit 159 sets one of the multiple image widths acquired by the fourth acquisition unit 154 as the image width at the reference position of the Y coordinate (reference width), and obtains the ratio (width ratio) of the width of the other image excluding the reference width among the multiple image widths to the reference width. The ninth acquisition unit 159 obtains the ratio (width ratio) to the reference width based on each of the multiple images acquired by the fourth acquisition unit 154. This width ratio is shown in a graph in FIG. 6.
[0041] 6, as the Y coordinate increases (as the distance from the fixed-point imaging unit 11 decreases), the image width ratio decreases. In other words, as the Y coordinate decreases (as the distance from the fixed-point imaging unit 11 increases), the image width ratio increases.
[0042] The above-mentioned fifth acquisition unit 155 can acquire the width of the image at any Y coordinate by utilizing the width ratio of the image acquired by the ninth acquisition unit 159, even at a position where the image width w has not been acquired by the fourth acquisition unit 154, and can therefore acquire the first distance L1 and the second distance L2. This completes the acquisition of image position information.
[0043] Next, in measuring the position of the subject after acquiring the image position information, when a new subject is imaged by the fixed-point imaging unit 11, the identification unit 13 identifies the position of the new subject based on the image data in which the new subject exists and the image position information. That is, when a new subject is imaged by the fixed-point imaging unit 11, the identification unit 13 identifies the position of the new subject based on the position (Y coordinate) of the subject in the image and the image position information. In identifying the position of the new subject, the identification unit 13 identifies the distance from the ground position where the fixed-point imaging unit 11 is disposed to the new subject. More specifically, when a new subject is recorded in an image captured by the fixed-point imaging unit 11, the identifying unit 13 acquires the position (pixel position (coordinates)) of the subject in the image. The identifying unit 13 compares the acquired pixel position of the new subject with image position information to identify the distance from the fixed-point imaging unit 11 to the new subject.
[0044] Each unit of the imaging device 1 may be realized as a function of a processing device arranged in a computer. That is, the function may be realized by a program being executed by the computer. The program may be recorded in a recording medium such as an external memory or an optical disk.
[0045] Next, an imaging method according to an embodiment will be described.
[0046] First, a method for acquiring image position information will be described. FIG. 7 is a first flowchart illustrating an imaging method according to an embodiment.
[0047] In step ST11, the fixed-point imaging unit 11 captures an image of a subject.
[0048] In step ST12, the recognition unit 14 extracts features of the subject imaged in step ST11 based on the results of prior learning, and recognizes the subject based on the results of the extraction.
[0049] In step ST13, the acquisition unit 15 acquires image position information based on the subject imaged in step ST11, that is, the height of the subject recognized in step ST12 and the angle of view of the fixed-point imaging unit 11. That is, the acquisition unit 15 performs the following processes using the first to ninth acquisition units 151 to 159. The first acquisition section 151 acquires the height of the subject, the angle of view of the fixed-point imaging section 11, and the width of the image captured by the fixed-point imaging section 11 in advance. When the subject moves, second acquisition section 152 acquires the number of pixels per meter based on the height of the subject acquired by first acquisition section 151. The third acquisition unit 153 acquires the relationship between the Y coordinate, which is the coordinate in the depth direction of the image, and the number of pixels per 1 m of the subject acquired by the second acquisition unit 152. The fourth acquisition unit 154 acquires the actual image width w at a predetermined position based on the width of the image acquired by the first acquisition unit 151 and the number of pixels per meter acquired by the second acquisition unit 152. The fifth acquisition unit 155 acquires a first distance L1, which is the distance from the fixed-point imaging unit 11 to the center position Pc in the image, and a second distance L2, which is the distance from the ground to the center position Pc, based on the width w of the actual image acquired by the fourth acquisition unit 154 and the angle of view θ2 acquired by the first acquisition unit 151. The sixth acquisition unit 156 obtains an angle θ between the ground and the center line (a line along the Y-axis direction) in the imaging direction of the fixed point imaging unit 11, based on the first distance L1 and the second distance L2 acquired by the fifth acquisition unit 155. The seventh acquisition unit 157 acquires the height H from the ground to the fixed point imaging unit 11 based on the first distance L1 and the second distance L2 acquired by the fifth acquisition unit 155 and the angle θ acquired by the sixth acquisition unit 156. The eighth acquisition unit 158 acquires the position from the imaging position where the fixed-point imaging unit 11 is located to the subject based on the height H from the ground to the fixed-point imaging unit 11 acquired by the seventh acquisition unit 157 and the angle θ acquired by the sixth acquisition unit 156, and acquires image position information. Here, the ninth acquisition unit 159 may acquire a width ratio relative to the Y coordinate based on the width of a reference position in the Y coordinate direction and the width of a specified position in the Y coordinate direction among the widths of the image acquired by the fourth acquisition unit 154.
[0050] In step ST14, the acquisition unit 15 stores in the storage unit 12 the image position information acquired in step ST13.
[0051] Next, a method for measuring the distance to a subject using the fixed-point imaging unit 11 will be described. FIG. 8 is a second flowchart illustrating the imaging method according to an embodiment.
[0052] In step ST21, the fixed-point imaging unit 11 captures an image of a subject.
[0053] In step ST22, the recognition unit 14 extracts features of the subject imaged in step ST21 based on the results of prior learning, and recognizes the subject based on the results of the extraction.
[0054] In step ST23, the identification unit 13 identifies the position of the subject imaged in step ST21, i.e., when the subject is recognized in step ST22. That is, the identification unit 13 acquires the distance from the position on the ground where the fixed-point imaging unit 11 is disposed to the subject, based on the Y coordinate in the image of the subject recognized by the recognition unit 14 and the image position information stored in the storage unit 12.
[0055] According to this embodiment, the following effects are obtained. The imaging device 1 includes a fixed-point imaging unit 11 that images a subject and generates image data, a memory unit 12 that stores image position information, and an identification unit 13 that identifies the position of the subject based on the image data generated by the fixed-point imaging unit 11 and the image position information stored in the memory unit 12. This allows the imaging device 1 to obtain the position of the subject (the distance to the subject). Furthermore, the imaging device 1 acquires the distance to the subject based on the image position information stored in the storage unit 12. Therefore, the imaging device 1 of this embodiment can acquire the distance to the subject by a method different from the conventional method of acquiring the distance to the subject by using parallax with a stereo camera. Since the imaging device 1 of this embodiment can be realized with one imaging system (imaging lens and imaging element), the configuration of the fixed-point imaging unit 11 can be simplified compared to the case where a conventional stereo camera (two imaging systems) is used. Furthermore, the imaging device 1 acquires image position information by computer processing, and acquires the distance to the subject based on the image position information. Therefore, unlike the conventional method, the imaging device 1 of this embodiment does not require repeated work to associate the position of the subject in the image with the actual distance to the subject, which can save the worker's time and effort, and can acquire the distance to the subject by a method different from the conventional method.
[0056] In the imaging device 1, the fixed point imaging section 11 may be powered by at least one of the power generation panel 16 and the power source 17. The fixed-point imaging unit 11 is powered by the power generation panel 16, so that the imaging device 1 can operate even in a place where a commercial power source is not provided. Also, the fixed-point imaging unit 11 is powered by the power source 17, so that the imaging device 1 can obtain a stable power supply.
[0057] The imaging device 1 may be equipped with a recognition unit 14 that learns the characteristics of the subject in advance, extracts the characteristics of the subject from an image based on image data generated by the fixed-point imaging unit 11 based on the results of the learning, and recognizes the subject from the extracted characteristics. As an example, the imaging device 1 recognizes the subject by using deep learning or the like, so that as long as the correspondence is stored in the memory unit 12, the subject can be recognized even when a relatively low-performance CPU (Central Processing Unit) is used. When the imaging device 1 uses a CPU with relatively low performance, the price of the imaging device 1 can be made relatively cheap. Naturally, the imaging device 1 may use a CPU with relatively medium or high performance. An example of a CPU with relatively low to medium performance is a VPU (Visual Processing Unit) or the like. An example of a CPU with relatively medium performance is an FPGA (Field Programmable Gate Array) or the like. An example of a CPU with relatively medium to high performance is a GPU (Graphics Processing Unit) or the like.
[0058] The imaging device 1 may include an acquisition section 15 that acquires image position information based on the height of the subject in the image data captured by the fixed-point imaging section 11 and the angle of view of the fixed-point imaging section 11. The imaging device 1 can obtain image position information by calculation by inputting the height of the subject and the angle of view of the fixed-point imaging unit 11.
[0059] In the imaging device 1, the acquisition unit 15 includes a first acquisition unit 151 that acquires in advance the height of the subject, the angle of view of the fixed-point imaging unit 11, and the width of the image captured by the fixed-point imaging unit 11, a second acquisition unit 152 that acquires the number of pixels per meter based on the height of the subject acquired by the first acquisition unit 151, a third acquisition unit 153 that acquires the relationship between a Y coordinate that is the coordinate in the depth direction of the image and the number of pixels per meter of the subject acquired by the second acquisition unit 152, a fourth acquisition unit 154 that acquires the width of an actual image at a predetermined position based on the width of the image acquired by the first acquisition unit 151 and the number of pixels per meter acquired by the second acquisition unit 152, and an image captured by the fixed-point imaging unit 11 based on the width of the actual image acquired by the fourth acquisition unit 154 and the angle of view acquired by the first acquisition unit 151. The image capturing apparatus may include a fifth acquisition unit 155 that acquires a first distance, which is the distance to a central position in the image, and a second distance, which is the distance from the ground to the central position; a sixth acquisition unit 156 that determines the angle θ between the ground and a center line in the imaging direction of the fixed point imaging unit 11 based on the first distance and the second distance acquired by the fifth acquisition unit 155; a seventh acquisition unit 157 that acquires the height from the ground to the fixed point imaging unit 11 based on the first distance acquired by the fifth acquisition unit 155 and the angle θ acquired by the sixth acquisition unit 156; and an eighth acquisition unit 158 that acquires the position from the imaging position where the fixed point imaging unit 11 is located to the subject based on the height from the ground to the fixed point imaging unit 11 acquired by the seventh acquisition unit 157 and the angle acquired by the sixth acquisition unit 156, and acquires image position information. The imaging device 1 can acquire image position information based on the height of the subject and the angle of view of the fixed-point imaging section 11 by the first to eighth acquisition sections 151 to 158 each performing a process.
[0060] In the imaging device 1, the acquisition unit 15 may be provided with a ninth acquisition unit 159 that acquires a width ratio relative to the Y coordinate based on the width of a reference position in the Y coordinate direction and the width at a predetermined position in the Y coordinate direction, among the widths of the actual image acquired by the fourth acquisition unit 154. The imaging device 1 can obtain the width of the image even at a Y coordinate position where a subject (for example, a person) is not walking, by the ninth obtaining unit 159 obtaining the width ratio. This allows the imaging device 1 to obtain the distance to the subject at any Y coordinate position.
[0061] In the imaging method, a computer executes a fixed-point imaging step of imaging a subject using a fixed-point imaging unit 11 to generate image data, a storage step of storing in a memory unit 12, when a subject is present in the image data captured by the fixed-point imaging unit 11, position information indicating the actual position of the subject and image position information corresponding to each pixel in the image data in which the subject is present, and an identification step of identifying the position of the new subject based on the image data in which the new subject is present and the image position information, when a new subject is captured by the fixed-point imaging unit 11. This makes it possible for the imaging method to obtain the position of the subject (the distance to the subject). Moreover, the imaging method acquires the distance to the subject based on image position information stored in the storage unit 12. Therefore, the imaging device 1 of the present embodiment can acquire the distance to the subject by a method different from the conventional method.
[0062] The imaging program enables the computer to realize a fixed-point imaging function of imaging a subject using the fixed-point imaging unit 11 to generate image data, a memory function of storing in the memory unit 12, when a subject is present in the image data captured by the fixed-point imaging unit 11, position information indicating the actual position of the subject, and image position information corresponding to each pixel in which the subject is present in the image data, and an identification function of, when a new subject is captured by the fixed-point imaging unit 11, identifying the position of the new subject based on the image data in which the new subject is present and the image position information. This allows the imaging program to obtain the position of the subject (the distance to the subject). Furthermore, the imaging program acquires the distance to the subject based on the image position information stored in the storage unit 12. Therefore, the imaging device 1 of this embodiment can acquire the distance to the subject by a method different from the conventional method. [Explanation of symbols]
[0063] 1. Imaging device 11 Fixed point imaging unit 12 Storage section 13 Specific section 14 Recognition part 15 Acquisition Department 151 First acquisition part 152 Second acquisition part 153 Third Acquisition Department 154 4th Acquisition Department 155 5th Acquisition Department 156 6th Acquisition Department 157 7th Acquisition Department 158 8th Acquisition Department 159 9th Acquisition Division 16 Power generating panel 17 Power supply
Claims
1. a recognition unit that recognizes a subject imaged by the fixed-point imaging unit; An acquisition unit that acquires image position information by performing a predetermined process; an identification unit that, when a new subject is imaged by the fixed-point imaging unit and the recognition unit recognizes the new subject, identifies an actual position of the new subject based on image data in which the new subject exists and the image position information; The acquisition unit, as the predetermined process, obtaining a number of pixels constituting the image data per 1 m based on a height of the subject in the image data captured by the fixed-point imaging unit and an actual height of the subject, and obtaining a relationship between a Y coordinate, which is a coordinate in a depth direction of the image based on the image data, and the number of pixels; acquiring an actual image width at a predetermined position of the Y coordinate based on a width of an image acquired based on an angle of view of the fixed-point imaging unit and the number of pixels; acquiring a first distance, which is a distance from the fixed-point imaging unit to an actual position corresponding to a center position in the image, and a second distance, which is a distance from the ground to the center position, based on an actual width and an angle of view of the image; calculating an angle between the ground and a center line in an imaging direction of the fixed point imaging unit based on the first distance and the second distance; acquiring a height from a ground surface to the fixed-point imaging unit based on the first distance, the second distance, and the angle formed by the first distance and the second distance; Based on the height from the ground to the fixed-point imaging unit and the angle, a distance from the ground position where the fixed-point imaging unit is disposed to a predetermined position of the Y coordinate is acquired, and the image position information relating to a position within the image is acquired by associating the distance with the Y coordinate at the predetermined position within the image. Imaging device.
2. The computer a recognition step of recognizing a subject imaged by the fixed-point imaging unit; An acquisition step of acquiring image position information by performing a predetermined process; a specifying step of specifying an actual position of the new subject based on image data in which the new subject is included and the image position information when the new subject is recognized in the recognizing step by capturing an image of the new subject by the fixed-point imaging unit; The acquisition step includes the following steps as the predetermined process: obtaining a number of pixels constituting the image data per 1 m based on a height of the subject in the image data captured by the fixed-point imaging unit and an actual height of the subject, and obtaining a relationship between a Y coordinate, which is a coordinate in a depth direction of the image based on the image data, and the number of pixels; acquiring an actual image width at a predetermined position of the Y coordinate based on a width of an image acquired based on an angle of view of the fixed-point imaging unit and the number of pixels; acquiring a first distance, which is a distance from the fixed-point imaging unit to an actual position corresponding to a center position in the image, and a second distance, which is a distance from the ground to the center position, based on an actual width and an angle of view of the image; calculating an angle between the ground and a center line in an imaging direction of the fixed point imaging unit based on the first distance and the second distance; acquiring a height from a ground surface to the fixed-point imaging unit based on the first distance, the second distance, and the angle formed by the first distance and the second distance; Based on the height from the ground to the fixed-point imaging unit and the angle, a distance from the ground position where the fixed-point imaging unit is disposed to a predetermined position of the Y coordinate is acquired, and the image position information relating to a position within the image is acquired by associating the distance with the Y coordinate at the predetermined position within the image. Imaging method.
3. On the computer, A recognition function for recognizing a subject imaged by the fixed-point imaging unit; An acquisition function for acquiring image position information by performing a predetermined process; a specifying function for specifying an actual position of a new subject based on image data in which the new subject exists and the image position information when the new subject is imaged by the fixed-point imaging unit and the recognition function recognizes the new subject, The acquisition function includes, as the predetermined process, obtaining a number of pixels constituting the image data per 1 m based on a height of the subject in the image data captured by the fixed-point imaging unit and an actual height of the subject, and obtaining a relationship between a Y coordinate, which is a coordinate in a depth direction of the image based on the image data, and the number of pixels; acquiring an actual image width at a predetermined position of the Y coordinate based on a width of an image acquired based on an angle of view of the fixed-point imaging unit and the number of pixels; acquiring a first distance, which is a distance from the fixed-point imaging unit to an actual position corresponding to a center position in the image, and a second distance, which is a distance from the ground to the center position, based on an actual width and an angle of view of the image; calculating an angle between the ground and a center line in an imaging direction of the fixed point imaging unit based on the first distance and the second distance; acquiring a height from a ground surface to the fixed-point imaging unit based on the first distance, the second distance, and the angle formed by the first distance and the second distance; Based on the height from the ground to the fixed-point imaging unit and the angle, a distance from the ground position where the fixed-point imaging unit is disposed to a predetermined position of the Y coordinate is acquired, and the image position information relating to a position within the image is acquired by associating the distance with the Y coordinate at the predetermined position within the image. Imaging program.
Citation Information
Patent Citations
Person detection device, person detection method, and person detection program
JP2010244089A
Person counting device
JP2015070359A
Device, method and program for monitoring
JP2016181786A
Image processing method, image processing device, image-capture device, and image processing program
WO2014171052A1
Monitoring system, image processing device, image processing method and program recording medium
WO2017163955A1
