CN112019749B - Camera adjusting method and device - Google Patents

Camera adjusting method and device Download PDF

Info

Publication number
CN112019749B
CN112019749B CN202010909069.1A CN202010909069A CN112019749B CN 112019749 B CN112019749 B CN 112019749B CN 202010909069 A CN202010909069 A CN 202010909069A CN 112019749 B CN112019749 B CN 112019749B
Authority
CN
China
Prior art keywords
target point
target
camera
parameter
color
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
CN202010909069.1A
Other languages
Chinese (zh)
Other versions
CN112019749A (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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010909069.1A priority Critical patent/CN112019749B/en
Publication of CN112019749A publication Critical patent/CN112019749A/en
Application granted granted Critical
Publication of CN112019749B publication Critical patent/CN112019749B/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/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/682Vibration or motion blur correction
    • H04N23/685Vibration or motion blur correction performed by mechanical compensation
    • 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/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/682Vibration or motion blur correction

Abstract

The embodiment of the application discloses a camera adjusting method and a camera adjusting device, wherein a reference picture is obtained through a camera in an open state, and a reference area is selected from the reference picture; acquiring a target picture through a camera in an open state after a preset interval time, and determining a reference area in the target picture; acquiring a display area of a reference area in a target picture, determining the length of a fuzzy pixel and a shaking direction according to the display area, and then calculating the shaking speed by using the length of the fuzzy pixel; and finally, adjusting the camera in the open state by utilizing the angle adjusting parameter through proportional integral derivative control, so that the shake of the camera in the open state can be eliminated.

Description

Camera adjusting method and device
Technical Field
The application relates to the technical field of computers, in particular to a camera adjusting method and device.
Background
When a user performs business transaction, some materials are usually required to be provided for business audit. When a user transacts business on a mobile phone bank or business transaction equipment of the bank, the user needs to shoot and upload photos of related materials through the mobile phone bank or the business transaction equipment so that a bank system can perform material audit according to the photos of the related materials.
When a user shoots related materials by using a camera on a mobile phone or a camera on other equipment, the shot pictures are easy to have insufficient definition due to the shaking of the camera. The shot pictures cannot be used for auditing, and the efficiency of uploading the pictures is reduced.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a method and an apparatus for adjusting a camera, which can obtain a clear shot picture by adjusting an angle of the camera and synchronizing with shaking.
In order to solve the above problem, the technical solution provided by the embodiment of the present application is as follows:
in a first aspect, the present application provides a camera adjustment method, including:
acquiring a reference picture through a camera in an open state, and selecting a reference area from the reference picture; the reference region comprises one or more pixel points;
after a preset interval time, acquiring a target picture through the camera in the open state, and determining the reference area in the target picture;
acquiring a display area of the reference area in the target picture, and determining the length of a fuzzy pixel and the shaking direction according to the display area;
calculating the jitter speed according to the length of the blurred pixel;
obtaining an angle adjusting parameter according to the dithering speed and the dithering direction;
and adjusting the camera in the opening state by utilizing the angle adjusting parameter through proportional integral derivative control so as to eliminate the shake of the camera in the opening state.
Optionally, the obtaining a reference picture through the camera in the on state, and selecting a reference region from the reference picture includes:
acquiring a collected picture through a camera in an open state, and selecting a reference picture from the collected picture;
carrying out full-image scanning on the reference picture, and determining a color difference contrast area; the color difference contrast area comprises a first color and a second color, and the first color difference degree of the first color and the second color is greater than or equal to a first threshold value;
selecting at least one first target point from the color difference contrast area to form a reference area, wherein the second color difference between the first target color of the first target point and the second target color of the second target point is greater than or equal to a second threshold value; the second target point is adjacent to the first target point, wherein the first target point is composed of one or more pixel points, and the second target point is composed of one or more pixel points.
Optionally, the color difference contrast area includes black, and the selecting at least one first target point from the color difference contrast area to form a reference area includes:
selecting a candidate target point with black color from the color difference contrast area as a target point to be determined; the candidate target point consists of one or more pixel points;
calculating a second color difference between the black of the target point to be determined and a second target color of a second target point;
if the second chroma is larger than or equal to a second threshold value, taking the target point to be determined as a first target point;
and selecting at least one first target point to form a reference area.
Optionally, the calculating a dithering speed according to the length of the blurred pixel includes:
and calculating the ratio of the length of the blurred pixel to the shutter time to obtain the shaking speed.
In a second aspect, the present application provides a camera adjustment apparatus, the apparatus comprising:
the camera comprises a selecting unit, a judging unit and a judging unit, wherein the selecting unit is used for acquiring reference pictures through the camera in an open state and selecting a reference area from the reference pictures; the reference region comprises one or more pixel points;
the determining unit is used for acquiring a target picture through the camera in the opening state after a preset interval time, and determining the reference area in the target picture;
the acquisition unit is used for acquiring a display area of the reference area in the target picture and determining the length of a fuzzy pixel and the shaking direction according to the display area;
the calculating unit is used for calculating the dithering speed according to the length of the blurred pixel;
the parameter acquisition unit is used for obtaining an angle adjusting parameter according to the dithering speed and the dithering direction;
and the adjusting unit is used for adjusting the camera in the opening state by utilizing the angle adjusting parameter through proportional integral derivative control so as to eliminate the shake of the camera in the opening state.
Optionally, the determining unit includes:
the selecting subunit is used for acquiring the collected pictures through the camera in the open state and selecting reference pictures from the collected pictures;
the determining subunit is used for carrying out full-image scanning on the reference picture and determining a color difference comparison area; the color difference contrast area comprises a first color and a second color, and the first color difference degree of the first color and the second color is greater than or equal to a first threshold value;
the composition subunit is used for selecting at least one first target point from the color difference contrast area to form a reference area, wherein the second color difference between the first target color of the first target point and the second target color of the second target point is greater than or equal to a second threshold value; the second target point is adjacent to the first target point, wherein the first target point is composed of one or more pixel points, and the second target point is composed of one or more pixel points.
Optionally, the color difference contrast area includes black, and the composition subunit is specifically configured to select a candidate target point with a black color from the color difference contrast area as a target point to be determined; the candidate target point consists of one or more pixel points; calculating a second color difference between the black of the target point to be determined and a second target color of a second target point; if the second chroma is larger than or equal to a second threshold value, taking the target point to be determined as a first target point; and selecting at least one first target point to form a reference area.
Optionally, the calculating unit is specifically configured to calculate a ratio of the length of the blurred pixel to a shutter time to obtain a shake speed.
Optionally, the parameter obtaining unit is specifically configured to input the dithering speed into a genetic algorithm model to obtain a target parameter output by the genetic algorithm model; the target parameter is a parameter for proportional-integral-derivative control; the genetic algorithm model is generated by training through training data, and the training data comprises a training speed, a training parameter and a label value corresponding to the training parameter and the training speed; the training parameter is a parameter of proportional-integral-derivative control; and taking the target parameter and the jitter direction as angle adjusting parameters.
Therefore, the embodiment of the application has the following beneficial effects:
according to the camera adjusting method provided by the embodiment of the application, firstly, a reference picture is obtained through a camera in an open state, and a reference area is selected from the reference picture; acquiring a target picture through a camera in an open state after a preset interval time, and determining a reference area in the target picture; acquiring a display area of a reference area in a target picture, determining the length of a fuzzy pixel and a shaking direction according to the display area, and then calculating the shaking speed by using the length of the fuzzy pixel; and finally, adjusting the camera in the open state by utilizing the angle adjusting parameter through proportional integral derivative control, so that the shake of the camera in the open state can be eliminated.
Therefore, the camera adjustment method provided by the embodiment of the application can determine the reference area in the reference image, determine the reference area in the target image, and obtain the length of the blurred pixel and the shaking direction by using the display area displayed by the reference area in the target image, wherein the length of the blurred pixel and the shaking direction can reflect the shaking condition of the current camera. According to the length of the fuzzy pixel and the shaking direction, angle adjusting parameters can be obtained, and the angle of the camera can be adjusted according to the angle adjusting parameters, so that the angle of the camera can be correspondingly changed according to the shaking condition of the camera. Therefore, the angle of the camera is synchronous with the shaking condition, the definition of the shot picture can be correspondingly improved, the efficiency of shooting the clear picture by the camera is further improved, and the efficiency of checking the uploaded picture is improved.
Drawings
Fig. 1 is a flowchart of a camera adjustment method according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a camera adjustment device according to an embodiment of the present application.
Detailed Description
In order to facilitate understanding and explaining the technical solutions provided by the embodiments of the present application, the following description will first describe the background art of the present application.
After studying a traditional method for taking pictures by using a camera, the inventor finds that when a user uses a device with the camera to take pictures, the user can easily obtain a blurred picture because the device with the camera is difficult to be stably fixed, and the pictures taken by the camera may have insufficient definition. When a user needs to upload related information through a picture obtained by shooting a material, the auditing system cannot acquire corresponding information through a fuzzy picture, and needs the user to upload a clearer picture again or the auditing fails, so that the picture uploading frequency is increased, and the efficiency of uploading the picture for auditing is reduced.
Based on this, an embodiment of the present application provides a camera adjustment method, which includes, first, obtaining a reference picture through a camera in an open state, and selecting a reference region from the reference picture; the reference region comprises one or more pixel points; secondly, after a preset interval time, acquiring a target picture through the camera in the open state, and determining the reference area in the target picture; then obtaining a display area of the reference area in the target picture, and determining the length of a fuzzy pixel and the shaking direction according to the display area; calculating the jitter speed according to the length of the blurred pixel; obtaining an angle adjusting parameter according to the dithering speed and the dithering direction; and finally, adjusting the camera in the opening state by utilizing the angle adjusting parameter through proportional integral derivative control so as to eliminate the shake of the camera in the opening state.
In order to facilitate understanding of the technical solutions provided by the embodiments of the present application, a camera adjustment method provided by the embodiments of the present application is described below with reference to the accompanying drawings.
Referring to fig. 1, which is a flowchart of a camera adjustment method provided in an embodiment of the present application, the method includes steps S101 to S106.
S101: acquiring a reference picture through a camera in an open state, and selecting a reference area from the reference picture; the reference region includes one or more pixel points.
When the camera is adjusted, the camera is ensured to be in an open state, so that the camera shake can be adjusted according to the pictures collected by the camera. The camera in the opening state can collect pictures, and reference pictures are obtained from the collected pictures. The reference picture refers to a picture with definition greater than a definition threshold. Specifically, a plurality of pictures can be collected through the camera in the open state, the picture with the definition being greater than the definition threshold value is determined from the collected pictures, and the picture with the definition being greater than the definition threshold value is used as a reference picture.
After determining the reference picture, a reference region may be selected from the reference picture. The reference area is an area for measuring camera shake in the reference picture. The reference region may be a region included in a figure, a character, or a punctuation in the reference picture. For example, the reference region may be a region where a certain character in the reference picture is located, a region where a stroke in a certain character is located, a region where a certain eligible graphic in the reference picture is located, or the like. It should be noted that the reference region may include one or more pixel points.
In order to improve the accuracy of adjusting the camera and prevent the camera from shaking too frequently, a plurality of reference regions may be selected from the reference picture, and the reference regions are distributed in the reference picture. Therefore, on one hand, the accuracy of adjusting the camera can be improved; on the other hand, the reference area can be prevented from being lost due to the fact that the shaking amplitude of the camera is too large.
In one possible implementation, the reference region may be determined by a degree of color difference. The embodiment of the application also provides a method for selecting the reference area, and the specific application refers to the following.
S102: and after a preset interval time, acquiring a target picture through the camera in the opening state, and determining the reference area in the target picture.
After the reference area is selected through the reference picture, after a preset interval time, the target picture can be acquired through the camera in the on state, and the judgment on the camera shaking condition is carried out. The specific value of the preset interval time is not limited in the embodiment of the application, and the preset interval time can be set according to the shooting requirement and can also be determined according to the shaking frequency of the camera.
The target picture is other pictures collected by the camera except the reference image. Through the target picture and the reference picture, the shaking condition of the camera within the preset interval time can be judged. Specifically, a reference area is determined in the target picture, and the shake condition of the camera can be determined more specifically by the reference area.
As an example, the target picture may be scanned in a full scale, and the reference region in the target picture is determined by the full scale scanning.
In another possible implementation, the target picture may not have the reference region determined in the reference picture. For example, the user shakes the camera greatly, or the user changes the object of shooting. In this case, the target picture may be selected again after a certain time period, and whether or not the reference region exists may be determined. Alternatively, the reference picture may be re-determined and the updated reference area may be selected. And acquiring the corresponding target picture and determining the reference area.
S103: and acquiring a display area of the reference area in the target picture, and determining the length of the blurred pixel and the shaking direction according to the display area.
The definition of the reference region in the target picture may be insufficient, and the corresponding display region of the reference region in the target picture is acquired. The display area is an area in which the reference area is displayed in the target picture. For example, when the reference region is a region where a punctuation is located in the reference picture, the corresponding display region is a region where the punctuation is displayed in the target picture.
The length of the blurred pixels and the shaking direction may be determined according to the display area. The blurred pixel length refers to the length of a pixel of a blurred display caused when the camera shakes. The blurred pixel length may be obtained by scanning the display area. The shake direction refers to a direction in which the camera shakes. The dither direction may be determined based on the relative positions of the blurred pixels and the sharper display pixels in the display area. For example, if the reference area includes a character, in the display area, if the sharper display pixels of the character are on the left and the blurred pixels are on the right, it can be determined that the dithering direction is from left to right.
S104: and calculating the jitter speed according to the length of the blurred pixel.
Further, the dither speed is calculated from the blurred pixel length. In one possible implementation, the shutter time may be acquired. Calculating a dither speed based on the blurred pixel length, comprising:
and calculating the ratio of the length of the blurred pixel to the shutter time to obtain the shaking speed.
By calculating the ratio of the length of the fuzzy pixel to the shutter time, the shaking speed of the camera can be calculated, and the angle of the camera can be adjusted by using the shaking speed of the camera.
S105: and obtaining an angle adjusting parameter according to the shaking speed and the shaking direction.
And obtaining corresponding angle adjusting parameters through the obtained dithering speed and the dithering direction. The angle adjusting parameters comprise setting parameters of the camera, and according to the angle adjusting parameters, corresponding setting and adjustment can be carried out on the angle of the camera.
In one possible implementation, the angular adjustment parameter may be determined using a genetic algorithm. Correspondingly, the embodiment of the present application provides a method for obtaining an angle adjustment parameter, which is specifically referred to as follows.
S106: and adjusting the camera in the opening state by utilizing the angle adjusting parameter through proportional integral derivative control so as to eliminate the shake of the camera in the opening state.
And adjusting the camera by using the obtained angle adjusting parameters through proportional integral derivative control. The angle of the camera can be better adjusted according to the angle adjusting parameter through proportional integral derivative control, and the adjusted angle of the camera can be synchronously adjusted with the shaking of the camera. Therefore, the shooting range of the camera is stable, the shaking speed of the shooting object is low, and the obtained picture is high in definition.
In the embodiment of the application, the reference picture and the target picture are obtained through the camera in the open state, the corresponding display area in the target picture is determined by utilizing the reference area in the reference picture, the length of the fuzzy pixel and the shaking direction can be determined according to the display area, so that the angle adjusting parameter is obtained, the angle of the camera can be adjusted according to the angle adjusting parameter, and the angle of the camera can be correspondingly changed according to the shaking condition of the camera. Therefore, the angle of the camera is synchronous with the shaking condition, the definition of the shot picture can be correspondingly improved, the efficiency of shooting the clear picture by the camera is further improved, and the picture uploading efficiency is improved.
When the reference picture has an area with obvious color difference contrast, the area with obvious color difference contrast can be used as a reference area so as to determine the reference area.
In a possible implementation manner, the acquiring a reference picture by a camera in an on state, and selecting a reference region from the reference picture includes the following three steps:
a1: acquiring collected pictures through the camera in the opening state, and selecting reference pictures from the collected pictures.
When the camera is in an open state, a collected picture acquired by the camera can be acquired. It should be noted that the acquired picture may be a picture taken by a camera, or may be a picture acquired through a picture acquired by the camera.
And selecting a picture with proper definition from the collected pictures as a reference picture.
A2: carrying out full-image scanning on the reference picture, and determining a color difference contrast area; the color difference contrast area comprises a first color and a second color, and the first color difference degree of the first color and the second color is larger than or equal to a first threshold value.
And carrying out full-picture scanning on the determined reference picture, and judging the color distribution in the reference picture. And taking an area which is composed of a plurality of colors and has the color difference degree of different colors larger than or equal to a first threshold value as a color difference contrast area.
After the full-picture scanning is performed on the reference picture, the colors in the reference picture can be acquired, and then a region which has at least two colors and has a color difference degree of different colors greater than or equal to a first threshold value can be used as a color difference contrast region.
A3: selecting at least one first target point from the color difference contrast area to form a reference area, wherein the second color difference between the first target color of the first target point and the second target color of the second target point is greater than or equal to a second threshold value; the second target point is adjacent to the first target point, wherein the first target point is composed of one or more pixel points, and the second target point is composed of one or more pixel points.
And further selecting a reference area in the determined color difference contrast area. The regions having the same color may be divided into one target point. A first target point is selected from the divided target points, and it is determined whether a second color difference between a first target color of the first target point and a second target color of an adjacent target point, that is, a second target point, is greater than or equal to a second threshold. And if the second chromaticity difference is larger than or equal to a second threshold value, taking the first target point as a target point forming the reference area.
It is understood that the second threshold may be greater than or equal to the first threshold.
In the embodiment of the application, a region with a larger color difference in a reference picture can be determined by determining a color difference contrast region, and a reference region is further determined in the color difference contrast region according to the color difference of colors of different target points. The areas with obvious color contrast can be determined by comparing the chromaticity difference of the colors of the adjacent target points, the determined reference areas are obvious, the reference areas can be conveniently determined in the target pictures subsequently, and the efficiency of adjusting the camera is improved.
It is common for a user to take pictures of material that are often white and black. For such target pictures, a black target point may be used as a reference area.
The color difference contrast area comprises black, and the step of selecting at least one first target point from the color difference contrast area to form a reference area comprises the following four steps:
b1: selecting a candidate target point with black color from the color difference contrast area as a target point to be determined; the candidate target point is composed of one or more pixel points.
For a color difference contrast area with black color, a candidate target point with black color may be first used as the target point to be determined. The candidate target point may be divided according to colors in the color difference contrast area, and the candidate target point may include one or more pixel points.
B2: a second color difference between the black of the target point to be determined and a second target color of a second target point is calculated.
A second color difference between the black of the target point to be determined and a second target color of an adjacent second target point is calculated. For example, if the second target color of the second target point is white, then a second degree of color difference between black and white is present.
B3: and if the second chroma is larger than or equal to a second threshold value, taking the target point to be determined as a first target point.
If the second chroma is greater than or equal to the second threshold, the target point to be determined may be taken as the first target point.
B4: and forming a reference area by using the first target point.
One reference area may include one or more first target points, and the number of the first target points in the reference area may be set correspondingly according to the distribution positions of the first target points and the need to determine the reference area.
In the embodiment of the application, when the color difference contrast area has black, it is preferentially determined whether the candidate target point of black can be used as the first target point. Thus, the black reference area can be preferentially determined, and the angle adjustment of the camera when a picture such as a paper material is shot is facilitated.
In one possible implementation, the angle adjustment parameter may be determined using a genetic algorithm model.
The obtaining an angle adjusting parameter according to the shaking speed and the shaking direction includes:
inputting the jitter speed into a genetic algorithm model to obtain a target parameter output by the genetic algorithm model; the target parameter is a parameter for proportional-integral-derivative control; the genetic algorithm model is generated by training through training data, and the training data comprises a training speed, a training parameter and a label value corresponding to the training parameter and the training speed; the training parameter is a parameter of proportional-integral-derivative control;
and taking the target parameter and the jitter direction as angle adjusting parameters.
When the angle of the camera is adjusted, the shake direction and the target parameter need to be used.
The shaking direction is determined according to the display area, and the moving direction of the angle of the camera can be moved to the opposite direction of the shaking direction during adjustment, so that the shooting definition of the picture is ensured.
The target parameter is a parameter required for the proportional-integral-derivative control. The target parameters can be obtained through a trained genetic algorithm model. The genetic algorithm model can be obtained by training according to training data, wherein the training data comprises training speed, training parameters and label values corresponding to the training speed and the training parameters. The training speed is a shake speed of a camera for training a model, the training parameters are parameters for proportional integral derivative control of the training model, and each training speed has a corresponding training parameter and a label value corresponding to the training speed and the training parameter. The label value is used for representing the adjusting effect when the training parameter is used for adjusting the camera with the training speed. When the label value is 1, the effect is better when the training parameters are used for adjusting the camera with the corresponding training speed; when the label value is 0, it indicates that the effect of adjusting the camera with the corresponding training speed by using the training parameter is poor. After the jitter speed is obtained, the jitter speed can be input into the trained genetic algorithm model to obtain the target parameters output by the genetic algorithm model.
And taking the obtained target parameter and the jitter direction as angle adjusting parameters, and adjusting the camera by utilizing the angle adjusting parameters through proportional integral derivative control.
In the embodiment of the application, the target parameter corresponding to the shaking speed can be obtained through the trained genetic algorithm model, and then the angle of the camera is adjusted by utilizing the target parameter and the shaking direction. The target parameters obtained through the genetic algorithm model are more accurate, the adjusted camera can eliminate jitter, and the definition of the shot picture is improved.
Based on the camera adjusting method provided by the above method embodiment, the embodiment of the present application further provides a camera adjusting device, which will be described below with reference to the accompanying drawings.
Referring to fig. 2, the drawing is a schematic structural diagram of a camera adjustment device provided in an embodiment of the present application. As shown in fig. 2, the camera adjusting apparatus includes:
the device comprises a selecting unit 201, a processing unit and a processing unit, wherein the selecting unit 201 is used for acquiring reference pictures through a camera in an open state and selecting a reference area from the reference pictures; the reference region comprises one or more pixel points;
a determining unit 202, configured to obtain a target picture through the camera in the on state after a predetermined interval time, and determine the reference region in the target picture;
an obtaining unit 203, configured to obtain a display area of the reference area in the target picture, and determine a length of a blurred pixel and a shaking direction according to the display area;
a calculating unit 204, configured to calculate a dithering speed according to the length of the blurred pixel;
a parameter obtaining unit 205, configured to obtain an angle adjustment parameter according to the dithering speed and the dithering direction;
an adjusting unit 206, configured to adjust the camera in the on state through pid control by using the angle adjustment parameter, so as to eliminate jitter of the camera in the on state.
Optionally, the determining unit 202 includes:
the selecting subunit is used for acquiring the collected pictures through the camera in the open state and selecting reference pictures from the collected pictures;
the determining subunit is used for carrying out full-image scanning on the reference picture and determining a color difference comparison area; wherein the color difference contrast area has a first color and a second color, and a first color difference degree of the first color and the second color is greater than or equal to a first threshold value;
the composition subunit is used for selecting at least one first target point from the color difference contrast area to form a reference area, wherein the second color difference between the first target color of the first target point and the second target color of the second target point is greater than or equal to a second threshold value; the second target point is adjacent to the first target point, wherein the first target point is composed of one or more pixel points, and the second target point is composed of one or more pixel points.
Optionally, the color difference contrast area includes black, and the composition subunit is specifically configured to select a candidate target point with a black color from the color difference contrast area as a target point to be determined; the candidate target point consists of one or more pixel points; calculating a second color difference between the black of the target point to be determined and a second target color of a second target point; if the second chroma is larger than or equal to a second threshold value, taking the target point to be determined as a first target point; and forming a reference area by using the first target point.
Optionally, the calculating unit 204 is specifically configured to calculate a ratio of the length of the blurred pixel to the shutter time to obtain the shake speed.
Optionally, the parameter obtaining unit 205 is specifically configured to input the dithering speed into a genetic algorithm model, so as to obtain a target parameter output by the genetic algorithm model; the target parameter is a parameter for proportional-integral-derivative control; the genetic algorithm model is generated by training through training data, and the training data comprises a training speed, a training parameter and a label value corresponding to the training parameter and the training speed; the training parameter is a parameter of proportional-integral-derivative control; and taking the target parameter and the jitter direction as angle adjusting parameters.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the system or the device disclosed by the embodiment, the description is simple because the system or the device corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A camera adjustment method, the method comprising:
acquiring a reference picture through a camera in an open state, and selecting a reference area from the reference picture; the reference region comprises one or more pixel points;
after a preset interval time, acquiring a target picture through the camera in the open state, and determining the reference area in the target picture;
acquiring a display area of the reference area in the target picture, and determining the length of a fuzzy pixel and the shaking direction according to the display area;
calculating the jitter speed according to the length of the blurred pixel;
obtaining an angle adjusting parameter according to the dithering speed and the dithering direction;
and adjusting the camera in the opening state by utilizing the angle adjusting parameter through proportional integral derivative control so as to eliminate the shake of the camera in the opening state.
2. The method according to claim 1, wherein the obtaining a reference picture through a camera in an on state, and selecting a reference region from the reference picture comprises:
acquiring a collected picture through a camera in an open state, and selecting a reference picture from the collected picture;
carrying out full-image scanning on the reference picture, and determining a color difference contrast area; the color difference contrast area comprises a first color and a second color, and the first color difference degree of the first color and the second color is greater than or equal to a first threshold value;
selecting at least one first target point from the color difference contrast area to form a reference area, wherein the second color difference between the first target color of the first target point and the second target color of the second target point is greater than or equal to a second threshold value; the second target point is adjacent to the first target point, wherein the first target point is composed of one or more pixel points, and the second target point is composed of one or more pixel points.
3. The method of claim 2, wherein the color difference contrast area comprises black, and the selecting at least one first target point from the color difference contrast area to form a reference area comprises:
selecting a candidate target point with black color from the color difference contrast area as a target point to be determined; the candidate target point consists of one or more pixel points;
calculating a second color difference between the black of the target point to be determined and a second target color of a second target point;
if the second chroma is larger than or equal to a second threshold value, taking the target point to be determined as a first target point;
and selecting at least one first target point to form a reference area.
4. The method of claim 1, wherein calculating a dither speed based on the blurred pixel length comprises:
and calculating the ratio of the length of the blurred pixel to the shutter time to obtain the shaking speed.
5. The method according to claim 1, wherein the deriving an angle adjustment parameter according to the dithering speed and the dithering direction comprises:
inputting the jitter speed into a genetic algorithm model to obtain a target parameter output by the genetic algorithm model; the target parameter is a parameter for proportional-integral-derivative control; the genetic algorithm model is generated by training through training data, and the training data comprises a training speed, a training parameter and a label value corresponding to the training parameter and the training speed; the training parameter is a parameter of proportional-integral-derivative control;
and taking the target parameter and the jitter direction as angle adjusting parameters.
6. A camera adjustment apparatus, the apparatus comprising:
the camera comprises a selecting unit, a judging unit and a judging unit, wherein the selecting unit is used for acquiring reference pictures through the camera in an open state and selecting a reference area from the reference pictures; the reference region comprises one or more pixel points;
the determining unit is used for acquiring a target picture through the camera in the opening state after a preset interval time, and determining the reference area in the target picture;
the acquisition unit is used for acquiring a display area of the reference area in the target picture and determining the length of a fuzzy pixel and the shaking direction according to the display area;
the calculating unit is used for calculating the dithering speed according to the length of the blurred pixel;
the parameter acquisition unit is used for obtaining an angle adjusting parameter according to the dithering speed and the dithering direction;
and the adjusting unit is used for adjusting the camera in the opening state by utilizing the angle adjusting parameter through proportional integral derivative control so as to eliminate the shake of the camera in the opening state.
7. The apparatus of claim 6, wherein the determining unit comprises:
the selecting subunit is used for acquiring the collected pictures through the camera in the open state and selecting reference pictures from the collected pictures;
the determining subunit is used for carrying out full-image scanning on the reference picture and determining a color difference comparison area; the color difference contrast area comprises a first color and a second color, and the first color difference degree of the first color and the second color is greater than or equal to a first threshold value;
the composition subunit is used for selecting at least one first target point from the color difference contrast area to form a reference area, wherein the second color difference between the first target color of the first target point and the second target color of the second target point is greater than or equal to a second threshold value; the second target point is adjacent to the first target point, wherein the first target point is composed of one or more pixel points, and the second target point is composed of one or more pixel points.
8. The apparatus according to claim 7, wherein the color difference contrast area includes black, and the composition subunit is specifically configured to select a candidate target point with a black color from the color difference contrast area as the target point to be determined; the candidate target point consists of one or more pixel points; calculating a second color difference between the black of the target point to be determined and a second target color of a second target point; if the second chroma is larger than or equal to a second threshold value, taking the target point to be determined as a first target point; and selecting at least one first target point to form a reference area.
9. The apparatus according to claim 6, wherein the calculating unit is specifically configured to calculate a ratio of the blurred pixel length to a shutter time to obtain the shake velocity.
10. The apparatus according to claim 6, wherein the parameter obtaining unit is specifically configured to input the dithering speed into a genetic algorithm model to obtain a target parameter output by the genetic algorithm model; the target parameter is a parameter for proportional-integral-derivative control; the genetic algorithm model is generated by training through training data, and the training data comprises a training speed, a training parameter and a label value corresponding to the training parameter and the training speed; the training parameter is a parameter of proportional-integral-derivative control; and taking the target parameter and the jitter direction as angle adjusting parameters.
CN202010909069.1A 2020-09-02 2020-09-02 Camera adjusting method and device Active CN112019749B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010909069.1A CN112019749B (en) 2020-09-02 2020-09-02 Camera adjusting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010909069.1A CN112019749B (en) 2020-09-02 2020-09-02 Camera adjusting method and device

Publications (2)

Publication Number Publication Date
CN112019749A CN112019749A (en) 2020-12-01
CN112019749B true CN112019749B (en) 2021-06-25

Family

ID=73516283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010909069.1A Active CN112019749B (en) 2020-09-02 2020-09-02 Camera adjusting method and device

Country Status (1)

Country Link
CN (1) CN112019749B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760465A (en) * 2021-07-20 2022-07-15 杭州海康威视数字技术股份有限公司 System and method for calculating anti-shake performance of camera

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7720302B2 (en) * 2003-09-25 2010-05-18 Fujifilm Corporation Method, apparatus and program for image processing
CN104967788A (en) * 2014-08-28 2015-10-07 小米科技有限责任公司 Shooting method and shooting device
CN106161932B (en) * 2016-06-30 2019-09-27 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN108156382A (en) * 2017-12-29 2018-06-12 上海爱优威软件开发有限公司 A kind of photo processing method and terminal
CN110264415B (en) * 2019-05-24 2020-06-12 北京爱诺斯科技有限公司 Image processing method for eliminating jitter blur
CN110602393B (en) * 2019-09-04 2020-06-05 南京博润智能科技有限公司 Video anti-shake method based on image content understanding

Also Published As

Publication number Publication date
CN112019749A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
US10205896B2 (en) Automatic lens flare detection and correction for light-field images
US9305375B2 (en) High-quality post-rendering depth blur
US8754963B2 (en) Processing images having different focus
KR101060488B1 (en) Optimal Image Selection Method and Device
CN101516001B (en) Digital photographing apparatus, method of controlling the digital photographing apparatus, and recording medium
US7764844B2 (en) Determining sharpness predictors for a digital image
JP6218377B2 (en) Image processing apparatus and image processing method
CN104067605A (en) Image-capturing device, captured image processing system, program, and recording medium
CN105787480B (en) Method and device for shooting test questions
CN101374196A (en) Image pickup system and image processing programme
TWI383673B (en) Method and device for adjusting weighting values in light metering
JP2000358157A (en) Method and device for compensating optical attenuation of digital image
CN112019749B (en) Camera adjusting method and device
WO2008102296A2 (en) Method for enhancing the depth sensation of an image
JP3992720B2 (en) Image correction apparatus, image correction method, program, and recording medium
JP7363770B2 (en) Computing device, computing method and program
CN114205580A (en) Method and device for evaluating anti-shake effect of camera module
CN102090054B (en) Imaging device, image processing program, image processing device, and image processing method
CN101115144A (en) Image processing apparatus, image processing method, and program
KR101923162B1 (en) System and Method for Acquisitioning HDRI using Liquid Crystal Panel
US11595584B2 (en) Imaging apparatus, method of controlling imaging apparatus and computer-readable medium
JPH1011577A (en) Picture measuring method
JP4043499B2 (en) Image correction apparatus and image correction method
EP1363461A2 (en) Processing of digital images
JP2008252227A (en) Image processor, imaging apparatus, and image processing program

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