[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN110460769B - Image correction method, image correction device, computer equipment and storage medium - Google Patents

Image correction method, image correction device, computer equipment and storage medium Download PDF

Info

Publication number
CN110460769B
CN110460769B CN201910603625.XA CN201910603625A CN110460769B CN 110460769 B CN110460769 B CN 110460769B CN 201910603625 A CN201910603625 A CN 201910603625A CN 110460769 B CN110460769 B CN 110460769B
Authority
CN
China
Prior art keywords
image
target object
corrected
scene image
camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910603625.XA
Other languages
Chinese (zh)
Other versions
CN110460769A (en
Inventor
谢贤能
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN201910603625.XA priority Critical patent/CN110460769B/en
Publication of CN110460769A publication Critical patent/CN110460769A/en
Application granted granted Critical
Publication of CN110460769B publication Critical patent/CN110460769B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

The application relates to an image rectification method, an image rectification device, a computer device and a storage medium. The method comprises the following steps: the method comprises the steps of obtaining a scene image shot by a camera, determining a correction parameter of the scene image according to a camera installation parameter when a target object is detected in the scene image, correcting the scene image according to the correction parameter and a central point of the scene image, and obtaining a corrected image of the target object from the corrected scene image. By adopting the method, the complexity and the cost of image correction can be reduced, and the image correction of each target object in the scene image is realized.

Description

Image correction method, image correction device, computer equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image rectification method and apparatus, a computer device, and a storage medium.
Background
A camera is an optical instrument that forms an image using an optical imaging principle and records the image using a photosensitive element. After light reflected by a shot object is focused through a lens (a shot object lens) and a shutter for controlling exposure, the shot object forms an image on a photosensitive component in a camera dark box, the photosensitive component converts an optical signal into an electrical signal, and the electrical signal is subjected to analog-to-digital conversion to form video image data.
The existing camera is often used for oblique photography in actual use, a photosensitive plane is not parallel to a photographed target such as a photographed person and a photographed vehicle, and a certain angle is formed, so that a photographed image has certain deformation relative to an actual image of the photographed target. In the field of video monitoring, a video image shot by a camera is deformed, which may result in failure to correctly identify a shot target. In the industrial production process, the deformation of the product video image shot by the camera can increase the error of product quality inspection. At present, an off-angle shooting mode is generally adopted to solve the problem of image deformation. However, the declination photography method requires a professional camera and a professional photography technique, is expensive and complicated to operate, and is not suitable for a fixed-mount surveillance camera.
Disclosure of Invention
In view of the above, it is desirable to provide an image correction method, an apparatus, a computer device, and a storage medium capable of reducing the complexity of image distortion correction in response to the above-described technical problems.
A method of image rectification, the method comprising:
acquiring a scene image shot by a camera;
when a target object is detected in the scene image, determining a correction parameter of the scene image according to a camera installation parameter;
correcting the scene image according to the correction parameters and the central point of the scene image;
and acquiring a corrected image of the target object from the corrected scene image.
In one embodiment, the step of determining the correction parameter of the scene image according to the camera installation parameter includes:
determining the inclination angle of an imaging plane of the camera according to the installation angle of the camera;
and setting the inclination angle as a correction angle of the scene image.
In one embodiment, the step of rectifying the scene image according to the rectification parameter and the central point of the scene image includes:
rotating the scene image according to the correction angle of the scene image by taking the central point of the scene image as a rotation center;
and performing shape adjustment and size adjustment on the rotated scene image.
In one embodiment, the step of determining the correction parameters of the scene image according to the camera installation parameters when the target object is detected in the scene image comprises:
when the target object is detected on the scene image, acquiring image information of the target object in the scene image, and setting the image information as an image to be corrected of the target object;
and determining the correction parameters of the image to be corrected according to the camera installation parameters.
In one embodiment, the step of determining the correction parameter of the image to be corrected according to the camera installation parameter includes:
determining the inclination angle of an imaging plane of the camera according to the installation angle of the camera;
determining a central point of the target object in the image to be corrected;
and determining the correction angle of the image to be corrected according to the included angle, the central point of the scene image and the central point of the target object.
In one embodiment, the step of rectifying the scene image according to the rectification parameter and the central point of the scene image includes:
rotating the image to be corrected according to the correction angle of the image to be corrected by taking the central point of the target object as a rotation center;
the step of obtaining a corrected image of the target object from the corrected scene image includes:
and carrying out shape adjustment and size adjustment on the rotated image to be corrected to obtain a corrected image of the target object.
In one embodiment, the step of acquiring image information of the target object in the scene image when the target object is detected in the scene image, and setting the image information as an image to be corrected of the target object includes:
when the target object is detected in the scene image, acquiring adjacent frame images of a preset number of frames of the scene image;
acquiring image information of the target object in each frame of the scene image and the adjacent frame of image and setting the image information as a candidate image;
and screening out an image to be corrected of the target object from the candidate image.
An image rectification apparatus, the apparatus comprising:
the scene image acquisition module is used for acquiring a scene image shot by the camera;
the correction parameter determining module is used for determining correction parameters of the scene image according to camera installation parameters when a target object is detected in the scene image;
the image correction module is used for correcting the scene image according to the correction parameters and the central point of the scene image; and
and the target image acquisition module is used for acquiring a corrected image of the target object from the corrected scene image.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the image rectification method when the processor executes the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the image rectification method described above.
According to the image correction method, the device, the computer equipment and the storage medium, when the target object in the scene image is detected, the correction parameter of the scene image is determined according to the camera installation parameter, the scene image is corrected according to the correction parameter and the central point of the scene image to obtain the corrected scene image, and the corrected image of the target object is obtained from the corrected scene image, so that under the condition that a complex professional shooting method and a high-cost professional camera are not needed, the correction of each target object in the image is realized, the complexity and the cost of image correction are effectively reduced, and the equipment range applicable to image correction is improved.
Drawings
FIG. 1 is a diagram illustrating an exemplary embodiment of an image rectification method;
FIG. 2 is a flow chart illustrating an exemplary image rectification method;
FIG. 3 is an exemplary diagram of a scene in which a camera captures an image of the scene in one embodiment;
FIG. 4 is a flowchart illustrating an image rectification method according to another embodiment;
FIG. 5 is a block diagram showing the structure of an image correction apparatus according to an embodiment; and
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The image rectification method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 receives the video and images captured by the camera and stores the video and images on a local hard disk or sends the video and images to the server 104 for storage. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and camera devices, the camera devices may be, but is not limited to, a gun camera, a dome camera, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, an image rectification method is provided, which is described by taking the method as an example applied to the terminal in fig. 1, and includes the following steps:
step 202, acquiring a scene image shot by a camera.
Among them, the shooting direction of the camera is usually inclined in various shooting scenes, and the inclination is upward or downward. For example, in a monitoring scene, the camera is fixedly installed on a wall or a fixed support, and the shooting direction of the camera is inclined downwards, so that the camera can accurately monitor a designated ground area. The scene image can be a single image shot by the camera and can also be an image frame in a video code stream shot by the camera. When the shooting direction of the camera is inclined, the photosensitive component and the imaging plane of the camera are also inclined, and the distances from the top and the bottom of an object in a scene to the imaging plane are different, so that the object in a scene image is distorted.
As an example, as shown in fig. 3, the camera (the camera in fig. 3) includes a photosensitive component and a lens, the position of the photosensitive component is a focal position of the camera, a plane of the focal position is an imaging plane, and light is focused on the photosensitive component along a main optical axis during imaging. The shooting target in front of the lens is a human body, the head of the shooting target is closer to the imaging plane than the feet of the shooting target are to the imaging plane due to the fact that the imaging plane is inclined downwards, the size of the head image is enlarged, the size of the feet of the shooting target is reduced, and the image of the shooting target is distorted.
And step 204, when the target object is detected in the scene image, determining the correction parameters of the scene image according to the camera installation parameters.
The target object is a shooting object (also referred to as a monitoring object) of the camera.
Specifically, the distortion of each target object in the scene image may increase the information error of the scene image, affect the recognition accuracy of the target object, and further affect the shooting and monitoring effects of the camera. Therefore, when the scene image shot by the camera is obtained, the target object is detected in the scene image, and when the target object is detected to exist in the scene image, the target object is further corrected.
Specifically, because the distortion of the target object is related to the oblique shooting of the camera, when the target object in the scene image is detected, the camera installation parameters of the camera can be obtained, the inclination degree of the scene image can be known according to the camera installation parameters, and then the corresponding correction parameters can be determined, so that the obliquely shot scene image can be restored, and the correction of the target object can be realized.
The camera installation parameters can be written into the memory by a user during installation and directly read from the memory during correction. If the camera is installed on the cloud platform, can read camera installation parameter from the cloud platform.
And step 206, correcting the scene image according to the correction parameters and the central point of the scene image.
Specifically, after the correction parameters are obtained, the center point of the scene image is determined. And adjusting the scene image according to the correction parameters by taking the central point of the scene image as a fixed point.
Step 208, a rectified image of the target object is acquired from the rectified scene image.
Specifically, after the scene image is corrected, the target object detection may be performed again in the scene image to obtain the image position of the target object in the corrected scene image, and the corrected image of the target object may be obtained from the corrected scene image according to the image position of the target object, so that the user may view the corrected images of various target objects respectively.
In the image correction method, when the target object is detected in the scene image, the correction parameter of the scene image is determined according to the camera installation parameter, the scene image is corrected according to the correction parameter, and the corrected image of the target object is obtained from the corrected scene image, so that the image correction is realized under the condition that a professional shooting method and a professional camera are not needed, the complexity and the cost of the image correction are reduced, the equipment range applicable to an image correction algorithm is improved, and the method is particularly suitable for fixing the camera obliquely installed on a wall or a fixed support.
In one embodiment, the target object includes a dynamic object such as a person, a vehicle, an animal, and the like, and may also include a static object such as a guideboard, a doorplate, and the like, which have a rich information content, so that both the dynamic object and the static object in the scene image can be corrected, and the image effect of the target object captured by the camera is improved.
In one embodiment, when detecting a target object in a scene image, the image features of the scene image may be matched with the image features of various types of target objects in a preset feature library to detect all target objects appearing in the scene image. The particular feature matching method is not limited herein.
In one embodiment, the camera mounting parameter includes a camera mounting angle, which may also be referred to as a camera pitch angle when a shooting direction of the camera is tilted downward. The camera installation angle can be the back of camera and the contained angle of vertical direction or horizontal direction, also can be the camera lens of camera and the contained angle of vertical direction or horizontal direction to through the camera installation parameter of being convenient for acquire, reduce the complexity of image correction, improve image correction efficiency.
In one embodiment, the inclination angle of the imaging plane of the camera can be obtained according to the installation angle of the camera and the position of the photosensitive component inside the camera. For example, when the plane where the photosensitive component is located is parallel to the back surface of the camera, the included angle between the imaging plane of the camera and the vertical direction is the included angle between the back surface of the camera and the vertical direction. The inclination angle of the imaging plane is an included angle between the imaging plane and a plane (usually a vertical plane) where a target object is located in an actual scene, and when the imaging plane is parallel to the plane where the target object is located (the included angle is zero), the camera does not have the condition of inclined shooting, and the target object in the scene image is not distorted. Therefore, the inclination angle of the imaging plane reflects the distortion degree of the target object in the scene image, the scene image can be effectively corrected according to the inclination angle, and the complexity of image correction is effectively reduced.
In one embodiment, after the inclination angle of the imaging plane is obtained, the inclination angle is set as a correction angle of the scene image, and the scene image is rotated according to the correction angle of the scene image with the central point of the scene image as a rotation center, so that the correction of the scene image is effectively realized. The rotation direction of the scene image can be specified in advance, so that the scene image is rotated towards the rotation direction by the correction angle and then is recovered to the scene image shot when the imaging plane of the camera is parallel to the target object in the actual scene.
In one embodiment, the camera installation parameters may further include a camera installation height, which is a distance from the camera to the ground, and a camera shooting distance, which is a distance from an installation position of the camera to a scene area shot by the camera. According to the installation height of the camera, the shooting distance of the camera and the installation angle of the camera, the direction of the main optical axis of the camera can be obtained more accurately, and according to the fact that the imaging plane of the camera is perpendicular to the direction of the main optical axis, the inclination angle of the imaging plane can be obtained.
In one embodiment, after rotating the scene image, the shape and size of the scene image may change, for example, from a rectangle to a trapezoid with a longer top and a shorter bottom. Therefore, after the scene image is rotated, the shape and the size of the scene image are adjusted to obtain the scene image with the preset size and the preset shape, so that the correction effect of the scene image is improved.
In one embodiment, as shown in fig. 4, an image rectification method is provided, which is described by taking the method as an example applied to the terminal in fig. 1, and includes the following steps:
and step 402, acquiring a scene image shot by a camera.
Specifically, step 402 may refer to the description of step 202, and is not repeated herein.
And step 404, when the target object is detected in the scene image, acquiring image information of the target object in the scene image, and setting the image information as an image to be corrected of the target object.
Specifically, a target object is detected in a scene image, when the target object is detected, image information of the target object is extracted from the scene image, image information of each target object appearing in the scene image is obtained, and the image information of each target object is set as an image to be corrected of the target object, so that each image to be corrected is corrected respectively, and the image correction effect of the target object is improved.
And step 406, determining the inclination angle of the imaging plane of the camera according to the installation angle of the camera.
Specifically, the camera installation angle may be an included angle between the back of the camera and the vertical direction or the horizontal direction, or an included angle between the lens of the camera and the vertical direction or the horizontal direction, and according to the camera installation angle and the position of the photosensitive component inside the camera, the inclination angle of the imaging plane of the camera can be obtained. The inclination angle of the imaging plane is an included angle of the imaging plane relative to a plane where a target object in the actual scene is located.
In step 408, a center point of the target object is determined in the image to be rectified.
Specifically, the size of the image to be corrected may be acquired, the center point of the image to be corrected may be determined according to the size, and the center point of the image to be corrected may be set as the center point of the target object. Or, the edge of the target object may be detected in the image to be corrected, the contour of the target object is obtained, the central point of the contour is determined, and the central point of the contour is set as the central point of the target object.
And step 410, determining the correction angle of the image to be corrected according to the inclination angle, the central point of the scene image and the central point of the target object.
Specifically, the center point of the scene image, that is, the center of the imaging plane, is located on the main optical axis, and the inclination angle of the imaging plane, that is, the correction angle of the scene image, rotates the scene image according to the correction angle of the scene image with the center point of the scene image as the rotation center, thereby completing the correction of the scene image. However, the positions of the target objects in the scene image are different, the distortion degrees are also different, and the integral rotation of the scene image may not ensure that each target object obtains a good correction effect. Therefore, after the central point of the target object is obtained, the distance between the central point of the scene image in the scene image and the central point of the target object is determined, and the correction angle of the image to be corrected of the target object is determined according to the distance and the inclination angle of the imaging plane.
In one embodiment, when the correction angle of the image to be corrected of the target object is determined according to the distance between the center point of the scene image and the center point of the target object and the inclination angle of the imaging plane, corresponding relations between different distances and angle increments are preset, the angle increment corresponding to the distance between the center point of the scene image and the center point of the target object is searched in the corresponding relations, the inclination angle of the imaging plane is added to the angle increment to obtain the correction angle of the image to be corrected of the target object, and therefore the image correction effect of each target object is effectively improved. The greater the distance between the center point of the scene image and the center point of the target object, the greater the corresponding angle increment.
And step 412, rotating the image to be corrected according to the correction angle of the image to be corrected by taking the central point of the target object as a rotation center.
Specifically, the center point of the target object is used as a rotation center, and the image to be corrected of the target object is rotated according to the correction angle of the image to be corrected of the target object, so that the image correction of each target object appearing in the scene image is effectively realized. The rotation direction of the image to be corrected can be specified in advance, so that the image to be corrected can be rotated towards the rotation direction by the correction angle, and then the image to be corrected can be restored to the target image obtained by shooting when the imaging plane of the camera is parallel to the target object in the actual scene.
And step 414, performing shape adjustment and size adjustment on the rotated image to be corrected to obtain a corrected image of the target object.
Specifically, after the image to be corrected is rotated, shape adjustment and size adjustment are performed on the image to be corrected, so that a scene image to be corrected with a preset size and a preset shape is obtained, and the image correction effect of each target object is improved.
According to the image correction method, when the target object is detected in the scene image, the image to be corrected of each target object is determined, the inclination angle of the imaging plane is determined according to the installation angle of the camera, and the correction angle of the image to be corrected of each target object is determined according to the inclination angle of the imaging plane, the central point of the scene image and the central point of the target object, so that the image correction is respectively carried out on each target object in the scene image, and the image correction effect is improved while the complexity and the cost of the image correction are reduced.
In one embodiment, when a target object is detected in a scene image, adjacent frame images of a preset number of frame scene images are acquired, image information of the target object is acquired in each frame image of the scene image and the adjacent frame images respectively and is set as candidate images of the target object, and images to be corrected of the target object are screened out in all the candidate images of the target object according to image quality, so that the image quality of the images to be corrected is ensured, and the correction effect of the target object is further improved.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided an image rectification apparatus 500 including: a scene image acquisition module 502, a correction parameter determination module 504, an image correction module 506, and a target image acquisition module 508, wherein:
a scene image obtaining module 502, configured to obtain a scene image captured by a camera;
a correction parameter determining module 504, configured to determine, when a target object is detected in a scene image, a correction parameter of the scene image according to a camera installation parameter;
an image rectification module 506, configured to rectify the scene image according to the rectification parameter and a central point of the scene image; and
and a target image obtaining module 508, configured to obtain a corrected image of the target object from the corrected scene image.
In the image correction device, when the target object is detected in the scene image, the correction parameter of the scene image is determined according to the camera installation parameter, the scene image is corrected according to the correction parameter, and the corrected image of the target object is obtained from the corrected scene image, so that the image correction is realized under the condition that a professional shooting method and a professional camera are not needed, the complexity and the cost of the image correction are reduced, the equipment range applicable to an image correction algorithm is improved, and the image correction device is particularly suitable for fixing the camera obliquely installed on a wall or a fixed support.
In one embodiment, the correction parameter determination module 404 includes:
the first inclination angle determining module is used for determining the inclination angle of an imaging plane of the camera according to the installation angle of the camera; and
and the first correction angle determining module is used for setting the inclination angle as the correction angle of the scene image.
In one embodiment, the image rectification module 506 includes:
the scene image rotation module is used for rotating the scene image by taking the central point of the scene image as a rotation center according to the correction angle of the scene image; and
and the scene image adjusting module is used for adjusting the shape and the size of the rotated scene image.
In one embodiment, the correction parameter determination module 504 includes:
the target object acquisition module is used for acquiring image information of the target object in the scene image and setting the image information as an image to be corrected of the target object when the target object is detected in the scene image; and
and the correction parameter determining submodule is used for determining the correction parameters of the image to be corrected according to the installation parameters of the camera.
In one embodiment, the correction parameter determination sub-module includes:
the second inclination angle determining module is used for determining the inclination angle of the imaging plane of the camera according to the installation angle of the camera;
the target central point determining module is used for determining the central point of a target object in the image to be corrected; and
and the second correction angle determining module is used for determining the correction angle of the image to be corrected according to the inclination angle and the position relation between the central point of the scene image and the central point of the target object.
In one embodiment, the image rectification module 506 includes:
the target image rotation module is used for rotating the image to be corrected by taking the central point of the target object as a rotation center according to the correction angle of the image to be corrected;
the target image acquisition module 508 includes:
and the target image correction module is used for adjusting the shape and the size of the rotated image to be corrected to obtain a corrected image of the target object.
In one embodiment, the target object acquisition module comprises:
the adjacent image acquisition module is used for acquiring adjacent frame images of a preset number of frame scene images when a target object is detected in the scene images;
the candidate image acquisition module is used for acquiring the image information of the target object in each frame of image in the scene image and the adjacent frame of image and setting the image information as a candidate image; and
and the target image screening module is used for screening the image to be corrected of the target object from the candidate image.
For specific limitations of the image rectification device, reference may be made to the above limitations of the image rectification method, which will not be described herein again. The respective modules in the above-described image correction apparatus may be entirely or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing data such as images and videos shot by the camera. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an image rectification method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory in which a computer program is stored and a processor, which when executing the computer program performs the steps of the above-described method embodiments.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (6)

1. An image rectification method, characterized in that the method comprises:
acquiring a scene image shot by a camera;
when a target object is detected in the scene image, acquiring image information of the target object in the scene image, setting the image information as an image to be corrected of the target object, and determining an inclination angle of an imaging plane of the camera according to the installation height, the shooting distance and the installation angle of the camera;
determining a central point of the target object in the image to be corrected;
determining a correction angle of the image to be corrected according to the inclination angle, the central point of the scene image and the central point of the target object;
and correcting the image to be corrected according to the correction angle and the central point of the target object to obtain a corrected image of the target object.
2. The method according to claim 1, wherein the step of obtaining the corrected image of the target object by correcting the image to be corrected according to the correction angle and the central point of the target object comprises:
rotating the image to be corrected according to the correction angle of the image to be corrected by taking the central point of the target object as a rotation center;
and carrying out shape adjustment and size adjustment on the rotated image to be corrected to obtain a corrected image of the target object.
3. The method according to claim 1, wherein the step of acquiring image information of the target object in the scene image when the target object is detected in the scene image, and setting the image information as an image to be corrected of the target object comprises:
when the target object is detected in the scene image, acquiring a preset number of adjacent frame images of the scene image;
acquiring image information of the target object in each frame of the scene image and the adjacent frame of image and setting the image information as a candidate image;
and screening out an image to be corrected of the target object from the candidate image.
4. An image rectification apparatus, characterized in that the apparatus comprises:
the scene image acquisition module is used for acquiring a scene image shot by the camera;
the correction parameter determining module comprises a target object obtaining module and a correction parameter determining submodule; the target object acquisition module is used for acquiring image information of a target object in the scene image when the target object is detected in the scene image, and setting the image information as an image to be corrected of the target object; the correction parameter determining submodule is used for determining an inclination angle of an imaging plane of the camera according to the installation height, the shooting distance and the installation angle of the camera, determining a central point of the target object in the image to be corrected, and determining a correction angle of the image to be corrected according to the inclination angle, the central point of the scene image and the central point of the target object; and the number of the first and second groups,
and the image correction module is used for correcting the image to be corrected according to the correction angle and the central point of the target object to obtain a corrected image of the target object.
5. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 3.
CN201910603625.XA 2019-07-05 2019-07-05 Image correction method, image correction device, computer equipment and storage medium Active CN110460769B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910603625.XA CN110460769B (en) 2019-07-05 2019-07-05 Image correction method, image correction device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910603625.XA CN110460769B (en) 2019-07-05 2019-07-05 Image correction method, image correction device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110460769A CN110460769A (en) 2019-11-15
CN110460769B true CN110460769B (en) 2021-08-17

Family

ID=68482165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910603625.XA Active CN110460769B (en) 2019-07-05 2019-07-05 Image correction method, image correction device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110460769B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110930336B (en) * 2019-11-29 2023-11-28 深圳市商汤科技有限公司 Image processing method and device, electronic equipment and storage medium
CN110929684B (en) * 2019-12-09 2023-04-18 北京光年无限科技有限公司 Content identification method and device for picture book
CN111158563A (en) * 2019-12-11 2020-05-15 青岛海信移动通信技术股份有限公司 Electronic terminal and picture correction method
CN111210482B (en) * 2020-02-24 2024-03-05 高新兴科技集团股份有限公司 Real-time correction method for video image of camera, computer storage medium and equipment
CN111507908B (en) * 2020-03-11 2023-10-20 平安科技(深圳)有限公司 Image correction processing method, device, storage medium and computer equipment
CN113348464A (en) * 2021-04-30 2021-09-03 华为技术有限公司 Image processing method and device
CN116739908A (en) * 2022-03-02 2023-09-12 华为技术有限公司 Image processing method, device and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1799252A (en) * 2003-06-02 2006-07-05 卡西欧计算机株式会社 Captured image projection apparatus and captured image correction method
CN1909590A (en) * 2005-08-04 2007-02-07 卡西欧计算机株式会社 Image-capturing apparatus, image correction method and program
CN101543054A (en) * 2007-06-28 2009-09-23 松下电器产业株式会社 Image processing device, image processing method, and program
CN101690166A (en) * 2007-06-27 2010-03-31 松下电器产业株式会社 Imaging apparatus, method, system integrated circuit, and program
CN103856705A (en) * 2012-12-03 2014-06-11 三星电子(中国)研发中心 Image rectification method and system
CN105027556A (en) * 2013-01-30 2015-11-04 微软技术许可有限责任公司 Auto picture alignment correction

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002354331A (en) * 2001-05-25 2002-12-06 Canon Inc Imaging equipment and electronic component
FR2868184B1 (en) * 2004-03-23 2006-06-02 Realeyes3D Sa METHOD FOR PRESENTING AN IMAGE ACCORDING TO A DESIRED VIEW ANGLE, FROM AN IMAGE TAKEN UNDER ANY INCIDENCE

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1799252A (en) * 2003-06-02 2006-07-05 卡西欧计算机株式会社 Captured image projection apparatus and captured image correction method
CN1909590A (en) * 2005-08-04 2007-02-07 卡西欧计算机株式会社 Image-capturing apparatus, image correction method and program
CN101690166A (en) * 2007-06-27 2010-03-31 松下电器产业株式会社 Imaging apparatus, method, system integrated circuit, and program
CN101543054A (en) * 2007-06-28 2009-09-23 松下电器产业株式会社 Image processing device, image processing method, and program
CN103856705A (en) * 2012-12-03 2014-06-11 三星电子(中国)研发中心 Image rectification method and system
CN105027556A (en) * 2013-01-30 2015-11-04 微软技术许可有限责任公司 Auto picture alignment correction

Also Published As

Publication number Publication date
CN110460769A (en) 2019-11-15

Similar Documents

Publication Publication Date Title
CN110460769B (en) Image correction method, image correction device, computer equipment and storage medium
CN109977770B (en) Automatic tracking shooting method, device, system and storage medium
US8861806B2 (en) Real-time face tracking with reference images
US7460695B2 (en) Real-time face tracking in a digital image acquisition device
US8982180B2 (en) Face and other object detection and tracking in off-center peripheral regions for nonlinear lens geometries
US8723959B2 (en) Face and other object tracking in off-center peripheral regions for nonlinear lens geometries
CN110536068B (en) Focusing method and device, electronic equipment and computer readable storage medium
JP5074322B2 (en) Image processing apparatus, image processing method, image processing program, and imaging apparatus
WO2020253618A1 (en) Video jitter detection method and device
CN111885301A (en) Gun and ball linkage tracking method and device, computer equipment and storage medium
US6181345B1 (en) Method and apparatus for replacing target zones in a video sequence
CN110555377B (en) Pedestrian detection and tracking method based on fish eye camera overlooking shooting
CN112954315A (en) Image focusing measurement method and system for security camera
US20190320166A1 (en) Calibration system and method
CN112272267A (en) Shooting control method, shooting control device and electronic equipment
EP4036851A1 (en) Method and image-processing device for evaluating an alignment of stitched images
US20210133983A1 (en) Trajectory Calculation Device, Trajectory Calculating Method, and Trajectory Calculating Program
CN117716702A (en) Image shooting method and device and movable platform
AU2009230796A1 (en) Location-based brightness transfer function
CN112585946A (en) Image shooting method, image shooting device, movable platform and storage medium
KR102186751B1 (en) Apparatus and method for improving multiple recognition and recognition rate of classification using object detection
CN102457657A (en) Camera device and method for carrying out human type detection by using the same
CN114979607B (en) Image processing method, image processor and electronic equipment
CN114049651A (en) Object detection method and device, electronic equipment and storage medium
US12141940B2 (en) Method and image-processing device for evaluating an alignment of stitched images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant