CN112053297A - Image angle adjusting method and device, computer equipment and storage medium - Google Patents

Image angle adjusting method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112053297A
CN112053297A CN202010872014.8A CN202010872014A CN112053297A CN 112053297 A CN112053297 A CN 112053297A CN 202010872014 A CN202010872014 A CN 202010872014A CN 112053297 A CN112053297 A CN 112053297A
Authority
CN
China
Prior art keywords
image
angle
camera
specified target
specified
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.)
Pending
Application number
CN202010872014.8A
Other languages
Chinese (zh)
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.)
Shenzhen Smdt Technology Co ltd
Original Assignee
Shenzhen Smdt 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 Shenzhen Smdt Technology Co ltd filed Critical Shenzhen Smdt Technology Co ltd
Priority to CN202010872014.8A priority Critical patent/CN112053297A/en
Publication of CN112053297A publication Critical patent/CN112053297A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • 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)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses an image angle adjusting method, which comprises the following steps: the camera shoots a specified target and forms a first image, wherein the camera and the specified target are set according to a specified standard; acquiring an imaging angle of the specified target in the first image; calculating an image adjusting angle according to the imaging angle and a preset imaging angle; storing the image adjustment angle; and adjusting the subsequent images shot by the camera according to the image adjustment angle. The image angle adjusting method can calculate the image adjusting angle of the camera by only shooting the specified target once, and adjust all the images shot by the camera subsequently according to the image adjusting angle so as to adjust the images to the correct angle, and is very simple and practical.

Description

Image angle adjusting method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of imaging, and in particular, to an image angle adjustment method, apparatus, computer device, and storage medium.
Background
When the camera device is produced in a production workshop, the installation of the camera has the condition of angular deviation and is not installed in place, so that the image shot by the camera can also deviate at a certain angle when being displayed on a display terminal, and the imaging quality of the camera is influenced.
Disclosure of Invention
The invention mainly aims to provide an image angle adjusting method, an image angle adjusting device, computer equipment and a storage medium, so as to solve the problem that the angle of a shot image is deviated due to the fact that a camera cannot be installed.
The technical scheme of the invention is as follows:
an image angle adjusting method, wherein an image is formed by shooting through a camera, comprises the following steps:
the method comprises the following steps that a camera shoots a specified target and forms a first image, wherein the camera and the specified target are set according to specified specifications;
acquiring an imaging angle of a specified target in a first image;
calculating an image adjusting angle according to the imaging angle and a preset imaging angle;
storing the image adjustment angle;
and adjusting the subsequent images shot by the camera according to the image adjustment angle.
Further, the target is the face of the designated person; specifying the specification includes: arranging a camera in front of an appointed person, and enabling the appointed person to look at the camera;
before the step of acquiring the imaging angle of the specified target in the first image, the method comprises the following steps:
setting a reference line in the first image;
the step of acquiring the imaging angle of the specified target in the first image comprises the following steps:
carrying out face recognition on the first image;
acquiring a connecting line between two eyes of the face of a specified person in the first image;
acquiring a first included angle between the connecting line and the datum line; the first included angle is an imaging angle of the designated target in the first image.
Further, after the step of setting the reference line in the first image and before the step of acquiring the imaging angle of the designated target in the first image, the method comprises the following steps:
setting a preset first straight line in the first image;
acquiring a second included angle between a preset first straight line and a datum line; the second included angle is a preset imaging angle.
Further, before the step of shooting the designated target by the camera and forming the first image, the method comprises the following steps:
acquiring a first preview image of a camera;
acquiring position information of a specified target in a first preview image;
calculating a position adjustment value of the camera according to the position information and preset position information;
and adjusting the position of the camera according to the position adjustment value, so that the camera and the specified target reach the specified specification.
Further, before the step of shooting the designated target by the camera and forming the first image, the method comprises the following steps:
acquiring a second preview image of the camera;
acquiring the area ratio of the specified target in the second preview image;
calculating an image amplification coefficient adjustment value of the camera according to the area ratio and a preset area ratio;
and adjusting the image amplification coefficient of the camera according to the distance adjustment value, so that the camera and the specified target reach the specified standard.
The present invention also provides an image angle adjusting apparatus, comprising:
the shooting module is used for shooting a specified target and forming a first image, wherein the shooting module and the specified target are arranged according to a specified specification;
the first acquisition module is used for acquiring the imaging angle of the specified target in the first image;
the angle calculation module is used for calculating an image adjustment angle according to the imaging angle and a preset imaging angle;
the storage module is used for storing the image adjustment angle;
and the angle adjusting module is used for adjusting the images shot subsequently by the shooting module according to the image adjusting angle.
Further, the target is the face of the designated person; specifying the specification includes: arranging a shooting module in front of an appointed person, and enabling the appointed person to look at a camera;
further, the image angle adjusting apparatus further includes:
the first setting module is used for setting a datum line in the first image;
the first acquisition module includes:
the face recognition unit is used for carrying out face recognition on the first image;
a first acquisition unit configured to acquire a connection line between two eyes of a face of a specified person in the first image;
the second acquisition unit is used for acquiring a first included angle between the connecting line and the datum line; the first included angle is an imaging angle of the designated target in the first image.
Further, the image angle adjusting apparatus further includes:
the second setting module is used for setting a preset first straight line in the first image;
the second acquisition module is used for acquiring a second included angle between the preset first straight line and the datum line; the second included angle is a preset imaging angle.
The invention also provides computer equipment which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the image angle adjusting method when executing the computer program.
The present invention also provides a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described image angle adjustment method.
The invention provides an image angle adjusting method, wherein an image is formed by shooting through a camera, and the method comprises the following steps: the method comprises the following steps that a camera shoots a specified target and forms a first image, wherein the camera and the specified target are set according to specified specifications; acquiring an imaging angle of a specified target in a first image; calculating an image adjusting angle according to the imaging angle and a preset imaging angle; storing the image adjustment angle; and adjusting the subsequent images shot by the camera according to the image adjustment angle. The image angle adjusting method can calculate the image adjusting angle of the camera by only shooting the specified target once, and adjust all the images shot by the camera subsequently according to the image adjusting angle so as to adjust the images to the correct angle, and is very simple and practical.
Drawings
FIG. 1 is a schematic diagram illustrating an image shift and an image non-shift in an image angle adjustment method according to the present invention;
FIG. 2 is a flowchart illustrating an image angle adjustment method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating an image angle adjusting method according to a second embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an image angle adjustment apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", and the like, indicate orientations and positional relationships based on those shown in the drawings, and are used only for convenience of description and simplicity of description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be considered as limiting the present invention. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; they may be mechanically coupled, directly coupled, or indirectly coupled through intervening agents, both internally and/or in any other manner known to those skilled in the art. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, "above" or "below" a first feature means that the first and second features are in direct contact, or that the first and second features are not in direct contact but are in contact with each other via another feature therebetween. Also, the first feature being "on," "above" and "over" the second feature includes the first feature being directly on and obliquely above the second feature, or merely indicating that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature includes the first feature being directly above and obliquely above the second feature, or simply meaning that the first feature is at a lesser level than the second feature.
For a camera which is not installed in place and has an installation offset angle in the production process, the image shot by the camera can also have corresponding angular offset, which is specifically shown in the way that an object in the image shot by the camera can have a certain angular inclination. For example, in fig. 1, the side a is an image formed by taking an upright body with a camera attached in place and without an attachment offset angle, and the side b is an image formed by taking an upright body with a camera attached in place and with an attachment offset angle. Therefore, the present invention provides an image angle adjusting method, which corrects an image captured by a camera that is not mounted in place, so that the corrected image can be displayed in a manner of side a in fig. 1.
The first embodiment is as follows:
referring to fig. 2, an image angle adjustment method proposed in this embodiment is an image angle adjustment method, where an image is captured by a camera, and the method includes:
s1: the method comprises the following steps that a camera shoots a specified target and forms a first image, wherein the camera and the specified target are set according to specified specifications;
s2: acquiring an imaging angle of a specified target in a first image;
s3: calculating an image adjusting angle according to the imaging angle and a preset imaging angle;
s4: storing the image adjustment angle;
s5: and adjusting the subsequent images shot by the camera according to the image adjustment angle.
In this embodiment, the preset imaging angle is an imaging angle corresponding to the designated target in the first image when the camera is mounted in place. When the camera is not installed in place and has an offset angle, the camera shoots a specified target to form a first image, the imaging angle of the specified target is different from the preset imaging angle, and the specified target and the preset imaging angle have an angle deviation. According to the method and the device, the imaging angle of the specified target in the first image is obtained, the imaging angle is compared with the preset imaging angle, the angle deviation is calculated, namely the image adjusting angle corresponding to the camera is obtained, and the subsequent images shot by the camera are adjusted according to the image adjusting angle, so that the shot object in the adjusted images can be presented at a correct angle.
The image angle adjusting method can calculate the image adjusting angle of the camera by only shooting the specified target once, and adjust all the images shot by the camera subsequently according to the image adjusting angle so as to adjust the images to the correct angle, and is very simple and practical.
In the present invention, the designated target may be various, such as a straight pencil, a human face, a cup, and the like. These articles have a significant tilt angle in the image formed by taking a photograph using a camera with a mounting offset angle.
Example two:
in this embodiment, the designated target is a face of a designated person. The above-mentioned specification includes: the camera is arranged in front of the appointed person, and the appointed person looks at the camera. The designated person may select a person with stereotactic facial features. Specifically, referring to fig. 3, the image angle adjustment method of the present embodiment includes:
s10: the method comprises the following steps that a camera shoots a face of an appointed person and forms a first image, wherein the camera and the face of the appointed person are set according to an appointed standard;
s20: setting a reference line in the first image;
s30: setting a preset first straight line in the first image;
s40: acquiring a second included angle between the preset first straight line and the datum line; the second included angle is a preset imaging angle;
s50: carrying out face recognition on the first image;
s60: acquiring a connecting line between two eyes of the face of a specified person in the first image;
s70: acquiring a first included angle between the connecting line and the datum line; the first included angle is an imaging angle of the face of the designated person in the first image;
s80: calculating an image adjusting angle according to the imaging angle and a preset imaging angle;
s90: storing the image adjustment angle;
s100: and adjusting the subsequent images shot by the camera according to the image adjustment angle.
In step S10, the camera is placed in front of the designated person, the designated person faces the camera and looks straight at the camera, and the camera captures the face of the person to form a first image.
In step S20, a reference line is set in the first image; specifically, in the present embodiment, the first image formed by shooting by the camera is a rectangular image; and setting a connecting line of the midpoints of the left side and the right side of the rectangular image as a reference line.
In step S30, a first straight line is preset in the first image. Specifically, the preset first straight line is a connecting line between two eyes of the designated person in the first image when the camera does not have the installation offset angle, and therefore, in the present embodiment, a straight line parallel to the top edge or the bottom edge of the first image in the first image is set as the preset first straight line.
In step S40, an angle between the preset first straight line and the reference line is acquired, and the angle is set as a preset imaging angle. Since the preset first straight line is parallel to the reference line, the preset imaging angle is 0 ° in the present embodiment.
In step S50, face recognition is performed on the first image. The embodiment acquires the positions of the two eyes of the appointed person in the first image through face recognition. Specifically, based on the facial features of the face in the first image, such as: the positions of the human face in the first image are determined according to the shapes of the facial features and the geometrical relationship between the facial features, and the positions of the two eyes in the human face are further determined.
In step S60, after the positions of both eyes on the first image in the face of the specified person are acquired, the line between both eyes is acquired.
In step S70, a first included angle between the connection line and the reference line is obtained; the first included angle is an imaging angle of the face of the designated person in the first image. When the camera is installed in place and the installation offset angle does not exist, the connecting line between the two eyes of the designated person is also parallel to the top edge or the bottom edge of the first image, and the first included angle between the connecting line between the two eyes of the designated person and the reference line is 0 degree, namely the imaging angle of the face of the designated person in the first image is 0 degree; when the camera is not installed in place and an installation offset angle exists, a connecting line between two eyes of the designated person is not parallel to the top edge or the bottom edge of the first image, and a first included angle between the connecting line between the two eyes of the designated person and the reference line, namely an imaging angle of the face of the designated person in the first image is not equal to 0 degree.
In step S80, an image adjustment angle of the camera is calculated according to the imaging angle and a preset imaging angle. Specifically, the image adjustment angle is equal to the imaging angle minus the preset imaging angle. In this embodiment, since the preset imaging angle is 0 °, the image adjustment angle of this embodiment is equal to the imaging angle of the face of the designated person in the first image.
In step S90, the calculated image adjustment angle is stored and recorded.
In step S100, after the image adjustment angle of the camera is stored, images captured by subsequent cameras are adjusted according to the image adjustment angle.
In this embodiment, the image adjustment angle of the camera can be calculated by one-time face shooting, and all subsequent images shot by the camera are adjusted according to the image adjustment angle, so that the images are adjusted to correct angles, and the method is very simple and practical.
In other embodiments, the reference line may be set to a straight line at another position. For example, when the reference line is set to be parallel to a connecting line between the midpoint of the top edge and the midpoint of the bottom edge of the first image, the preset first straight line is perpendicular to the reference line, and the preset imaging angle is 90 °; thus, the image adjustment angle is equal to the imaging angle minus 90 °.
Further, referring to fig. 3, in the image angle adjusting method of the present embodiment, before step S10, the following steps are included:
s01: acquiring a first preview image of a camera;
s02: acquiring position information of a face of a designated person in a first preview image;
s03: calculating a position adjustment value of the camera according to the position information and preset position information;
s04: and adjusting the position of the camera according to the position adjustment value, so that the camera and the specified target reach the specified specification.
In this embodiment, specifying the specification further includes: and adjusting the position of the camera to enable the camera to acquire a complete human face. In order to enable the camera to acquire a complete face, the face is successfully identified in the first image and the positions of the two eyes are located.
Specifically, in step S01, the camera captures a picture to be photographed to form a first preview image; and then the first preview image is acquired.
In step S02, position information of the face of the specified person in the first preview image is acquired. Specifically, the nose in the human face is recognized by performing face recognition on the first preview image, and specific position information of the nose tip of the nose is acquired as position information of the human face in the first preview image.
In step S03, a position adjustment value of the camera is calculated according to the position information of the human face in the first preview image and the preset position information. Specifically, in this embodiment, the preset position information is a center point of the first preview image, i.e. an intersection of a top edge midpoint connecting line and a bottom edge midpoint connecting line and two side edge midpoint connecting lines. And calculating according to the position information of the face in the first preview image and the preset position information, so as to obtain a position adjustment value of the camera. In this embodiment, the position information and the preset position information of the face in the first preview image can be represented by coordinate values, a coordinate system is established with the center point of the first preview image, that is, the intersection point of the top edge midpoint connecting line and the bottom edge midpoint connecting line and the two side edge midpoint connecting lines as the origin, and each point on the first preview image can be represented by one coordinate value. In this embodiment, the preset position information is (0, 0), the position information of the face in the first preview image is (X, Y), and the position adjustment value a ((X, Y) - (0, 0)) ═ a (X, Y) of the camera. Wherein a is the ratio of the distance between two points in the first preview image to the distance that the corresponding camera actually needs to move. Further, aX denotes an adjustment value for left and right movement of the camera, and specifically, when aX is a positive value, the camera moves rightward, and when aX is a negative value, the camera moves rightward. Similarly, aY represents a height adjustment value of the camera, and when aY is a positive value, the camera moves upward, and when aY is a negative value, the camera moves downward.
In this embodiment, by adjusting the position of the camera, the face can be located at the center of the first preview image, so that the face is completely displayed in the middle of the first image in the first image shot by the camera, the success rate of face recognition on the first image is ensured, and then the line between two eyes in the face is smoothly acquired and the image adjustment angle of the camera is obtained through calculation.
Further, referring to fig. 3, in the image angle adjusting method of the present embodiment, before step S10, the method includes:
s05: acquiring a second preview image of the camera;
s06: acquiring the area ratio of the face of the designated person in the second preview image;
s07: calculating an image amplification coefficient adjustment value of the camera according to the area ratio and a preset area ratio;
s08: and adjusting the image amplification factor of the camera according to the image amplification factor adjustment value, so that the camera and the specified target reach the specified specification.
In this embodiment, specifying the specification further includes adjusting an image magnification factor of the camera so that an area ratio of the face in the first image is in a proper range.
In the actual shooting process, the distance between a designated person and the camera affects the imaging area of the face in the first image, if the imaging area of the face in the first image is small or large, the eye may not be collected by the camera, or the eye becomes large or small in the first image, the accuracy of the connection line between the two eyes acquired in the subsequent step is affected, and the accuracy of the finally calculated image adjustment angle is affected. Therefore, it is important to ensure that the size of the area of the face in the first image is within a suitable range.
Specifically, in step S05, the camera captures a picture to be photographed to form a second preview image; and then the second preview image is acquired.
In step S06, the area ratio of the face of the specified person in the second preview image is acquired. Specifically, the area ratio of the face in the second preview image is obtained by performing face recognition on the second preview image.
In step S07, an image magnification factor adjustment value of the camera is calculated based on the area ratio and a preset area ratio. The preset area ratio may be a single value or a range value. The preset area ratio of the embodiment is a range value, specifically 40% to 50%, and when the area ratio of the face in the second preview image reaches 40% to 50%, the proportion of the face area in the whole second preview image is appropriate, the connection line between the two eyes can be acquired more accurately, so that the calculated image adjustment angle is more accurate.
In step S08, the image magnification factor of the camera is adjusted according to the image magnification factor adjustment value, so that the area ratio of the human face in the second preview image reaches the preset area ratio.
In this embodiment, the image magnification factor of the camera is adjusted to ensure that the area ratio of the face in the first image is within a proper range, thereby improving the accuracy of the calculated image adjustment angle.
In this embodiment, the image adjustment angle corresponding to the camera can be obtained through one image including a human face. In other embodiments, the image adjustment angle corresponding to the camera may also be calculated by using a plurality of images including human faces. The position of the face in the image is data used for calculating the image adjustment angle corresponding to the camera. Therefore, the more the data amount of the image to be referred to, the more accurate the calculated image adjustment angle is. Specifically, the camera shoots a plurality of images including the human face, each image can be calculated to obtain an image adjustment angle, the plurality of images can obtain a plurality of image adjustment angles, then the plurality of image adjustment angles are calculated according to a certain calculation rule to obtain a final image adjustment angle, and finally the images shot by the camera are adjusted according to the final image adjustment angle. The calculation rule includes taking an average value or taking a median value. For example, an average value of the plurality of image adjustment angles is obtained and the average value is used as a final image adjustment angle of the camera, or a median of the plurality of image adjustment angles is obtained and the median is used as the final image adjustment angle of the camera.
Example three:
referring to fig. 4, the present invention also provides an image angle adjusting apparatus, in which the image is formed by photographing with a photographing module, the apparatus including:
the shooting module 11 is used for shooting a specified target and forming a first image, wherein the shooting module and the specified target are arranged according to specified specifications;
a first obtaining module 12, configured to obtain an imaging angle of a specified target in a first image;
the angle calculation module 13 is used for calculating an image adjustment angle according to the imaging angle and a preset imaging angle;
a storage module 14, configured to store an image adjustment angle;
and the angle adjusting module 15 is used for adjusting the images shot subsequently by the shooting module according to the image adjusting angle.
The photographing module 11 of the present embodiment corresponds to the camera of the second embodiment.
In this embodiment, the preset imaging angle is an imaging angle corresponding to the designated target in the first image when the photographing module 11 is mounted in place. The shooting module 11 is a camera that needs to adjust images. The invention shoots a first image containing a human face through a shooting module 11; the imaging angle of a designated target in the first image is acquired through the first acquisition module 12, the imaging angle is compared with a preset imaging angle through the angle calculation module 13, then an image adjustment angle corresponding to the shooting module 11 is calculated, the image adjustment angle is stored and recorded through the storage module 14, and finally, the subsequent shot image of the shooting module 11 is adjusted according to the image adjustment angle through the angle adjustment module 15.
The image angle adjusting device can calculate the image adjusting angle of the shooting module 11 by only shooting the specified target once, and adjust all the images shot subsequently by the shooting module 11 according to the image adjusting angle so as to adjust the images to the correct angle, thereby being very simple and practical.
In the present invention, the designated target may be various, such as a straight pencil, a human face, a cup, and the like. These articles have a significant inclination angle in an image photographed using the photographing module 11 having the installation offset angle.
In this embodiment, the designated target is a face of a designated person. The above specified specifications are: the photographing module 11 is disposed in front of the designated person, and the designated person looks at the photographing module 11. The designated person may select a person with stereotactic facial features. Specifically, the image angle adjusting apparatus further includes:
a first setting module 11.1, configured to set a reference line in the first image;
the first acquisition module 12 includes:
a face recognition unit 12.1 for performing face recognition on the first image;
a first obtaining unit 12.2, configured to obtain a connection line between two eyes of a face of a specified person in the first image;
a second obtaining unit 12.3, configured to obtain a first included angle between the connection line and the reference line; the first included angle is an imaging angle of the designated target in the first image.
Further, the image angle adjusting apparatus further includes:
a second setting module 11.2, configured to set a preset first straight line in the first image;
the second obtaining module 11.3 is configured to obtain a second included angle between the preset first straight line and the reference line; the second included angle is a preset imaging angle.
The photographing module 11, the first setting module 11.1, the second setting module 11.2, the second obtaining module 11.3, the face recognition unit 12.1, the first obtaining unit 12.2, the second obtaining unit 12.3, the angle calculating module 13, the storage module 14, and the angle adjusting module 15 of this embodiment correspond to steps S20, S30, S40, S50, S60, S70, S80, S90, S100, and step S110 of the image angle adjusting method in the second embodiment, respectively, and are not described herein again.
Example four:
the invention also provides a computer device, which can be a server, and the internal structure of the computer device can be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational 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 memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a program of the image angle adjustment method and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program realizes the image angle adjusting method in the above-described embodiment when executed by a processor.
Example five:
the present invention also provides a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the image angle adjusting method in the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by hardware associated with instructions of a computer program, which may be stored on a non-volatile computer-readable storage medium, and when executed, may include processes of the above embodiments of the methods. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. 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-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An image angle adjustment method, wherein an image is captured by a camera, the method comprising:
the camera shoots a specified target and forms a first image, wherein the camera and the specified target are set according to a specified specification;
acquiring an imaging angle of the specified target in the first image;
calculating an image adjusting angle according to the imaging angle and a preset imaging angle;
storing the image adjustment angle;
and adjusting the subsequent images shot by the camera according to the image adjustment angle.
2. The image angle adjustment method according to claim 1, wherein the specified object is a face of a specified person; the specified specification includes: arranging the camera in front of the appointed person, and enabling the appointed person to look at the camera;
before the step of acquiring the imaging angle of the specified target in the first image, the method comprises the following steps:
setting a reference line in the first image;
the step of acquiring the imaging angle of the specified target in the first image comprises:
performing face recognition on the first image;
acquiring a connecting line between two eyes of the face of the designated person in the first image;
acquiring a first included angle between the connecting line and the datum line; the first included angle is an imaging angle of the specified target in the first image.
3. The image angle adjustment method according to claim 2, comprising, after the step of setting a reference line in the first image and before the step of acquiring an imaging angle of the specified target in the first image:
setting a preset first straight line in the first image;
acquiring a second included angle between the preset first straight line and the datum line; the second included angle is the preset imaging angle.
4. The image angle adjustment method according to claim 1, comprising, before the step of the camera taking a picture of a specified target and forming a first image:
acquiring a first preview image of the camera;
acquiring position information of the specified target in the first preview image;
calculating a position adjustment value of the camera according to the position information and preset position information;
and adjusting the position of the camera according to the position adjustment value, so that the camera and the specified target reach the specified standard.
5. The image angle adjustment method according to claim 1, comprising, before the step of the camera taking a picture of a specified target and forming a first image:
acquiring a second preview image of the camera;
acquiring the area ratio of the specified target in the second preview image;
calculating an image amplification coefficient adjustment value of the camera according to the area ratio and a preset area ratio;
and adjusting the image amplification factor of the camera according to the image amplification factor adjustment value, so that the camera and the specified target reach the specified specification.
6. An image angle adjusting apparatus, wherein an image is captured by a capturing module, the image angle adjusting apparatus comprising:
the shooting module is used for shooting a specified target and forming a first image, wherein the shooting module and the specified target are arranged according to a specified specification;
the first acquisition module is used for acquiring the imaging angle of the specified target in the first image;
the angle calculation module is used for calculating an image adjustment angle according to the imaging angle and a preset imaging angle;
the storage module is used for storing the image adjusting angle;
and the angle adjusting module is used for adjusting the images shot subsequently by the shooting module according to the image adjusting angle.
7. The image angle adjusting apparatus according to claim 6, wherein the specified target is a face of a specified person; the specified specification includes: arranging the shooting module in front of the appointed person, wherein the appointed person looks at the camera;
the image angle adjusting apparatus further includes:
the first setting module is used for setting a datum line in the first image;
the first obtaining module comprises:
the face recognition unit is used for carrying out face recognition on the first image;
a first obtaining unit, configured to obtain a connection line between two eyes of the face of the designated person in the first image;
the second acquisition unit is used for acquiring a first included angle between the connecting line and the datum line; the first included angle is an imaging angle of the specified target in the first image.
8. The image angle adjusting apparatus according to claim 7, further comprising:
the second setting module is used for setting a preset first straight line in the first image;
the second acquisition module is used for acquiring a second included angle between the preset first straight line and the datum line; the second included angle is the preset imaging angle.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 5 when executing the computer program.
10. A storage medium having a computer program stored thereon, the computer program, when being executed by a processor, realizing the steps of the method according to any of the claims 1 to 5.
CN202010872014.8A 2020-08-26 2020-08-26 Image angle adjusting method and device, computer equipment and storage medium Pending CN112053297A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010872014.8A CN112053297A (en) 2020-08-26 2020-08-26 Image angle adjusting method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010872014.8A CN112053297A (en) 2020-08-26 2020-08-26 Image angle adjusting method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112053297A true CN112053297A (en) 2020-12-08

Family

ID=73599930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010872014.8A Pending CN112053297A (en) 2020-08-26 2020-08-26 Image angle adjusting method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112053297A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113657379A (en) * 2021-08-09 2021-11-16 杭州华橙软件技术有限公司 Image processing method, image processing device, computer-readable storage medium and processor
CN113766211A (en) * 2021-08-24 2021-12-07 武汉极目智能技术有限公司 Camera installation angle detection system and method of ADAS equipment
CN114189612A (en) * 2021-11-18 2022-03-15 深圳市锐明技术股份有限公司 Camera installation angle determining method and device and terminal equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070263995A1 (en) * 2006-03-29 2007-11-15 Samsung Electronics Co., Ltd. Apparatus and method for taking panoramic photograph
CN102096307A (en) * 2009-12-14 2011-06-15 鸿富锦精密工业(深圳)有限公司 Method and device for testing deflection angle of camera lens
CN110175518A (en) * 2019-04-19 2019-08-27 阿里巴巴集团控股有限公司 Camera angle method of adjustment, device, equipment and the system of photographic device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070263995A1 (en) * 2006-03-29 2007-11-15 Samsung Electronics Co., Ltd. Apparatus and method for taking panoramic photograph
CN102096307A (en) * 2009-12-14 2011-06-15 鸿富锦精密工业(深圳)有限公司 Method and device for testing deflection angle of camera lens
CN110175518A (en) * 2019-04-19 2019-08-27 阿里巴巴集团控股有限公司 Camera angle method of adjustment, device, equipment and the system of photographic device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113657379A (en) * 2021-08-09 2021-11-16 杭州华橙软件技术有限公司 Image processing method, image processing device, computer-readable storage medium and processor
CN113766211A (en) * 2021-08-24 2021-12-07 武汉极目智能技术有限公司 Camera installation angle detection system and method of ADAS equipment
CN113766211B (en) * 2021-08-24 2023-07-25 武汉极目智能技术有限公司 Camera installation angle detection system and method of ADAS (advanced automatic attachment system) equipment
CN114189612A (en) * 2021-11-18 2022-03-15 深圳市锐明技术股份有限公司 Camera installation angle determining method and device and terminal equipment
CN114189612B (en) * 2021-11-18 2023-08-11 深圳市锐明技术股份有限公司 Camera installation angle determining method and device and terminal equipment

Similar Documents

Publication Publication Date Title
CN112053297A (en) Image angle adjusting method and device, computer equipment and storage medium
US11010924B2 (en) Method and device for determining external parameter of stereoscopic camera
DE102016013274A1 (en) IMAGE PROCESSING DEVICE AND METHOD FOR RECOGNIZING AN IMAGE OF AN OBJECT TO BE DETECTED FROM ENTRY DATA
US8269820B2 (en) Wide-angle image acquiring method and wide-angle stereo camera device
CN110779491A (en) Method, device and equipment for measuring distance of target on horizontal plane and storage medium
CN113923420B (en) Region adjustment method and device, camera and storage medium
US20200077073A1 (en) Real-time stereo calibration by direct disparity minimization and keypoint accumulation
CN110580718B (en) Correction method for image device, related image device and computing device
WO2022241964A1 (en) Temperature measuring method, computer device, and computer-readable storage medium
CN109348108B (en) Surgical field camera, adjusting method of surgical field camera, computer equipment and readable storage medium
CN103581562A (en) Panoramic shooting method and panoramic shooting device
KR101926258B1 (en) Method of automatic calibration of AVM system
CN113256735B (en) Camera calibration method and system based on binocular calibration
CN114758009A (en) Binocular calibration method and device and electronic equipment
US20230379422A1 (en) Method for vehicle hinge point calibration and corresponding calibration apparatus, computer device, and storage medium
CN105423942B (en) The modification method of biprism defect error in BSL 3D DIC systems
US20200175657A1 (en) Method for correcting distortion image and apparatus thereof
CN114359401A (en) Calibration method, system and equipment
CN113942013B (en) Quick hand-eye calibration method and system based on data visualization
CN113645456A (en) Projection image correction method, projection system, and readable storage medium
CN112419383B (en) Depth map generation method, device and storage medium
CN112950721A (en) Depth information determination method and device and binocular vision system
CN111539964B (en) Plant canopy surface area acquisition method and device based on depth image, computer equipment and storage medium
CN110232715B (en) Method, device and system for self calibration of multi-depth camera
CN114049474B (en) High-precision remote sensing rapid mapping method and device and storage medium

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