Object distance data calculation method, processor and computer program using object recognition and rotation function of CCTV camera
The method uses CCTV camera rotation and processor calculations to estimate object distances and locations, overcoming the need for costly LiDAR or depth cameras by leveraging standard objects and pixel movement analysis.
Patent Information
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- SUPERGATE CO LTD
- Filing Date
- 2022-12-01
- Publication Date
- 2026-07-21
AI Technical Summary
Existing CCTV cameras face challenges in accurately determining object distances without additional equipment like LiDAR or depth cameras, which incur extra costs.
A method using a CCTV camera's rotation function and a processor to calculate object distance data by recognizing standard objects in multiple images and calculating pixel movement distances, then converting them to actual distances using camera rotation angles and installation height.
Accurately estimates object distances and locations within an image using existing rotatable CCTV cameras without additional equipment, enhancing precision and reducing costs.
Smart Images

Figure 112022129351571-PAT00017_ABST
Abstract
Description
Technology Field
[0001] The present invention relates to a method for calculating object distance data using object recognition and the rotation function of a CCTV camera, a processor, and a computer program. Background Technology
[0002] Generally, CCTV (Closed-circuit Television) cameras are primarily used to capture video to monitor video information in real time or to store and visually verify video information.
[0003] Recently, with the expansion of CCTV camera distribution, they are being widely used for industrial, educational, medical, traffic control surveillance, disaster prevention, and video information transmission purposes.
[0004] In addition, to understand the situation within the video, it is necessary to determine the distance between the objects in the video and the location where the camera is installed, as well as the distance between each object.
[0005] Conventionally, to determine the distance of objects within an image, a method was used in which actual distances over a large area were measured using distance measuring equipment and estimated through interpolation between adjacent points by matching them with the captured image.
[0006] However, there are disadvantages such as the need to measure the actual distance differently depending on the camera's position and the difficulty in determining the exact distance.
[0007] Recently, LIDAR and depth cameras are being used to determine the distance of objects in an image in order to accurately determine the distance.
[0008] However, when using LiDAR and depth cameras, there is a disadvantage that costs increase because additional configurations must be added to existing CCTV cameras. The problem to be solved
[0009] The present invention aims to provide a method for calculating object distance data using object recognition and the rotation function of a CCTV camera, a processor, and a computer program.
[0010] Specifically, the purpose is to provide a method for calculating distance data, a processor, and a computer program based on the change in movement of a standard object due to the rotation of a CCTV camera. means of solving the problem
[0011] A method for calculating distance data of a processor according to the present invention for solving the above technical problem may include the steps of: receiving a first image containing at least one standard object from a camera; recognizing a standard object within the received first image to obtain first recognition data; controlling the camera to rotate at a predetermined angle; receiving a second image containing at least one standard object from the camera rotated at the predetermined angle; recognizing a standard object within the received second image to obtain second recognition data; and calculating distance data between the standard object and the camera using the first recognition data and the second recognition data.
[0012] In addition, the above standard object is an object having a certain size and may be in a stationary state.
[0013] Additionally, the distance data calculation step may further include a step of calculating the pixel movement distance of a standard object based on the first recognition data and the second recognition data, and a step of calculating the distance data of the standard object based on the calculated pixel movement distance of the standard object.
[0014] In addition, the step of calculating the distance data of the standard object may calculate the distance data of the standard object using the rotation angle according to the predetermined angle rotation of the camera, the pixel displacement distance of the standard object, and the installation height of the camera.
[0015] Additionally, the distance data of the standard object may be the distance between the position where the camera is projected onto the floor surface and the position of the standard object.
[0016] In addition, it may further include a step of generating distance information of the space where the camera is located based on the distance data of the calculated standard object.
[0017] In addition, the above generating step can generate spatial distance information by distinguishing distance data according to the type and angle of the standard object.
[0018] In addition, the method may further include a step of estimating the location of an object of interest within the space based on the distance information.
[0019] Meanwhile, the method for calculating distance data of a processor may include the steps of: receiving first recognition data in which a standard object is recognized in a first image containing at least one standard object from a camera; controlling the camera to rotate at a predetermined angle; receiving second recognition data in which a standard object is recognized in a second image containing at least one standard object from the camera rotated at the predetermined angle; and calculating distance data between the standard object and the camera using the first recognition data and the second recognition data. Effects of the invention
[0020] The present invention can estimate the position of an object of interest within an image using an existing rotatable camera without the need for additional equipment such as lidar or depth cameras.
[0021] In addition, the present invention can calculate distance data more accurately by using camera rotation and standard objects.
[0022] In addition, the present invention can more accurately estimate the location of an object of interest within an image by estimating the location of the object of interest using spatial distance information. Brief explanation of the drawing
[0023] FIG. 1 is a conceptual diagram showing a distance data calculation system according to one embodiment of the present invention. FIG. 2 is a flowchart illustrating a method for calculating distance data according to an embodiment of the present invention. FIG. 3 is an exemplary diagram illustrating a method for calculating distance data according to an embodiment of the present invention. FIG. 4 is a flowchart illustrating a method for calculating distance data according to an embodiment of the present invention. FIG. 5 is an exemplary diagram showing spatial information according to one embodiment of the present invention. FIG. 6 is a timing diagram illustrating a method for calculating distance data according to an embodiment of the present invention. FIG. 7 is a block diagram showing the configuration of a processor according to one embodiment of the present invention. Specific details for implementing the invention
[0024] The following description merely illustrates the principles of the invention. Therefore, those skilled in the art may invent various devices that embody the principles of the invention and are included within the concept and scope of the invention, even if they are not explicitly described or illustrated in this specification. Furthermore, all conditional terms and embodiments listed in this specification are, in principle, explicitly intended only for the purpose of enabling an understanding of the concept of the invention and should be understood as not being limited to the embodiments and conditions specifically listed elsewhere.
[0025] The aforementioned objectives, features, and advantages will become clearer through the following detailed description in conjunction with the attached drawings, and accordingly, a person skilled in the art to which the invention pertains will be able to easily implement the technical concept of the invention.
[0026] In addition, in describing the invention, if it is determined that a detailed description of known technology related to the invention may unnecessarily obscure the essence of the invention, such detailed description will be omitted. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the attached drawings.
[0027] FIG. 1 is a conceptual diagram showing a distance data calculation system according to one embodiment of the present invention.
[0028] Referring to FIG. 1, a camera (200) can capture at least one standard object (10) to obtain an image containing the standard object (10) and transmit it to a processor (100). Here, the camera (200) is a camera fixed in a specific location and may be a shooting device such as a CCTV camera, a security camera, a traffic control surveillance camera, a disaster prevention camera, etc.
[0029] In addition, the standard object (10) is an object with a certain size and may be in a stationary state.
[0030] For example, standard objects (10) may refer to objects that have a certain size according to regulations, such as car license plates, cars of a specific model, guide signs, signboards, standing signs, streetlights, etc.
[0031] And, the processor (100) can recognize a standard object in an image received from the camera (100) and calculate distance data between the standard object and the camera.
[0033] Hereinafter, a method for calculating distance data of a processor (100) will be explained with reference to FIG. 2.
[0034] FIG. 2 is a flowchart illustrating a method for calculating distance data according to an embodiment of the present invention.
[0035] Referring to FIG. 2, the processor (100) can receive a first image containing at least one standard object from a camera (200) (S100).
[0036] And, the processor (100) can obtain first recognition data by recognizing a standard object in a first image received from a camera (200) (S200).
[0037] Specifically, the processor (100) can obtain first recognition data by recognizing the area where a standard object is located within a first image received from a camera (200). Here, the first recognition data may include the type of the standard object, the area where the standard object is located within the first image, and pixel coordinate information. At this time, the processor (100) may use a deep learning-based object recognition model to recognize the standard object, and may use an object recognition model trained based on standard objects from various angles. At this time, the processor (100) may recognize the standard object using only one frame within the first image.
[0038] Next, the processor (100) can control the camera (200) to rotate at a predetermined angle (S300). Here, the predetermined angle may be an angle at which the camera (200) can be rotated finely.
[0039] Specifically, the processor (100) can transmit a control command to rotate the camera (200) based on a predetermined rotation angle.
[0040] Additionally, the processor (100) can determine the size and direction of a predetermined angle based on camera (200) information or recognized standard object information and transmit a control command to rotate the camera (200). Here, the camera (200) information may include the type of camera, installation location, shooting angle, angle of view, lens type, etc., and the standard object information may include the size, type, pixel location, and the proportion of the standard object within the image of the recognized standard object.
[0041] And, the processor (100) can receive a second image containing at least one standard object from a camera (200) rotated according to a control command. Here, the standard object (10) in the second image may be the same object as the standard object (10) in the first image.
[0042] Next, the processor (100) can recognize a standard object in the received second image and obtain second recognition data (S500).
[0043] Specifically, the processor (100) can recognize the area where a standard object is located within a second image received from the camera (200) and obtain second recognition data. Here, the second recognition data may include the area where the standard object is located within the second image and pixel coordinate information.
[0044] And, the processor (100) can calculate the pixel movement distance of a standard object based on the acquired first recognition data and second recognition data (S600).
[0045] Specifically, the processor (100) can calculate the pixel displacement distance of a standard object by comparing the pixel coordinates of the standard object within the first recognition data and the second recognition data. Here, the pixel displacement distance may mean the pixel displacement of the standard object between the first recognition data and the second recognition data.
[0046] Next, the processor (100) can calculate distance data of the standard object based on the pixel movement distance of the calculated standard object (S700).
[0047] Specifically, the processor (100) can calculate the absolute displacement of a standard object by converting the pixel displacement of the standard object into an absolute displacement based on the size information of the standard object. Here, the absolute displacement means the pixel displacement converted into a distance in the actual environment within the image.
[0048] For example, if the pixel displacement of a standard object with a width of 50 cm is 10 pixels, the absolute displacement of the standard object can be 150 cm.
[0049] And, the processor (100) can calculate the straight-line distance between the camera (200) and the standard object using mathematical formula 1.
[0051] [Mathematical Formula 1]
[0052]
[0053] The angle at which the camera is rotated in the above mathematical formula 1 ( ), absolute movement distance of standard objects( ), straight distance between camera (200) and standard object ( It means ).
[0054] Next, the processor (100) can calculate the distance between the position where the camera (100) is projected onto the floor surface and the standard object using mathematical formula 2.
[0056] [Mathematical Formula 2]
[0057]
[0058] In the above mathematical formula 2, the installation height of the camera (200) ( ), straight distance between camera (200) and standard object ( ), distance between the position where the camera (100) is projected onto the floor surface and the standard object ( It means ).
[0059] In this regard, further explanation is provided with reference to Fig. 3.
[0060] FIG. 3 is an exemplary diagram illustrating a method for calculating distance data according to an embodiment of the present invention.
[0061] Referring to FIG. 3, the processor (100) converts the pixel displacement of a standard object into an absolute displacement based on the size information of the standard object, thereby the absolute displacement between the first image reference standard object (31) and the second image reference standard object (32). Calculate ) and the angle at which the camera is rotated ( ) and absolute distance traveled( Using ) the straight distance between the camera (200) and the standard objects (31, 32) ) can be produced.
[0062] Next, the processor (100) determines the installation height of the camera (200) ( The distance between the position projected onto the floor surface by the camera (100) and the standard object ( Straight line distance between ) and camera (200) and standard object ( Distance data of a standard object can be calculated using ). Here, the distance data of a standard object refers to the distance between the position where the camera (200) is projected onto the floor surface and the position of the standard object.
[0063] That is, the processor (100) can calculate distance data of a standard object using the pixel movement distance of the standard object, the rotation angle according to the camera's predetermined angle of rotation, and the installation height of the camera (200).
[0064] Meanwhile, the processor (100) can estimate the location of the object of interest by generating distance information of the space where the camera (200) is located using the distance data of the calculated standard object.
[0065] This will be explained with reference to Fig. 4.
[0066] FIG. 4 is a flowchart illustrating a method for calculating distance data according to an embodiment of the present invention.
[0067] Referring to FIG. 4, the processor (100) can recognize at least one perspective object included in a first image or a second image received from a camera (200) and calculate the perspective line slope of the perspective object (S800). Here, the perspective object is a fixed object included in the first image or the second image, and may be a building, a street tree, etc.
[0068] In addition, a perspective line refers to a straight line that runs parallel to a perspective object and leads to the vanishing point corresponding to that object.
[0069] Next, the processor (100) can generate and store distance information of the space where the camera (200) is located based on the distance data of the calculated standard object and the perspective line slope (S900).
[0070] Specifically, the processor (100) can generate spatial distance information by distinguishing distance data according to the type and angle of standard objects.
[0071] And, the processor (100) can estimate the location of an object of interest located in the space using distance information of the generated space (S1000).
[0072] Specifically, the processor (100) can estimate the location of the object of interest of the perspective object and the standard object.
[0073] This will be explained with reference to Fig. 5.
[0074] FIG. 5 is an exemplary diagram showing spatial information according to one embodiment of the present invention.
[0075] FIG. 5 shows spatial information of the space where the camera (200) is located, and the processor (100) can estimate the location of the object of interest (43) using the perspective line of the perspective object (44) and the distance data of the standard objects (41, 42).
[0077] Hereinafter, the data calculation method of the distance data calculation system will be explained with reference to FIG. 6.
[0078] FIG. 6 is a timing diagram illustrating a method for calculating distance data according to an embodiment of the present invention.
[0079] Referring to FIG. 6, the camera (200) can photograph (S1001) at least one standard object located within the space where the camera (200) is located, and transmit the first image of the at least one standard object to the processor (100) (S1002).
[0080] Next, the processor (100) can recognize a standard object in the received first image to acquire first recognition data (S1003) and transmit a control command to the camera (200) to rotate it at a predetermined angle (S1004).
[0081] The camera (200) performs rotation control based on a control command, detects the rotation angle of the camera (200) rotated through an angle sensor (S1006), and can transmit the detected rotation angle to the processor (100). Here, the angle sensor may be a sensor located on the rotation axis of the camera (200) to detect minute rotation of the camera (200).
[0082] Additionally, a camera (200) rotated at a predetermined angle can capture at least one standard object (S1008) and transmit a second image in which at least one standard object is captured (S1009).
[0083] Next, the processor (100) can recognize a standard object in the received second image and obtain second recognition data (S1010), and calculate the pixel movement distance of the standard object based on the first recognition data and the second recognition data (S1011).
[0084] And, the processor (100) can calculate distance data of the standard object based on the pixel movement distance of the standard object (S1012).
[0085] Next, the processor (100) can recognize at least one perspective object included in the first image or the second image and calculate the perspective line slope of the perspective object (S1013).
[0086] And, the processor (100) can generate and store distance information based on the distance data of a standard object and the perspective line slope (S1014).
[0087] Next, the processor (100) can estimate the location of an object of interest within the space where the camera (200) is located based on distance information (S1015).
[0088] Meanwhile, although the present invention described above performs object recognition in the processor (100), in the case of a camera (200) that includes an object recognition function, the processor (100) may receive recognition data for standard objects and perspective objects from the camera (200) and calculate distance calculation data.
[0089] For example, the processor (100) may receive first recognition data in which a standard object is recognized in a first image containing at least one standard object from the camera (200), control the camera to rotate at a predetermined angle, receive second recognition data in which a standard object is recognized in a second image containing at least one standard object from the camera (200), and calculate distance data between the standard object and the camera (200) using the first recognition data and the second recognition data. In this case, except for the object recognition-related operation, it may be performed in the same way as the distance calculation data described above.
[0091] Next, the configuration of the processor (100) will be described with reference to FIG. 7.
[0092] FIG. 7 is a block diagram showing the configuration of a processor (100) according to one embodiment of the present invention.
[0093] Referring to FIG. 7, the processor (100) may include some or all of the communication unit (110), object recognition unit (120), image processing unit (130), database (140), and control unit (150).
[0094] The communication unit (110) can transmit and receive various data required by the processor (100).
[0095] Specifically, the communication unit (110) can receive a first image and a second image from the camera (200) or transmit a control command to the camera (200).
[0096] Additionally, the communication unit (110) may receive first recognition data and second recognition data corresponding to the first image and second image from a camera (200) that includes object recognition.
[0097] The object recognition unit (120) can recognize various objects within the image.
[0098] Specifically, the object recognition unit (120) can recognize standard objects in the received first image and second image and produce first recognition data and second recognition data.
[0099] Additionally, the object recognition unit (120) can recognize a perspective object in the first image or the second image and calculate a perspective line and a slope of the perspective line.
[0100] In addition, the object recognition unit (120) may use an object recognition model trained with standard objects and perspective objects having various angles and sizes as training data.
[0101] The image processing unit (130) can generate distance information of the space where the camera (200) is located.
[0102] Specifically, the image processing unit (130) can generate distance information of the space where the camera (200) is located based on the distance data of the standard object and the perspective line slope (S900). At this time, the image processing unit (130) can generate distance information of the space by distinguishing the distance data according to the type and angle of the standard object.
[0103] Various data required by the processor (100) can be stored in the database (140).
[0104] Specifically, the database (140) may store distance data of standard objects, an object recognition model, training data of the object recognition model, images, distance information, etc.
[0105] The control unit (150) can control the overall operation of the processor (100).
[0106] Specifically, the control unit (150) can control the communication unit (110) to receive an image.
[0107] Additionally, the control unit (150) can control the communication unit (110) to generate a control command to rotate the camera (200) and to transmit the generated control command to the camera (200).
[0108] The present invention described above can estimate the location of an object of interest within an image using an existing rotatable CCTV camera without the need for additional equipment such as lidar or depth cameras.
[0109] In addition, the present invention can more accurately estimate the location of an object of interest within an image by estimating the location of the object of interest using spatial distance information.
[0110] Furthermore, the various embodiments described herein may be implemented, for example, in a recording medium readable by a computer or similar device using software, hardware, or a combination thereof.
[0111] According to hardware implementation, the embodiments described herein may be implemented using at least one of ASICs (application specific integrated circuits), DSPs (digital signal processors), DSPDs (digital signal processing devices), PLDs (programmable logic devices), FPGAs (field programmable gate arrays), processors, controllers, microcontrollers, microprocessors, and other electrical units for performing functions. In some cases, the embodiments described herein may be implemented as the control module itself.
[0112] According to software implementation, embodiments such as the procedures and functions described herein may be implemented in separate software modules. Each of the software modules may perform one or more functions and operations described herein. Software code may be implemented as a software application written in a suitable programming language. The software code may be stored in a memory module and executed by a control module.
[0113] The above description is merely an illustrative explanation of the technical concept of the present invention, and those skilled in the art to which the present invention pertains will be able to make various modifications, changes, and substitutions within the scope of the essential characteristics of the present invention without departing from its nature.
[0114] Accordingly, the embodiments disclosed in this invention and the accompanying drawings are intended to illustrate, not limit, the technical concept of the invention, and the scope of the technical concept of the invention is not limited by such embodiments and accompanying drawings. The scope of protection of this invention shall be interpreted by the claims below, and all technical concepts within an equivalent scope shall be interpreted as being included within the scope of rights of this invention.
Claims
Claim 1 A method for calculating distance data of a processor comprises: receiving a first image containing at least one standard object from a camera; recognizing a standard object within the received first image and obtaining first recognition data; controlling the camera to rotate at a predetermined angle; receiving a second image containing at least one standard object from the camera rotated at the predetermined angle; recognizing a standard object within the received second image and obtaining second recognition data; and calculating distance data between the standard object and the camera using the first recognition data and the second recognition data; wherein the distance data calculation step further comprises: calculating a pixel displacement distance of the standard object based on the first recognition data and the second recognition data; and calculating distance data of the standard object based on the calculated pixel displacement distance of the standard object. Claim 2 A method for calculating distance data according to claim 1, wherein the standard object is an object having a certain size and is in a stationary state. Claim 3 delete Claim 4 A method for calculating distance data according to claim 1, wherein the step of calculating distance data of the standard object is characterized by calculating the distance data of the standard object using a rotation angle according to a predetermined angle rotation of the camera, a pixel displacement distance of the standard object, and an installation height of the camera. Claim 5 A method for calculating distance data according to claim 1, characterized in that the distance data of the standard object is the distance between the position where the camera is projected onto the floor surface and the position of the standard object. Claim 6 A method for calculating distance data according to claim 1, further comprising the step of generating distance information of the space where the camera is located based on the distance data of the calculated standard object. Claim 7 A method for calculating distance data according to claim 6, wherein the generating step is characterized by generating spatial distance information by classifying distance data according to the type and angle of the standard object. Claim 8 A method for calculating distance data according to claim 7, further comprising the step of estimating the location of an object of interest within the space based on the distance information. Claim 9 A method for calculating distance data of a processor comprises: receiving first recognition data in which a standard object is recognized in a first image containing at least one standard object from a camera; controlling the camera to rotate at a predetermined angle; receiving second recognition data in which a standard object is recognized in a second image containing at least one standard object from the camera rotated at the predetermined angle; and calculating distance data between the standard object and the camera using the first recognition data and the second recognition data; wherein the distance data calculation step further comprises: a step of calculating the pixel displacement distance of the standard object based on the first recognition data and the second recognition data; and a step of calculating the distance data of the standard object based on the calculated pixel displacement distance of the standard object. Claim 10 A program recorded on a computer-readable recording medium having program code recorded thereon for executing a distance data calculation method according to any one of claims 1, 2, and 4 through 9. Claim 11 A computer-readable recording medium storing a program that performs a distance data calculation method according to any one of claims 1, 2, and 4 through 9.