CN111464744A - Electric meter image auxiliary acquisition method based on gyroscope sensor - Google Patents
Electric meter image auxiliary acquisition method based on gyroscope sensor Download PDFInfo
- Publication number
- CN111464744A CN111464744A CN202010279602.0A CN202010279602A CN111464744A CN 111464744 A CN111464744 A CN 111464744A CN 202010279602 A CN202010279602 A CN 202010279602A CN 111464744 A CN111464744 A CN 111464744A
- Authority
- CN
- China
- Prior art keywords
- auxiliary frame
- image
- acquisition device
- image acquisition
- vertical line
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/64—Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
Abstract
The invention relates to the technical field of image acquisition, in particular to an ammeter image auxiliary acquisition method based on a gyroscope sensor, which comprises the following steps: judging a photographing mode of the image acquisition device; if the shooting mode is positive, drawing a vertical line, drawing a shooting interface auxiliary frame according to the vertical line, and acquiring an ammeter image according to the auxiliary frame; if the shooting mode is the upward shooting mode, drawing a vertical line, and establishing a three-dimensional coordinate system; acquiring the angular speed and the rotation time of the image acquisition device rotating around the X axis through a gyroscope sensor, and calculating in real time to obtain the rotation angle of the image acquisition device around the X axis; and drawing a real-time auxiliary frame of a photographing interface according to the rotation angle of the image acquisition device around the X axis, and acquiring an electric meter image according to the auxiliary frame. The invention ensures that the acquired image is positioned in the middle of the screen and does not incline, thereby obtaining the high-quality image with the electricity meter centered and not inclining.
Description
Technical Field
The invention relates to the technical field of image acquisition, in particular to an ammeter image auxiliary acquisition method based on a gyroscope sensor.
Background
In the power grid system, the data of the electric energy meter are collected and patrolled, professional personnel are required to examine and check on site, a large amount of manpower and material resources are consumed, the mobile terminal application is developed, electric power personnel collect the images of the electric energy meter and upload the images to a server side, then intelligent evaluation is carried out on the appearance of the meter box, if the types and the installation positions of the meter box are judged and evaluated, the intelligent monitoring on the meter box can be achieved, and the manpower and the material resources can be greatly saved.
The ammeter image acquisition is the first step of the whole process, the quality of the acquired ammeter image (indicating whether the ammeter is centered or not and has no inclination) affects the effect of subsequent intelligent algorithm analysis, and no related method for assisting in photographing the ammeter exists at present.
Disclosure of Invention
In order to solve the problems, the invention provides an electric meter image auxiliary acquisition method based on a gyroscope sensor.
An ammeter image auxiliary acquisition method based on a gyroscope sensor is applied to acquisition of an ammeter image through an image acquisition device, the image acquisition device is provided with the gyroscope sensor, and the method comprises the following steps:
judging a photographing mode of the image acquisition device;
if the shooting mode is positive, drawing a vertical line, drawing a shooting interface auxiliary frame according to the vertical line, and acquiring an ammeter image according to the auxiliary frame;
if the shooting mode is the upward shooting mode, drawing a vertical line, and establishing a three-dimensional coordinate system, wherein the X-axis direction is horizontal from left to right, the Y-axis direction is vertical from bottom to top, and the Z-axis direction is vertical to the image acquisition device from back to front;
acquiring the angular speed and the rotation time of the image acquisition device rotating around the X axis through a gyroscope sensor, and calculating in real time to obtain the rotation angle of the image acquisition device around the X axis;
and drawing a real-time auxiliary frame of a photographing interface according to the rotation angle of the image acquisition device around the X axis, and acquiring an electric meter image according to the auxiliary frame.
Preferably, if the shooting mode is the positive shooting mode, the drawing the vertical line includes:
obtaining a photographing interface size w1*h1The position of the vertical line is w1A height of 4/3w1Wherein w is1Width of the photographic interface, h1Is the height of the camera interface.
Preferably, the drawing of the photographing interface auxiliary frame according to the vertical line includes:
obtaining the length-width ratio a of the electric meter, and calculating the width w of the auxiliary frame1' height h of picture-taking interface1Aspect ratio a of the electricity meter;
position w according to the vertical line1Respectively adding or subtracting w1'/2, the left and right boundaries of the auxiliary frame can be obtained, and the auxiliary frame is finally obtained.
Preferably, in the upward shooting mode, the drawing of the vertical line includes:
acquisition batSize of illuminated interface w2*h2The position of the vertical line is w2A height of 4/3w2Wherein w is2Width of the photographic interface, h2Is the height of the camera interface.
Preferably, the step of drawing the real-time auxiliary frame of the photographing interface according to the angle of rotation of the image acquisition device around the X axis includes:
calculating the angle degree [0] of the image acquisition device rotating around the X axis, and calculating the offset M-M
(depth [0] -90), wherein M is a set coefficient;
obtaining the length-width ratio a of the electric meter, and calculating the width w of the auxiliary frame2' height h of picture-taking interface2Aspect ratio a of the electricity meter;
the coordinate value of the upper left corner point of the auxiliary frame is calculated as (w)2/2-w2'/2-m) and the coordinate value of the left lower corner point x of the auxiliary frame is (w)2/2-w2'/2 + m) and the coordinate value of the upper right corner point of the auxiliary frame x is (w)2/2+w2'/2 + m) and the coordinate value of the right lower corner point x of the auxiliary frame is (w)2/2+w2’/2-m);
And sequentially connecting the upper left corner point, the lower left corner point, the upper right corner point and the lower right corner point to obtain the auxiliary frame.
The invention has the beneficial effects that: by judging the photographing mode of the image acquisition device, if the photographing mode is a positive photographing mode, drawing a vertical line, drawing a photographing interface auxiliary frame according to the vertical line, and acquiring an ammeter image according to the auxiliary frame; if the shooting mode is the upward shooting mode, drawing a vertical line, and establishing a three-dimensional coordinate system, wherein the X-axis direction is horizontal from left to right, the Y-axis direction is vertical from bottom to top, and the Z-axis direction is vertical to the image acquisition device from back to front; acquiring the angular speed and the rotation time of the image acquisition device rotating around the X axis through a gyroscope sensor, and calculating in real time to obtain the rotation angle of the image acquisition device around the X axis; and drawing a real-time auxiliary frame of a photographing interface according to the rotation angle of the image acquisition device around the X axis, and acquiring an electric meter image according to the auxiliary frame. And adjusting the inclination angle of the image acquisition device according to the vertical line and the auxiliary frame to ensure that the acquired image is not inclined in the middle of the screen, so that a high-quality image with a centered and non-inclined ammeter is obtained.
Drawings
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a schematic flow chart diagram of an embodiment of the present invention;
FIG. 2 is a schematic diagram of a three-dimensional coordinate system in an embodiment of the invention;
FIG. 3 is a schematic diagram of a coordinate system of a gyroscope sensor in an embodiment of the invention.
Detailed Description
The technical solutions of the present invention will be further described below with reference to the accompanying drawings, but the present invention is not limited to these embodiments.
The basic idea of the invention is that the auxiliary frame is displayed on the photographing interface aiming at different photographing modes of the image acquisition device, and a user can take photos according to the auxiliary frame, thereby ensuring that the acquired images are positioned in the middle of the screen and do not incline.
Based on the above thought, this embodiment proposes an electric meter image auxiliary acquisition method based on a gyroscope sensor, which is applied to acquisition of an electric meter image by an image acquisition device, where the image acquisition device is equipped with a gyroscope sensor, as shown in fig. 1, and the method includes the following steps:
s1: and judging the photographing mode of the image acquisition device.
Under the general condition, when the mounted position of ammeter was lower, the user can adopt the mode of just shooing to carry out the collection of image through image acquisition device, and when the mounted position of ammeter was higher, the user can adopt the mode of looking up to shoot to carry out the collection of image through image acquisition device.
In this embodiment, the image capturing device is generally a mobile phone with a photographing function and a gyroscope sensor, and may be another electronic terminal with a photographing function and a gyroscope sensor.
The gyroscope sensor is arranged in the image acquisition device, and the posture of the image acquisition device can be judged according to the detection of the gyroscope sensor on the image acquisition device, so that the photographing mode of the image acquisition device is judged.
S2: if the shooting mode is positive, drawing a vertical line, drawing a shooting interface auxiliary frame according to the vertical line, and collecting the ammeter image according to the auxiliary frame.
Specifically, the size w of the photographing interface is first obtained1*h1Generally, will h1Set to 5, the position of the vertical line is w1A height of 4/3w1Wherein w is1Width of the photographic interface, h1Is the height of the camera interface.
Then, the length-width ratio a of the electric meter is obtained, and the width w of the auxiliary frame is calculated1' height h of picture-taking interface1Aspect ratio a of the electricity meter; position w according to the vertical line1Respectively adding or subtracting w1'/2, the left and right boundaries of the auxiliary frame can be obtained, and the auxiliary frame is finally obtained, wherein the auxiliary frame is a rectangular frame.
When the ammeter is shot, the position of the auxiliary frame is only statically displayed. Current meters have an aspect ratio of about 12: 7.06, so the width can be estimated from the height of the meter. When the electric meter occupies the photographing interface and is close to the upper and lower boundaries, the height of the photographing interface is used to approximate the height of the electric meter, so that the width of the auxiliary frame (electric meter width), i.e., w, can be calculated1’=h1*7.06/12。
S3: if the shooting mode is the upward shooting mode, drawing a vertical line, and establishing a three-dimensional coordinate system, wherein the X-axis direction is horizontal from left to right, the Y-axis direction is vertical from bottom to top, and the Z-axis direction is vertical to the image acquisition device from back to front.
The drawing of the vertical line adopts the same method as the positive shooting mode: obtaining a photographing interface size w2*h2The position of the vertical line is w2A height of 4/3w2Wherein w is2Width of the photographic interface, h2Is the height of the camera interface. Wherein, a schematic diagram of a three-dimensional coordinate system is shown in fig. 2.
S4: and obtaining the angular speed and the rotation time of the image acquisition device rotating around the X axis through a gyroscope sensor, and calculating in real time to obtain the angle of the image acquisition device rotating around the X axis.
Each channel of the gyro sensor detects one axis rotation, fig. 3 is a schematic diagram of a coordinate system of the gyro sensor, where R is an inertial force vector, Rxz is a projection of R on an XZ plane, Ryz is a projection of R on a YZ plane, and an angle formed by the Z axis and the Rxz, Ryz vectors is defined as follows: the included angle between AXZ-Rxz (projection of vector R on XZ plane) and Z axis, AYZ-Ryz (projection of vector R on YZ plane), and Z axis.
The gyro sensor measures the rate of change of the angle defined above. Assuming that at time t0, the angle of rotation about the Y axis (i.e., Axz) has been measured, defined as Axz0, then at time t1, this angle is measured again, yielding Axz 1. The calculation formula of the angle change rate is as follows: RateAxz ═ (Axz 1-Axz 0)/(t 1-t 0).
Therefore, the angular speed and the rotation time of the image acquisition device rotating around the X axis are obtained through the gyroscope sensor, and the rotation angle of the image acquisition device rotating around the X axis can be obtained through real-time calculation.
S5: and drawing a real-time auxiliary frame of a photographing interface according to the rotation angle of the image acquisition device around the X axis, and acquiring an electric meter image according to the auxiliary frame.
First, according to step S4, an angle degree [0] of the rotation of the image pickup device about the X axis is calculated, and an offset M ═ M (degree [0] -90) is calculated, where M is a set coefficient.
Then, the length-width ratio a of the electric meter is obtained, and the width w of the auxiliary frame is calculated2' height h of picture-taking interface2Aspect ratio a of the electricity meter.
When the pitching angle of the image acquisition device is larger, theoretically, the difference between the upper side length and the lower side length of the auxiliary frame is larger, the difference can be regarded as that the four corner points of the auxiliary frame are respectively added and subtracted by a certain variable value to obtain the variable, and the variable is stored by an intermediate variable m, wherein m can be 1.5 (degree 0)]-90), 1.5 is a multiplying factor generally set to [1,2 ]]. Then, the coordinate value of the upper left corner point x of the auxiliary frame is calculated as (w)2/2-w2'/2-m) and the coordinate value of the left lower corner point x of the auxiliary frame is (w)2/2-w2'/2 + m), and auxiliary frame upper right corner point x seatThe scalar value is (w)2/2+w2'/2 + m) and the coordinate value of the right lower corner point x of the auxiliary frame is (w)2/2+w2’/2-m)。
And finally, sequentially connecting the upper left corner point, the lower left corner point, the upper right corner point and the lower right corner point to obtain an auxiliary frame, wherein the auxiliary frame is a trapezoid frame. And continuously returning an updated angle value according to the gyroscope sensor, and continuously updating the position of the auxiliary frame on the photographing interface in real time.
The invention adopts an ammeter image auxiliary acquisition method based on a gyroscope sensor, calculates the inclination angle of an image acquisition device at an axis X, Y, Z according to the angular speed obtained from the gyroscope sensor, displays a trapezoidal frame and a vertical line in a screen, so that a photographer can adjust the pitch angle of photographing and the distance position from the ammeter according to the inclination angle, wraps the ammeter pair auxiliary frame in the auxiliary frame, adjusts the inclination angle of the image acquisition device according to the vertical line and the auxiliary frame, ensures that the acquired image is positioned in the middle of the screen and does not incline, and obtains a high-quality image with the ammeter centered and not inclining. If the positive shooting mode is selected, the shooting person and the ammeter are in the same horizontal height by default, a rectangular frame, a horizontal line and a vertical line are drawn in the screen, and the adjustment method is the same as the negative shooting mode.
Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.
Claims (5)
1. An ammeter image auxiliary acquisition method based on a gyroscope sensor is applied to acquisition of an ammeter image through an image acquisition device, wherein the image acquisition device is provided with the gyroscope sensor, and is characterized by comprising the following steps:
judging a photographing mode of the image acquisition device;
if the shooting mode is positive, drawing a vertical line, drawing a shooting interface auxiliary frame according to the vertical line, and acquiring an ammeter image according to the auxiliary frame;
if the shooting mode is the upward shooting mode, drawing a vertical line, and establishing a three-dimensional coordinate system, wherein the X-axis direction is horizontal from left to right, the Y-axis direction is vertical from bottom to top, and the Z-axis direction is vertical to the image acquisition device from back to front;
acquiring the angular speed and the rotation time of the image acquisition device rotating around the X axis through a gyroscope sensor, and calculating in real time to obtain the rotation angle of the image acquisition device around the X axis;
and drawing a real-time auxiliary frame of a photographing interface according to the rotation angle of the image acquisition device around the X axis, and acquiring an electric meter image according to the auxiliary frame.
2. The electric meter image auxiliary acquisition method based on the gyroscope sensor as claimed in claim 1, wherein if the electric meter is in a positive shooting mode, the drawing of the vertical line comprises:
obtaining a photographing interface size w1*h1The position of the vertical line is w1A height of 4/3w1Wherein w is1Width of the photographic interface, h1Is the height of the camera interface.
3. The electric meter image auxiliary acquisition method based on the gyroscope sensor as claimed in claim 2, wherein the drawing of the photographing interface auxiliary frame according to the vertical line comprises:
obtaining the length-width ratio a of the electric meter, and calculating the width w of the auxiliary frame1' height h of picture-taking interface1Aspect ratio a of the electricity meter;
position w according to the vertical line1Respectively adding or subtracting w1'/2, the left and right boundaries of the auxiliary frame can be obtained, and the auxiliary frame is finally obtained.
4. The method as claimed in claim 1, wherein if the electric meter image auxiliary collection method is in a supine shooting mode, the drawing of the vertical line comprises:
obtaining a photographing interface size w2*h2The position of the vertical line isw2A height of 4/3w2Wherein w is2Width of the photographic interface, h2Is the height of the camera interface.
5. The electric meter image auxiliary acquisition method based on the gyroscope sensor as claimed in claim 1, wherein the drawing of the real-time auxiliary frame of the photographing interface according to the angle of rotation of the image acquisition device around the X-axis comprises:
calculating an angle degree [0] of the image acquisition device rotating around the X axis, and calculating an offset M-M (degree [0] -90), wherein M is a set coefficient;
obtaining the length-width ratio a of the electric meter, and calculating the width w of the auxiliary frame2' height h of picture-taking interface2Aspect ratio a of the electricity meter;
the coordinate value of the upper left corner point of the auxiliary frame is calculated as (w)2/2-w2'/2-m) and the coordinate value of the left lower corner point x of the auxiliary frame is (w)2/2-w2'/2 + m) and the coordinate value of the upper right corner point of the auxiliary frame x is (w)2/2+w2'/2 + m) and the coordinate value of the right lower corner point x of the auxiliary frame is (w)2/2+w2’/2-m);
And sequentially connecting the upper left corner point, the lower left corner point, the upper right corner point and the lower right corner point to obtain the auxiliary frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010279602.0A CN111464744B (en) | 2020-04-10 | 2020-04-10 | Electric meter image auxiliary acquisition method based on gyroscope sensor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010279602.0A CN111464744B (en) | 2020-04-10 | 2020-04-10 | Electric meter image auxiliary acquisition method based on gyroscope sensor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111464744A true CN111464744A (en) | 2020-07-28 |
CN111464744B CN111464744B (en) | 2021-11-30 |
Family
ID=71680628
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010279602.0A Active CN111464744B (en) | 2020-04-10 | 2020-04-10 | Electric meter image auxiliary acquisition method based on gyroscope sensor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111464744B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102209192A (en) * | 2010-03-30 | 2011-10-05 | 索尼公司 | Imaging apparatus, method of displaying and program |
CN102780842A (en) * | 2011-05-10 | 2012-11-14 | 宏达国际电子股份有限公司 | Hand-held electronic device and double image capturing method suitable for hand-held electronic device |
CN104469292A (en) * | 2014-11-27 | 2015-03-25 | 国网上海市电力公司 | Control device and method for PTZ camera with altitude self-calibration function |
CN104917964A (en) * | 2015-05-25 | 2015-09-16 | 百度在线网络技术(北京)有限公司 | Shooting realization method and apparatus of smart mobile device |
CN105744160A (en) * | 2016-02-15 | 2016-07-06 | 广东小天才科技有限公司 | Photographing method and device |
CN205508108U (en) * | 2016-03-01 | 2016-08-24 | 国网浙江奉化市供电公司 | Portable device and system of checking meter of checking meter |
CN107800956A (en) * | 2016-08-30 | 2018-03-13 | 佳能株式会社 | Picture pick-up device, control method and storage medium |
US20180184008A1 (en) * | 2016-12-27 | 2018-06-28 | Canon Kabushiki Kaisha | Imaging control apparatus and method for controlling the same |
CN108401115A (en) * | 2018-04-28 | 2018-08-14 | 北京心领神绘科技有限公司 | A kind of automatic amendment harvester and method of portable Image Acquisition terminal |
CN110830712A (en) * | 2019-09-16 | 2020-02-21 | 幻想动力(上海)文化传播有限公司 | Autonomous photographing system and method |
-
2020
- 2020-04-10 CN CN202010279602.0A patent/CN111464744B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102209192A (en) * | 2010-03-30 | 2011-10-05 | 索尼公司 | Imaging apparatus, method of displaying and program |
CN102780842A (en) * | 2011-05-10 | 2012-11-14 | 宏达国际电子股份有限公司 | Hand-held electronic device and double image capturing method suitable for hand-held electronic device |
CN104469292A (en) * | 2014-11-27 | 2015-03-25 | 国网上海市电力公司 | Control device and method for PTZ camera with altitude self-calibration function |
CN104917964A (en) * | 2015-05-25 | 2015-09-16 | 百度在线网络技术(北京)有限公司 | Shooting realization method and apparatus of smart mobile device |
CN105744160A (en) * | 2016-02-15 | 2016-07-06 | 广东小天才科技有限公司 | Photographing method and device |
CN205508108U (en) * | 2016-03-01 | 2016-08-24 | 国网浙江奉化市供电公司 | Portable device and system of checking meter of checking meter |
CN107800956A (en) * | 2016-08-30 | 2018-03-13 | 佳能株式会社 | Picture pick-up device, control method and storage medium |
US20180184008A1 (en) * | 2016-12-27 | 2018-06-28 | Canon Kabushiki Kaisha | Imaging control apparatus and method for controlling the same |
CN108401115A (en) * | 2018-04-28 | 2018-08-14 | 北京心领神绘科技有限公司 | A kind of automatic amendment harvester and method of portable Image Acquisition terminal |
CN110830712A (en) * | 2019-09-16 | 2020-02-21 | 幻想动力(上海)文化传播有限公司 | Autonomous photographing system and method |
Also Published As
Publication number | Publication date |
---|---|
CN111464744B (en) | 2021-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106996777B (en) | A kind of vision navigation method based on ground image texture | |
CN105507590B (en) | A kind of unloading control method, device and engineering machinery | |
CN105678809A (en) | Handheld automatic follow shot device and target tracking method thereof | |
CN105346706A (en) | Flight device, and flight control system and method | |
CN105447853A (en) | Flight device, flight control system and flight control method | |
JP2004233334A5 (en) | ||
CN108510540A (en) | Stereoscopic vision video camera and its height acquisition methods | |
CN112949478A (en) | Target detection method based on holder camera | |
CN109520500A (en) | One kind is based on the matched accurate positioning of terminal shooting image and streetscape library acquisition method | |
CN105872351A (en) | Method and device for shooting picture in backlight scene | |
CN110493524B (en) | Photometric adjustment method, device and equipment and storage medium | |
CN108574825A (en) | A kind of method of adjustment and device of monopod video camera | |
CN103813088A (en) | Information processing method and electronic device | |
CN102404495A (en) | Method for adjusting shooting parameters of digital camera | |
CN108900766A (en) | A kind of panorama camera of the automatic enhancement device of panoramic picture and method and the application device | |
US20040184656A1 (en) | Method for measuring object based on image and photographing apparatus | |
CN113689401A (en) | Method and device for detecting diameter of crystal bar of czochralski silicon single crystal furnace | |
CN112889272B (en) | Depth image acquisition method, depth image acquisition device and electronic device | |
CN107687818A (en) | Three-dimensional measurement method and three-dimensional measurement device | |
CN108805940A (en) | A kind of fast algorithm of zoom camera track and localization during zoom | |
CN111464744B (en) | Electric meter image auxiliary acquisition method based on gyroscope sensor | |
CN112085013A (en) | Tooth image acquisition device and image processing method | |
CN111105467A (en) | Image calibration method and device and electronic equipment | |
CN104104902B (en) | Holder direction fault detection method and device | |
CN111432074B (en) | Method for assisting mobile phone user in acquiring picture information |
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 |