Information processing apparatus and imaging apparatus
The information processing device adjusts the detection line position based on brightness changes to maintain accurate counting of moving objects across varying light conditions, addressing the accuracy issues in existing techniques.
Patent Information
- Application Number
- JP2024018533
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-02-09
- Publication Date
- 2025-08-22
AI Technical Summary
Existing techniques for counting moving objects across a predetermined area face accuracy issues due to large brightness differences between the inside and outside of the area, leading to decreased detection and counting precision.
An information processing device adjusts the position of a detection line on image data based on changes in brightness by setting multiple detection regions and comparing their brightness levels to reposition the detection line accordingly, ensuring accurate detection and counting of moving objects.
The solution effectively maintains detection accuracy by adapting to brightness changes, reducing erroneous counting and improving detection precision even in varying light conditions.
Smart Images

Figure 2025122839000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to an information processing device and an imaging device. [Background technology]
[0002] Conventionally, there have been known techniques for counting the number of moving objects that enter and leave a predetermined area. Patent Document 1 discloses a technique for detecting the passage of moving objects and the number of people in a predetermined area using captured images generated by an imaging device. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 2019-021047 Summary of the Invention [Problem to be solved by the invention]
[0004] In Patent Document 1, a line is set on a captured image to detect the passage of a person. This line is set at the entrance and exit of a predetermined area, and the number of people is counted when a person passes through the line. However, because the position of the line is fixed, there is a risk that the accuracy of detecting the passage of a moving object will decrease if there is a large difference in brightness between the inside and outside of the predetermined area. [Means for solving the problem]
[0005] In one embodiment, an information processing device counts moving objects moving in a predetermined area, and includes: an acquisition unit that acquires image data in which the predetermined area is included in a shooting range; a setting unit that sets a detection line to detect movement of the moving objects at a position corresponding to the predetermined area in the acquired image data; and a detection unit that detects moving objects passing through the detection line on the image data and counts the number of detected moving objects. The setting unit changes the position of the detection line on the image data in response to changes in brightness near the detection line. [Effects of the Invention]
[0006] According to the present disclosure, even when the brightness of a predetermined area changes, a decrease in the accuracy of detecting and counting moving objects is suppressed. [Brief explanation of the drawings]
[0007] [Figure 1] FIG. 1 is a block diagram showing a schematic configuration of a main part of an imaging device according to an embodiment. [Figure 2A] FIG. 2A is a schematic diagram illustrating a method for counting moving objects. [Figure 2B] FIG. 2B is a schematic diagram illustrating a method for counting moving objects. [Figure 2C] FIG. 2C is a schematic diagram illustrating a method for counting moving objects. [Figure 3A] FIG. 3A is a diagram schematically illustrating image data generated by an imaging unit. [Figure 3B] FIG. 3B is a diagram schematically illustrating a case where a moving object is included in image data generated by the imaging unit. [Figure 3C] FIG. 3C is a diagram schematically illustrating a case where a moving object moves into image data generated by an imaging unit. [Figure 4A] FIG. 4A is a diagram schematically showing image data for explaining the detection line setting process. [Figure 4B] FIG. 4B is a diagram schematically showing image data for explaining the detection line setting process. [Figure 4C]FIG. 4C is a diagram schematically showing image data for explaining the detection line setting process. [Figure 5A] FIG. 5A is a diagram schematically showing a case where the position of the detection line is changed. [Figure 5B] FIG. 5B is a diagram schematically showing a case where the position of the detection line is changed. [Figure 6] FIG. 6 is a flowchart illustrating the process flow of the detection line setting process. DETAILED DESCRIPTION OF THE INVENTION
[0008] An information processing device according to an embodiment will be described in detail below with reference to the drawings, taking an imaging device as an example. The imaging device is suitable for installation as a surveillance camera in hospitals, nursing homes, factories, stores, etc. The imaging device is installed, for example, in a position that allows it to capture images of the vicinity of an entrance to a room in the facility. Therefore, the imaging range of the imaging device includes the vicinity of the entrance as a predetermined area. The imaging device uses image data acquired by capturing images to detect moving objects, such as people, passing through (moving at) the entrance, and counts the number of moving objects that have passed through (moved at) the entrance.
[0009] <Overall configuration of the imaging device> 1 is a block diagram showing a schematic configuration of the main components of an information processing device, an imaging device 10. The imaging device 10 includes an imaging unit 20, a control device 30, a recording medium 40 such as a flash memory, a communication processing unit 50, and a power supply unit 60 that supplies power to each unit within the imaging device 10.
[0010] <Imaging unit 20> The imaging unit 20 has a lens 21 and an imaging element (image sensor) 22. Subject light arriving from outside the imaging unit 20 is guided by the lens 21 to the light receiving surface of the imaging element 22 and condensed there. That is, the lens 21 is an optical element (imaging optical system) that forms an image of the object to be imaged on the light receiving surface of the imaging element 22, or is at least a part of the optical element. The imaging element 22 is a light receiving unit that converts the brightness of the image formed by the lens 21 into an amount of electric charge and generates (acquires) a signal (image data) corresponding to the converted amount of electric charge. In other words, the imaging unit 20 functions as an acquisition unit that acquires image data. The generated image data is output to the control device 30. The imaging unit 20 generates image data at a predetermined cycle (frame rate) and outputs it to the control device 30.
[0011] <Control device 30> The control device 30 is an arithmetic device incorporating a processing unit 300, which is a processor, a memory 301, and the like. The processing unit 300 of the control device 30 reads and executes a control program pre-recorded in the memory 301. In this way, the control device 30 controls each unit of the imaging device 10. The processing unit 300 has functions of a setting unit 31 and a detection unit 32. The setting unit 31 sets a detection line on the image data for counting moving objects passing through (moving in) a predetermined area. The setting unit 31 also detects changes in brightness near the set detection line using the image data, and changes the position of the detection line on the image data according to the detection result. The detection unit 32 detects moving objects moving in the predetermined area using the image data, and counts the number of detected moving objects. Details of the processes performed by the setting unit 31 and the detection unit 32 will be described later.
[0012] <Communication processing unit 50> The communication processing unit 50 has an antenna and transmits and receives various information to and from other devices via wireless LAN. For example, the communication processing unit 50 can wirelessly transmit image data generated by the imaging unit 20 to other devices such as smartphones and tablet terminals. Furthermore, the communication processing unit 50 can receive control signals output from other devices such as smartphones, thereby enabling remote control of the imaging device 10.
[0013] Next, we will explain the processing performed by the processing unit 300. The processing performed by the processing unit 300, specifically the processing performed by the setting unit 31 and the detection unit 32, includes a moving body counting process and a detection line setting process for setting a detection line for counting moving bodies.
[0014] <Counting of moving objects> Fig. 2A is a schematic diagram illustrating a method for counting moving objects. Fig. 2A shows a person (moving object) M1 moving from a first room R1 toward a second room R2 along a moving direction D1 indicated by an arrow. A detection line DL1 is set at an entrance / exit R3, which is the boundary between the first room R1 and the second room R2. The imaging device 10 is installed in a position that allows a bird's-eye view of the first room R1 and the second room R2, such as on the ceiling of the first room R1.
[0015] When a moving object M1 moves from a position P1 in the first room R1 to a position P2 in the second room R2 across the detection line DL1, the image capturing device 10 counts the number of moving objects M1 that have moved across the detection line DL1. Specifically, the detection unit 32 of the image capturing device 10 counts the number of moving objects M1 using the multiple image data generated by the image capturing unit 20.
[0016] FIG. 3A is a diagram schematically illustrating image data 100 generated by capturing images of a first room R1 and a second room R2 by the imaging unit 20. As shown in FIG. 3A, the boundary between the first room R1 and the second room R2 is an entrance / exit R3. The entrance / exit R3 shown in the image data 100 is a predetermined area. The setting unit 31 of the processing unit 300 then sets a detection line DL1 at the entrance / exit R3, which is a predetermined area within the image data 100. That is, the setting unit 31 sets the detection line DL1, which detects the movement of the moving object M1, at a position corresponding to the predetermined area within the image data 100. The position at which the detection line DL1 is set, as shown in FIG. 3A, may be referred to as the initial position.
[0017] 3A, the first chamber R1 is located below the image data 100, and the second chamber R2 is located above the image data 100. Therefore, the moving object M1 moving between the first chamber R1 and the second chamber R2 moves in a direction along the up-and-down direction of the image data 100. That is, the moving object M1 moving from the first chamber R1 to the second chamber R2 moves upward in the moving direction on the image data 100. The moving object M1 moving from the second chamber R2 to the first chamber R1 moves downward in the moving direction on the image data 100.
[0018] The setting unit 31 sets a detection line DL1 along a horizontal direction intersecting with the up-down direction on the image data 100. In other words, the setting unit 31 sets a detection line DL1 that extends along a direction intersecting with the movement direction in which the moving object M1 moves. The setting unit 31 also superimposes the set detection line DL1 on the image data 100.
[0019] 3B is a diagram schematically illustrating image data 101 when a moving object M1 appears within the imaging range of imaging device 10. In the image data 101 in which the detection line DL1 is set, detection unit 32 detects, as moving object M1, an area having characteristics different from those of first room R1 and second room R2 based on color information, edge shape, etc. In other words, detection unit 32 detects moving object M1 in image data 101. Detection unit 32 uses data of the area corresponding to moving object M1 detected at this time as a template, and thereafter detects moving object M1 in image data generated at each frame rate.
[0020] Furthermore, the detection unit 32 detects the position of the detected moving object M1 on the image data 101. If the position of the moving object M1 is below the position of the detection line DL1 (i.e., on the first room R1 side), the detection unit 32 determines that the moving object M1 has not yet moved to the second room R2, and does not perform counting.
[0021] 3C is a diagram schematically illustrating image data 102 after a moving object M1 detected on the image data 101 shown in FIG. 3B has moved from the first room R1 to the second room R2. The detection unit 32 uses the image data 102 shown in FIG. 3C to detect the moving object M1 and its position on the image data 102. If the position of the detected moving object M1 on the image data 102 is above the position of the detection line DL1 (i.e., toward the second room R2), the detection unit 32 determines that the moving object M1 has moved to the second room R2 and performs counting. That is, the detection unit 32 detects the moving object M1 passing through the detection line DL1 in the image data 101, 102, and counts the detected moving object M1.
[0022] Furthermore, when counting a moving object M1 moving from the second chamber R2 to the first chamber R1, the detection unit 32 counts the moving object M1 when the position of the moving object M1 detected above the position of the detection line DL1 changes to below the position of the detection line DL1.
[0023] In this manner, the processing unit 300 counts the moving object M1 using the multiple image data 100, 101, and 102. However, if it is dark because the lights in the first room R1 or the second room R2 are turned off, the detection accuracy of the moving object M1 by the processing unit 300 is adversely affected.
[0024] For example, Fig. 2B shows a schematic diagram of the first room R1 and the second room R2 shown in Fig. 2A when the light in the second room R2 is turned off, and Fig. 2C shows a schematic diagram of the first room R1 and the second room R2 shown in Fig. 2A when the light in the first room R1 is turned off. Note that in Fig. 2B and Fig. 2C, the dark state of the room is represented by dots.
[0025] As described above, the detection line DL1 is set at the initial position, i.e., the entrance / exit R3 at the boundary between the first room R1 and the second room R2. Therefore, when the moving object M1 moves from the first room R1 to the second room R2, the second room R2 is dark as shown in FIG. 2B, making it difficult to detect the moving object M1 in the image data generated by the imaging unit 20. Furthermore, when the first room R1 is dark as shown in FIG. 2C, when the moving object M1 moves from the first room R1 to the second room R2, it is difficult to detect the moving object M1 before the movement (i.e., when the moving object M1 is in the first room R1) in the image data generated by the imaging unit 20. This reduces the accuracy of the detection and counting of the moving object M1 by the detection unit 32.
[0026] Therefore, the setting unit 31 of the processing unit 300 performs a detection line setting process to change the position of the detection line DL1 on the image data in accordance with changes in brightness in the vicinity of the detection line DL1. The detection line setting process will be described in detail below.
[0027] <Detection line setting process> Fig. 4A is a diagram schematically showing image data 103 on which detection line setting processing is performed. Note that the image data 103 shown in Fig. 4A is image data generated by capturing images of the first room R1 and the second room R2 by the imaging unit 20, similar to Fig. 3A.
[0028] The setting unit 31 sets a plurality of detection regions DR on the image data 103. Specifically, the setting unit 31 sets the detection regions DR near a detection line DL1 set at an initial position on the image data 103. The setting unit 31 detects the brightness of the vicinity of the detection line DL1 based on the brightness of the detection regions DR in the image data.
[0029] The setting unit 31 sets three detection regions DR (first detection region DR1, second detection region DR2, and third detection region DR3). The sizes (ranges) of the first detection region DR1, second detection region DR2, and third detection region DR3 may be set to predetermined sizes depending on the environment in which the imaging device 10 is installed. In this case, the sizes of the multiple detection regions DR may be the same or different from one another. Alternatively, the setting unit 31 may determine the size of each detection region DR using image data generated by the imaging unit 20. In this case, the setting unit 31 may set the size of each detection region DR depending on the range (size) occupied by the first room R1 and the second room R2 on the image data.
[0030] The setting unit 31 sets the first detection region DR1 in the range including the boundary between the first chamber R1 and the second chamber R2 on the image data 103, i.e., the detection line DL1 set at the initial position. The setting unit 31 sets the second detection region DR2 on the image data 103 closer to the second chamber R2 than the first detection region DR1. That is, as shown in FIG. 4A, the second detection region DR2 is set above the first detection region DR1 on the image data 103.
[0031] The setting unit 31 sets the third detection region DR3 closer to the first room R1 than the first detection region DR1 on the image data 103. That is, as shown in Fig. 4A, the third detection region DR3 is set below the first detection region DR1 on the image data 103.
[0032] In this way, the multiple detection areas DR are set along the up-down direction of the image data 103. In other words, the multiple detection areas DR are set along the movement direction in which the moving object M1 moves on the image data 103. More specifically, the setting unit 31 sets the second detection area DR2 above (one side of) the first detection area DR1 in the movement direction, and sets the third detection area DR3 below (the other side of) the first detection area DR1 in the movement direction. In other words, the setting unit 31 sets the first detection area DR1 between the second detection area DR2 and the third detection area DR3 in the movement direction.
[0033] The setting unit 31 calculates the brightness for each of the first detection region DR1, second detection region DR2, and third detection region DR3 and compares the calculated brightnesses. Then, the setting unit 31 detects a change in brightness near the entrance / exit R3 (i.e., near the detection line DL1) based on the result of the brightness comparison. In other words, the setting unit 31 detects a change in brightness near the detection line DL1 based on the brightness of each of multiple detection regions DR set along the movement direction near the detection line DL1 set at the initial position on the image data 103.
[0034] Specifically, the setting unit 31 first compares the average gradation value of all pixels included in the first detection region DR1 with the average gradation value of all pixels included in the second detection region DR2 and the average gradation value of all pixels included in the third detection region DR3. In this case, the setting unit 31 calculates the difference between the average gradation value of the first detection region DR1 and the average gradation value of the second detection region DR2 (hereinafter referred to as the first difference value), and the difference between the average gradation value of the first detection region DR1 and the average gradation value of the third detection region DR3 (hereinafter referred to as the second difference value).
[0035] The setting unit 31 may compare the minimum or maximum gradation values of each detection region DR, instead of the average gradation values of all pixels included in each detection region DR. Gradation is a value in the range of 0 to 255 [LSB (Least Significant Bit)], and generally, a value of 100 [LSB] or more is bright, and a value of 15 [LSB] or less is dark.
[0036] When the calculated first difference value and second difference value are equal to or less than a predetermined threshold, the first detection region DR1, the second detection region DR2, and the third detection region DR3 have equal or approximately equal brightness. That is, as shown in FIG. 2A, the first room R1, the second room R2, and the entrance / exit R3 have equal or approximately equal brightness. Here, "the first detection region DR1, the second detection region DR2, and the third detection region DR3 have equal or approximately equal brightness" refers to cases other than when the second detection region DR2 is brighter than the first detection region DR1 and the third detection region DR3, and when the third detection region DR3 is brighter than the first detection region DR1 and the second detection region DR2. In this case, the setting unit 31 sets the detection line DL1 to the initial position shown in FIG. 4A. That is, the detection line DL1 is set within the range of the first detection region DR1.
[0037] The threshold value may be, for example, 30 [LSB]. However, the threshold value is not limited to the above example and may be set to a suitable value depending on the environment in which the imaging device 10 is installed. The threshold value may be a fixed value or a variable value. When the threshold value is variable, for example, the setting unit 31 changes the threshold value based on the brightness of the entire imaging range calculated based on the image data. The setting unit 31 may increase the threshold value when the entire imaging range is bright, for example, 100 [LSB] or more, and decrease the threshold value when the entire imaging range is dark, for example, 15 [LSB] or less.
[0038] The setting unit 31 changes the position of the detection line DL1 based on the first difference value and the second difference value calculated as described above. That is, the setting unit 31 compares the brightness of the multiple detection regions DR and changes the position of the detection line DL1 based on the comparison result. Specifically, when the first difference value is greater than the threshold value and the second difference value is equal to or less than the threshold value, the second detection region DR2 is brighter than the other detection regions DR1 and DR3. That is, as shown in FIG. 2C, the second room R2 is brighter than the first room R1 and the entrance / exit R3. In this case, the setting unit 31 changes the detection line DL1 from its initial position shown in FIG. 4A.
[0039] 4B is image data 104 illustrating the detection line setting process, and is a diagram schematically illustrating a case where the second detection region DR2 is brighter than the other detection regions DR1 and DR3. As shown in FIG. 4B, when the second detection region DR2 is brighter than the other detection regions DR1 and DR3, the setting unit 31 sets the detection line DL1 at the boundary between the first detection region DR1 and the second detection region DR2.
[0040] Note that the setting unit 31 is not limited to setting the detection line DL1 at the boundary between the first detection region DR1 and the second detection region DR2. For example, the setting unit 31 may set the detection line DL1 on a side closer to (above) the second detection region DR2 within the first detection region DR1, or may set it within the second detection region DR2 or above the second detection region DR2. That is, the setting unit 31 changes the position of the detection line DL1 toward the second detection region DR2 from its initial position.
[0041] Through the above process, the setting unit 31 compares the brightness of the multiple detection regions DR and repositions the detection line DL1 to the vicinity of the second detection region DR2, which is brighter than the first detection region DR1. Thereafter, the detection unit 32 uses the repositioned detection line DL1 to detect and count the movement of the moving object M1.
[0042] 5A is a diagram schematically illustrating a case where the position of the detection line DL1 is changed to the brighter side in the state shown in FIG. 2C. As shown in FIG. 5A, the detection line DL1 is set to the brighter side, i.e., the second room R2 side, than the position shown in FIG. 2C. Therefore, unlike the case shown in FIG. 2C, it is easy to detect the moving object M1 before it moves (i.e., before it passes through the detection line DL1) on the image data generated by the imaging unit 20. This reduces erroneous counting of the moving object M1 by the detection unit 32.
[0043] When the second difference value is greater than the threshold value and the first difference value is equal to or less than the threshold value, the third detection region DR3 is brighter than the other detection regions DR1 and DR2. That is, as shown in FIG. 2B, the first room R1 is brighter than the second room R2 and the entrance / exit R3. In this case, the setting unit 31 changes the detection line DL1 from the position shown in FIG. 4A.
[0044] 4C is image data 105 illustrating the detection line setting process, and is a diagram schematically illustrating image data when the third detection region DR3 is brighter than the other detection regions DR1 and DR2. As shown in FIG. 4C, when the third detection region DR3 is brighter than the other detection regions DR1 and DR2, the setting unit 31 sets the detection line DL1 near the boundary between the first detection region DR1 and the third detection region DR3.
[0045] Note that the setting unit 31 is not limited to setting the detection line DL1 at the boundary between the first detection region DR1 and the third detection region DR3. For example, the setting unit 31 may set the detection line DL1 on a side closer to (below) the third detection region DR3 within the first detection region DR1, or may set it within the third detection region DR3 or below the third detection region DR3. That is, the setting unit 31 changes the position of the detection line DL1 toward the third detection region DR3 from its initial position.
[0046] Through the above process, the setting unit 31 compares the brightness of the multiple detection regions DR and repositions the detection line DL1 to the vicinity of the third detection region DR3, which is brighter than the first detection region DR1. Thereafter, the detection unit 32 uses the repositioned detection line DL1 to detect and count the movement of the moving object M1.
[0047] 5B is a diagram schematically illustrating a case where the position of the detection line DL1 is changed to the brighter side in the state shown in FIG. 2B. As shown in FIG. 5B, the detection line DL1 is set to the brighter side, i.e., the first room R1 side, than the position shown in FIG. 2B. Therefore, unlike the case shown in FIG. 2B, it is easy to detect the moving object M1 after it has moved (i.e., after it has passed the detection line DL1) on the image data generated by the imaging unit 20. This reduces erroneous counting of the moving object M1 by the detection unit 32.
[0048] The setting unit 31 generates image data in which the detection line DL1 set as described above is superimposed on the image data generated by the imaging unit 20, and records the image data on the recording medium 40. That is, image data 103, 104, and 105 shown in FIGS. 4A, 4B, and 4C are generated by the setting unit 31 and recorded on the recording medium 40. The image data recorded on the recording medium 40 is display image data to be displayed on, for example, an external image display device. However, the detection region DR shown in FIGS. 4A, 4B, and 4C is not superimposed on the display image data.
[0049] It should be noted that the display image data is not limited to being recorded on the recording medium 40. For example, the communication processing unit 50 may transmit the display image data to an external image display device via wireless communication.
[0050] The processing unit 300 performs the above-described detection line setting process at predetermined time intervals. The predetermined time intervals may be every few minutes, every tens of minutes, or every few hours. The predetermined time interval may be changeable depending on the time of day. For example, if the imaging device 10 is installed in a location susceptible to external light (sunlight), the predetermined time interval may be set to several hours during the day and to several tens of minutes at night.
[0051] <Detection line setting process flow> The flow of processing performed by the processing unit 300 will be described with reference to the flowchart of the detection line setting process shown in Fig. 6. Each process shown in the flowchart is performed by the processing unit 300 reading a program recorded in the memory 301 in the control device 30 and executing the program.
[0052] In step S1, the processing unit 300 acquires image data generated by the imaging unit 20. Then, the process proceeds to step S2. In step S2, the setting unit 31 compares the brightness of each of the first detection region DR1, the second detection region DR2, and the third detection region DR3 in the acquired image data. In this case, as described above, the setting unit 31 calculates a first difference value, which is the difference between the LSB value of the first detection region DR1 and the LSB value of the second detection region DR2, and a second difference value, which is the difference between the LSB value of the first detection region DR1 and the LSB value of the third detection region DR3. Then, the process proceeds to step S3.
[0053] In step S3, the setting unit 31 determines whether the first difference value and the second difference value are equal to or less than a threshold value. If the first difference value and the second difference value are equal to or less than the threshold value, the setting unit 31 determines that the first detection region DR1, the second detection region DR2, and the third detection region DR3 are equally bright, and makes a positive determination. More specifically, if the first room R1, the second room R2, and the entrance / exit R3 are equally bright (see FIG. 2A), the setting unit 31 makes a positive determination. Then, the process proceeds to step S4. In step S4, the setting unit 31 sets the detection line DL1 to an initial position (see FIG. 4A), and records the detection line DL1 on the recording medium 40 while superimposing it on the image data. Then, the process proceeds to step S8, which will be described later.
[0054] On the other hand, if the first difference value or the second difference value is greater than the threshold value in step S3, the setting unit 31 makes a negative determination, and the process proceeds to step S5.
[0055] In step S5, the setting unit 31 determines whether the value of the first difference is greater than a threshold value and whether the value of the second difference is equal to or less than a threshold value. If the value of the first difference is greater than the threshold value and the value of the second difference is equal to or less than the threshold value, the setting unit 31 determines that the second detection region DR2 is brighter than the first detection region DR1 and the third detection region DR3, and makes a positive determination. More specifically, if the second room R2 is brighter than the first room R1 and the entrance / exit R3 (see FIG. 2C), the setting unit 31 makes a positive determination. Then, the process proceeds to step S6.
[0056] In step S6, the setting unit 31 moves (sets) the detection line DL1 to a boundary position between the first detection region DR1 and the second detection region DR2 (see FIG. 4B). Then, the setting unit 31 superimposes the moved detection line DL1 on the image data and records it on the recording medium 40. Thereafter, the process proceeds to step S8, which will be described later.
[0057] On the other hand, in step S5, if the value of the first difference is equal to or less than the threshold value and the value of the second difference is greater than the threshold value, the setting unit 31 determines that the third detection region DR3 is brighter than the first detection region DR1 and the second detection region DR2, and makes a negative determination. More specifically, if the first room R1 is brighter than the second room R2 and the entrance / exit R3 (see FIG. 2B), the setting unit 31 makes a negative determination. Then, the process proceeds to step S7.
[0058] In step S7, the setting unit 31 moves (sets) the detection line DL1 to the boundary position between the first detection region DR1 and the third detection region DR3 (see FIG. 4C). Then, the setting unit 31 superimposes the moved detection line DL1 on the image data and records it on the recording medium 40. After that, the process proceeds to step S8.
[0059] In step S8, the setting unit 31 determines whether a predetermined time has elapsed since the detection line DL1 was set on the image data. If the predetermined time has elapsed, the processing unit 300 makes a positive determination, and the process returns to step S1. If the predetermined time has not elapsed, the processing unit 300 makes a negative determination, and the process returns to step S8.
[0060] According to the above-described embodiment, at least one of the following advantageous effects can be obtained.
[0061] (1) The processing unit 300 of the control device 30 included in the imaging device 10 includes a setting unit 31 and a detection unit 32. The setting unit 31 sets a detection line DL1 for detecting the movement of a moving object M1 at a position corresponding to the entrance / exit R3, which is a predetermined area in the image data generated by the imaging unit 20. The detection unit 32 detects moving objects M1 passing through the detection line DL1 on the image data and counts the number of detected moving objects M1. The setting unit 31 then changes the position of the detection line DL1 on the image data in accordance with changes in brightness near the detection line DL1. This prevents a decrease in the detection accuracy of moving objects M1 passing (moving) through the detection line DL1 on the image data, even when there is a large difference in brightness near the detection line DL1. As a result, erroneous counting of the number of moving objects M1 moving along the detection line DL1 is reduced.
[0062] (2) The setting unit 31 sets multiple detection regions DR on the image data near the detection line DL1 along the movement direction of the moving object M1. The setting unit 31 then detects changes in brightness based on the brightness of each of the multiple detection regions DR. As a result, by using the brightness of each of the multiple different set detection regions DR, it is possible to accurately detect the difference in brightness along the movement direction of the moving object M1.
[0063] (3) The setting unit 31 compares the brightness of the multiple detection regions DR and changes the position of the detection line DL1 based on the comparison results. This prevents the detection of a moving object M1 on the dark side of the image data from being difficult because one side of the detection line DL1 is bright and the other side is dark. As a result, errors in counting the number of moving objects M1 that have moved along the detection line DL1 are prevented.
[0064] (4) The setting unit 31 sets, as the multiple detection regions DR, a first detection region DR1, a second detection region DR2 above (one side of) the first detection region DR1 in the movement direction, and a third detection region DR3 below (the other side of) the first detection region DR1 in the movement direction. When the first detection region DR1, the second detection region DR2, and the third detection region DR3 are approximately equally bright, the setting unit 31 sets the detection line DL1 to an initial position within the first detection region DR1. When the second detection region DR2 is brighter than the first detection region DR1 and the third detection region DR3, the setting unit 31 changes the position of the detection line DL1 toward the second detection region DR2 from its initial position. When the third detection region DR3 is brighter than the first detection region DR1 and the second detection region DR2, the setting unit 31 changes the position of the detection line DL1 toward the third detection region DR3 from its initial position. This allows the position of the detection line DL1 to be changed to the brighter side when the vicinity of the detection line DL1 becomes dark due to reasons such as lights being turned off, etc. As a result, the vicinity of the detection line DL1 becomes bright on the image data, thereby preventing a decrease in the accuracy of detecting and counting the moving object M1.
[0065] (5) When the second detection region DR2 is brighter than the first detection region DR1 and the third detection region DR3, the setting unit 31 sets the detection line DL1 to the boundary between the second detection region DR2 and the first detection region DR1. When the third detection region DR3 is brighter than the first detection region DR1 and the second detection region DR2, the setting unit 31 sets the detection line DL1 to the boundary between the third detection region DR3 and the first detection region DR1. This makes it possible to change the position of the detection line DL1 to a brighter position on the image data, thereby preventing a decrease in the accuracy of detecting and counting the moving object M1.
[0066] (6) The setting unit 31 calculates a first difference value, which is the difference in brightness between the first detection region DR1 and the second detection region DR2, and a second difference value, which is the difference in brightness between the first detection region DR1 and the third detection region DR3. If the first difference value and the second difference value are equal to or less than a threshold, the setting unit 31 determines that the first detection region DR1, the second detection region DR2, and the third detection region DR3 have approximately the same brightness. If the first difference value is greater than the threshold and the second difference value is equal to or less than the threshold, the setting unit 31 determines that the second detection region DR2 is brighter than the first detection region DR1 and the third detection region DR3. If the second difference value is greater than the threshold and the first difference value is equal to or less than the threshold, the setting unit 31 determines that the third detection region DR3 is brighter than the first detection region DR1 and the second detection region DR2. This enables accurate detection of the difference in brightness along the movement direction near the detection line DL1. As a result, the position of the detection line DL1 is shifted to the bright side, and the detection and counting of the moving objects M1 are performed with high accuracy.
[0067] (7) The setting unit 31 superimposes the set detection line DL1 on the image data to generate display image data. As a result, the display image data recorded on the recording medium 40 is played back and displayed, allowing the user to easily confirm the position where the detection line DL1 was set, thereby improving convenience.
[0068] <Modification> In the above-described embodiment, the information processing device is the imaging device 10, but the information processing device is not limited to the imaging device 10. For example, the information processing device may be a monitoring device that acquires image data generated by an external device and performs a process of counting moving objects and a process of setting a detection line using the acquired image data. In this case, the monitoring device includes the control device 30, recording medium 40, and communication processing unit 50 included in the imaging device 10 of the embodiment. The communication processing unit 50 acquires image data generated by an imaging process of the external device (for example, an imaging device or a mobile terminal with a camera) via wireless communication. In other words, the communication processing unit 50 functions as an acquisition unit that acquires image data generated by the external device.
[0069] As in the embodiment, the processing unit 300 of the control device 30 performs the moving body counting process and the detection line setting process using the image data acquired by the communication processing unit 50. In this case as well, the image data on which the detection line DL1 is superimposed is recorded on the recording medium 40. If the monitoring device is equipped with an image display such as a monitor, the processing unit 300 may display the image data on which the detection line DL1 is superimposed on the image display.
[0070] The processing unit 300 performs the same process of counting the moving bodies and setting the detection line as in the embodiment. As a result, the information processing device of the modified example can also achieve the same effects as the effects (1) to (7) achieved by the embodiment.
[0071] Although various embodiments and modifications have been described above, the present invention is not limited to these. Other embodiments that are conceivable within the scope of the technical idea of the present invention are also included within the scope of the present invention.
[0072] In the above-described embodiment and modified examples, three detection regions DR are set, but the number of detection regions DR is not limited to three. For example, one detection region DR may be set on the first chamber R1 side of the boundary between the first chamber R1 and the second chamber R2, and one detection region DR may be set on the second chamber R2 side. Alternatively, multiple detection regions DR may be set closer to the first chamber R1 than the first detection region DR1, and multiple detection regions DR may be set closer to the second chamber R2 than the first detection region DR1.
[0073] The present technology can be configured as follows.
[0074] (1) An information processing device that counts moving bodies moving in a specified area, comprising: an acquisition unit that acquires image data in which the specified area is included in a shooting range; a setting unit that sets a detection line to detect the movement of the moving bodies at a position corresponding to the specified area in the acquired image data; and a detection unit that detects the moving bodies passing through the detection line on the image data and counts the number of detected moving bodies, wherein the setting unit changes the position of the detection line on the image data in accordance with changes in brightness near the detection line.
[0075] (2) The information processing device described in (1), wherein the setting unit sets multiple detection areas on the image data near the detection line along the direction of movement in which the moving body moves, and detects changes in brightness based on the brightness of each of the multiple detection areas.
[0076] (3) The information processing device according to (1) or (2), wherein the setting unit compares brightness of the plurality of detection areas and changes the position of the detection line based on the comparison result.
[0077] (4) The information processing device described in (2) or (3), wherein the multiple detection areas include a first detection area, a second detection area, and a third detection area along the movement direction, and the setting unit sets the first detection area between the second detection area and the third detection area, and when the first detection area, the second detection area, and the third detection area are approximately equally bright, sets the detection line to an initial position within the first detection area, and when the second detection area is brighter than the first detection area and the third detection area, changes the position of the detection line from the initial position toward the second detection area, and when the third detection area is brighter than the first detection area and the second detection area, changes the position of the detection line from the initial position toward the third detection area.
[0078] (5) The information processing device described in (4), wherein the setting unit sets the detection line at the boundary between the second detection area and the first detection area when the second detection area is brighter than the first detection area and the third detection area, and sets the detection line at the boundary between the third detection area and the first detection area when the third detection area is brighter than the first detection area and the second detection area.
[0079] (6) The setting unit calculates a first difference value, which is the difference between the brightness of the first detection area and the brightness of the second detection area, and a second difference value, which is the difference between the brightness of the first detection area and the brightness of the third detection area; if the first difference value and the second difference value are equal to or less than a threshold, it determines that the first detection area, the second detection area, and the third detection area are of approximately equal brightness; if the first difference value is greater than the threshold and the second difference value is equal to or less than the threshold, it determines that the second detection area is brighter than the first detection area and the third detection area; and if the second difference value is greater than the threshold and the first difference value is equal to or less than the threshold, it determines that the third detection area is brighter than the first detection area and the second detection area.
[0080] (7) An information processing device according to any one of (1) to (6), wherein the setting unit superimposes the set detection line on the image data to generate image data for display.
[0081] (8) The information processing device described in any one of (1) to (7) is an imaging device, and the acquisition unit has an optical system and a light receiving unit that receives light incident through the optical system and generates the image data. [Explanation of symbols]
[0082] 10 imaging device, 20 imaging section, 30 control device, 40 recording medium, 21 lens, 22 imaging element, 31 setting section, 32 detection section, 300 processing section, DL1 detection line, DR detection area, DR1 first detection area, DR2 second detection area, DR3 third detection area
Claims
1. An information processing device that counts moving objects moving in a predetermined area, an acquisition unit that acquires image data in which the predetermined area is included in a shooting range; a setting unit that sets a detection line for detecting movement of the moving object at a position corresponding to the predetermined region in the acquired image data; a detection unit that detects the moving objects passing through the detection line on the image data and counts the number of the detected moving objects, The setting unit changes the position of the detection line on the image data in accordance with a change in brightness near the detection line.
2. 2. The information processing device according to claim 1, The setting unit sets multiple detection areas on the image data near the detection line along the direction of movement in which the moving object moves, and detects changes in brightness based on the brightness of each of the multiple detection areas.
3. 3. The information processing device according to claim 2, The setting unit compares brightness of the plurality of detection areas and changes the position of the detection line based on the comparison result.
4. 4. The information processing device according to claim 3, the plurality of detection areas include a first detection area, a second detection area, and a third detection area along the movement direction; The setting unit The first detection area is set between the second detection area and the third detection area, When the first detection area, the second detection area, and the third detection area have substantially the same brightness, the detection line is set to an initial position within the first detection area; When the second detection area is brighter than the first detection area and the third detection area, the position of the detection line is changed from the initial position toward the second detection area; When the third detection area is brighter than the first detection area and the second detection area, the position of the detection line is changed from the initial position toward the third detection area.
5. 5. The information processing device according to claim 4, The setting unit When the second detection area is brighter than the first detection area and the third detection area, the detection line is set at the boundary between the second detection area and the first detection area; When the third detection area is brighter than the first detection area and the second detection area, the detection line is set at the boundary between the third detection area and the first detection area.
6. 6. The information processing device according to claim 5, The setting unit calculating a first difference value that is a difference between the brightness of the first detection area and the brightness of the second detection area, and a second difference value that is a difference between the brightness of the first detection area and the brightness of the third detection area; When the first difference value and the second difference value are equal to or less than a threshold value, it is determined that the first detection area, the second detection area, and the third detection area have substantially the same brightness; When the first difference value is greater than the threshold value and the second difference value is equal to or less than the threshold value, it is determined that the second detection area is brighter than the first detection area and the third detection area; When the second difference value is greater than the threshold value and the first difference value is equal to or less than the threshold value, the information processing device determines that the third detection area is brighter than the first detection area and the second detection area.
7. 7. The information processing device according to claim 6, The setting unit superimposes the set detection line on the image data to generate display image data.
8. The information processing device according to any one of claims 1 to 7 is an imaging device, The acquisition unit is an imaging device having an optical system and a light receiving unit that receives light incident through the optical system and generates the image data.
Citation Information
Patent Citations
Information processing apparatus, control method, and program
JP2019021047A