CN112288649A - Image correction method and device for cylindrical object perspective imaging distortion - Google Patents

Image correction method and device for cylindrical object perspective imaging distortion Download PDF

Info

Publication number
CN112288649A
CN112288649A CN202011164277.XA CN202011164277A CN112288649A CN 112288649 A CN112288649 A CN 112288649A CN 202011164277 A CN202011164277 A CN 202011164277A CN 112288649 A CN112288649 A CN 112288649A
Authority
CN
China
Prior art keywords
cylindrical object
image
point
perspective
cylindrical
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
CN202011164277.XA
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 Hongyue Information Technology Co ltd
Original Assignee
Changan University
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 Changan University filed Critical Changan University
Priority to CN202011164277.XA priority Critical patent/CN112288649A/en
Publication of CN112288649A publication Critical patent/CN112288649A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • G06T5/80
    • G06T3/073
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Abstract

An image correction method and device for cylindrical object perspective imaging distortion are provided, wherein the image correction method comprises the following steps: step one, finding out edge lines on two sides of a cylindrical object, and independently extracting image areas of the cylindrical object; secondly, establishing a coordinate system for the cylindrical object image area according to a height central line and a width central line of the original image; thirdly, obtaining the angle of the shot cylindrical object according to the shooting focal length of the camera and the positive direction width of the cylindrical object image area, and then obtaining the distance from the center of the cylindrical object to the focus by combining the radius of the cylindrical object; and corresponding each point on the perspective distorted image of the cylindrical object to each point on the corrected image, thereby correcting the perspective distorted image. The invention also provides an image correction system for perspective imaging distortion of the cylindrical object, a terminal device and a computer readable storage medium. The invention can measure the shape, texture or damage size of the cylindrical curved surface more accurately.

Description

Image correction method and device for cylindrical object perspective imaging distortion
Technical Field
The invention belongs to the field of image processing, and relates to an image correction method and device for perspective imaging distortion of a cylindrical object.
Background
In 2010, researchers at Tianjin science and technology university propose a three-dimensional object surface texture reconstruction method based on a cylindrical back projection algorithm, the method only equates the shooting condition of a cylindrical object to a telecentric lens imaging model, and the model only occupies a small proportion in practical problems and is not applicable to a large number of pinhole imaging models in engineering. Currently, the detection technology based on image processing becomes the research direction of a large number of scientific researchers, and a plurality of new technologies and new devices appear. When the surface of the cylindrical object is detected, a simple and effective method is not available, the deformation of the image of the cylindrical object can be corrected according to the actual surface texture, and then the perspective imaging distortion image is directly processed in the detection process, so that the detection result has larger error with the actual condition. Based on the above situation, it is necessary to provide a correction method for correcting the distorted cylindrical image.
Disclosure of Invention
The present invention aims to solve the problem of the prior art that no distorted image is corrected during the surface detection of the cylindrical object, and provides a method and a device for correcting the distorted image of the perspective imaging of the cylindrical object, which can avoid the occurrence of a large error in the detection result and enable the measurement of the shape, texture or damage size of the cylindrical curved surface to be more accurate.
In order to achieve the purpose, the invention has the following technical scheme:
an image correction method for cylindrical object perspective imaging distortion comprises the following steps:
step one, finding out edge lines on two sides of a cylindrical object, and independently extracting image areas of the cylindrical object;
secondly, establishing a coordinate system for the cylindrical object image area according to a height central line and a width central line of the original image;
thirdly, obtaining the angle of the shot cylindrical object according to the shooting focal length of the camera and the positive direction width of the cylindrical object image area, and then obtaining the distance from the center of the cylindrical object to the focus by combining the radius of the cylindrical object; and corresponding each point on the perspective distorted image of the cylindrical object to each point on the corrected image, thereby correcting the perspective distorted image.
As a preferable mode of the image correction method according to the present invention, in the second step, a y-axis of a coordinate system is established according to a height center line of the original image, and an x-axis of the coordinate system is established according to a width center line.
As a preferable embodiment of the image correction method of the present invention, in the third step, the focal length of the image taken by the camera is known as f, the radius of the cylindrical object is known as r, the positive image width x0 of the cylindrical object region is known, and the angle α of the cylindrical object and the distance z from the center of the cylindrical object to the focal point are obtained by the following equation:
α=π-arctan(x0/f)
z=r/cosα
any point (x) on the cylindrical object image1,y1) And the corresponding point (x) on the image after correction thereof2,y2) The relationship is as follows:
Figure BDA0002745298130000021
Figure BDA0002745298130000022
and corresponding each point on the cylindrical object perspective distortion image to each point on the corrected image according to the formula, so that the perspective distortion image is corrected.
The invention also provides an image correction system for perspective imaging distortion of a cylindrical object, which comprises:
the cylindrical object image area extraction module is used for finding out the sidelines on the two sides of the cylindrical object and independently extracting the cylindrical object image area;
the coordinate system establishing module is used for establishing a coordinate system for the cylindrical object image area according to the height central line and the width central line of the original image;
the image correction module is used for solving the angle of the shot cylindrical object according to the shooting focal length of the camera and the positive direction width of the cylindrical object image area, and solving the distance from the center of the cylindrical object to the focal point by combining the radius of the cylindrical object; and corresponding each point on the cylindrical object perspective distortion image to each point on the corrected image, so that the perspective distortion image is corrected.
The invention also provides a terminal device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of the image correction method for the perspective imaging distortion of the cylindrical object when executing the computer program.
The present invention also provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the image correction method for distortion of perspective imaging of a cylindrical object.
Compared with the prior art, the invention has the following beneficial effects: through analyzing the image characteristics of the current pinhole model imaging and the geometric dimension relation of the cylindrical object image, the cylindrical image has larger distortion to the display of the surface texture of the actual cylindrical object, especially when the surface damage is detected, the identification error of the surface image is easy to occur, and if the surface is not expanded according to the actual condition, the detection result has large error. The invention is equivalent to unfolding the cylindrical curved surface into a plane for imaging, so that perspective distortion images are corrected, the adverse effect of the 'near-large-far-small' phenomenon in perspective imaging on a measurement result is eliminated, and the measurement of the shape, texture or damage size of the cylindrical curved surface is more accurate.
Drawings
FIG. 1 is a schematic diagram of a distorted image of a cylindrical object in perspective imaging according to an embodiment 1 of the present invention;
FIG. 2 is a schematic diagram of the present invention for extracting cylindrical object image regions separately;
FIG. 3 is a schematic diagram of a coordinate system established according to a height center line and a width center line of an original image;
FIG. 4 is a schematic diagram of an image distorted by perspective imaging of a cylindrical object according to embodiment 2 of the present invention;
FIG. 5 is a schematic diagram of an image after correction in embodiment 2 of the present invention.
Detailed Description
Referring to fig. 1-3, the method for correcting distorted images of perspective imaging of cylindrical objects according to the present invention comprises the following steps:
step one, finding out edge lines on two sides of a cylindrical object, and independently extracting image areas of the cylindrical object;
establishing a coordinate system for the cylindrical object image area according to a height central line and a width central line of the original image, establishing a y axis of the coordinate system according to the height central line of the original image, and establishing an x axis of the coordinate system according to the width central line;
thirdly, obtaining the angle of the shot cylindrical object according to the shooting focal length of the camera and the positive direction width of the cylindrical object image area, and then obtaining the distance from the center of the cylindrical object to the focus by combining the radius of the cylindrical object; and corresponding each point on the perspective distorted image of the cylindrical object to each point on the corrected image, thereby correcting the perspective distorted image.
Knowing the focal length of the camera and the radius of the cylindrical object as f, the positive image width x0 of the cylindrical object area is known, and the angle α of the cylindrical object and the distance z from the center of the cylindrical object to the focal point are obtained by the following equation:
α=π-arctan(x0/f)
z=r/cosα
any point (x) on the cylindrical object image1,y1) And the corresponding point (x) on the image after correction thereof2,y2) The relationship is as follows:
Figure BDA0002745298130000041
Figure BDA0002745298130000042
and corresponding each point on the cylindrical object perspective distortion image to each point on the corrected image according to the formula.
Referring to fig. 4 and 5, the image correction method for cylindrical object perspective imaging distortion is equivalent to unfolding a cylindrical curved surface into a plane for imaging, so that a perspective distortion image is corrected, the adverse effect of the 'near-large-far-small' phenomenon in perspective imaging on a measurement result is eliminated, and the measurement of the shape, texture or damage size of the cylindrical curved surface is more accurate.
The invention also provides an image correction system for perspective imaging distortion of a cylindrical object, which comprises:
the cylindrical object image area extraction module is used for finding out the sidelines on the two sides of the cylindrical object and independently extracting the cylindrical object image area;
the coordinate system establishing module is used for establishing a coordinate system for the cylindrical object image area according to the height central line and the width central line of the original image;
the image correction module is used for solving the angle of the shot cylindrical object according to the shooting focal length of the camera and the positive direction width of the cylindrical object image area, and solving the distance from the center of the cylindrical object to the focal point by combining the radius of the cylindrical object; and corresponding each point on the cylindrical object perspective distortion image to each point on the corrected image, so that the perspective distortion image is corrected.
The invention also provides a terminal device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of the image correction method for the perspective imaging distortion of the cylindrical object when executing the computer program.
The present invention also provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the image correction method for distortion of perspective imaging of a cylindrical object.
The computer program may be divided into one or more modules/units, which are stored in the memory and executed by the processor to perform the method of the invention.
The terminal device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices, and can also be a processor and a memory. The processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of feature extraction for multiple focus sequence images by running or executing the computer programs and/or modules stored in the memory and invoking data stored in the memory.
The above description is only one specific example of the present invention and should not be construed as limiting the invention in any way. It will be apparent to persons skilled in the art that various modifications and variations in form and detail can be made therein without departing from the spirit and principles of the invention, and these modifications and variations will fall within the scope of the invention as defined by the appended claims.

Claims (6)

1. An image correction method for cylindrical object perspective imaging distortion is characterized by comprising the following steps:
step one, finding out edge lines on two sides of a cylindrical object, and independently extracting image areas of the cylindrical object;
secondly, establishing a coordinate system for the cylindrical object image area according to a height central line and a width central line of the original image;
thirdly, obtaining the angle of the shot cylindrical object according to the shooting focal length of the camera and the positive direction width of the cylindrical object image area, and then obtaining the distance from the center of the cylindrical object to the focus by combining the radius of the cylindrical object; and corresponding each point on the perspective distorted image of the cylindrical object to each point on the corrected image, thereby correcting the perspective distorted image.
2. The method for correcting distorted image of cylindrical object perspective imaging according to claim 1, wherein: and step two, establishing a y axis of a coordinate system according to a height central line of the original image, and establishing an x axis of the coordinate system according to a width central line.
3. The method of claim 1, wherein the focal length of the camera is f, the radius of the cylindrical object is r, the positive direction width x0 of the image of the cylindrical object area is known, and the angle α of the cylindrical object, the distance z between the center of the cylindrical object and the focal point are obtained by the following formula:
α=π-arctan(x0/f)
z=r/cosα
any point (x) on the cylindrical object image1,y1) And the corresponding point (x) on the image after correction thereof2,y2) The relationship is as follows:
Figure FDA0002745298120000011
Figure FDA0002745298120000012
and corresponding each point on the cylindrical object perspective distortion image to each point on the corrected image according to the formula, so that the perspective distortion image is corrected.
4. An image correction system for distortion of fluoroscopic imaging of a cylindrical object, comprising:
the cylindrical object image area extraction module is used for finding out the sidelines on the two sides of the cylindrical object and independently extracting the cylindrical object image area;
the coordinate system establishing module is used for establishing a coordinate system for the cylindrical object image area according to the height central line and the width central line of the original image;
the image correction module is used for solving the angle of the shot cylindrical object according to the shooting focal length of the camera and the positive direction width of the cylindrical object image area, and solving the distance from the center of the cylindrical object to the focal point by combining the radius of the cylindrical object; and corresponding each point on the cylindrical object perspective distortion image to each point on the corrected image, so that the perspective distortion image is corrected.
5. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: the processor, when executing the computer program, implements the steps of the method for correcting distorted images of perspective imaging of cylindrical objects according to any one of claims 1 to 3.
6. A computer-readable storage medium storing a computer program, characterized in that: the computer program when executed by a processor implements the steps of the method for image correction of distortion in fluoroscopic imaging of a cylindrical object as claimed in any one of claims 1 to 3.
CN202011164277.XA 2020-10-27 2020-10-27 Image correction method and device for cylindrical object perspective imaging distortion Pending CN112288649A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011164277.XA CN112288649A (en) 2020-10-27 2020-10-27 Image correction method and device for cylindrical object perspective imaging distortion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011164277.XA CN112288649A (en) 2020-10-27 2020-10-27 Image correction method and device for cylindrical object perspective imaging distortion

Publications (1)

Publication Number Publication Date
CN112288649A true CN112288649A (en) 2021-01-29

Family

ID=74372519

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011164277.XA Pending CN112288649A (en) 2020-10-27 2020-10-27 Image correction method and device for cylindrical object perspective imaging distortion

Country Status (1)

Country Link
CN (1) CN112288649A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112446823A (en) * 2021-02-01 2021-03-05 武汉中科通达高新技术股份有限公司 Monitoring image display method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000331151A (en) * 1999-05-25 2000-11-30 Nec Corp Image processing method, image distortion correction processor and storage medium recording program of the processor
WO2019049421A1 (en) * 2017-09-08 2019-03-14 株式会社ソニー・インタラクティブエンタテインメント Calibration device, calibration system, and calibration method
CN110738608A (en) * 2019-05-27 2020-01-31 首都师范大学 plane image correction method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000331151A (en) * 1999-05-25 2000-11-30 Nec Corp Image processing method, image distortion correction processor and storage medium recording program of the processor
WO2019049421A1 (en) * 2017-09-08 2019-03-14 株式会社ソニー・インタラクティブエンタテインメント Calibration device, calibration system, and calibration method
CN111095923A (en) * 2017-09-08 2020-05-01 索尼互动娱乐股份有限公司 Calibration device, calibration system, and calibration method
CN110738608A (en) * 2019-05-27 2020-01-31 首都师范大学 plane image correction method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
宋阳;周亚丽;张奇志;: "鱼眼镜头径向畸变的校正方法", 仪器仪表学报, no. 04 *
钱炜燕;胡晓彤;: "基于柱面反投影算法的三维物体表面纹理重建", 天津科技大学学报, no. 03 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112446823A (en) * 2021-02-01 2021-03-05 武汉中科通达高新技术股份有限公司 Monitoring image display method and device

Similar Documents

Publication Publication Date Title
CN107633536B (en) Camera calibration method and system based on two-dimensional plane template
CN109035320B (en) Monocular vision-based depth extraction method
CN111145238B (en) Three-dimensional reconstruction method and device for monocular endoscopic image and terminal equipment
Jeon et al. Accurate depth map estimation from a lenslet light field camera
WO2019200837A1 (en) Method and system for measuring volume of parcel, and storage medium and mobile terminal
WO2019184885A1 (en) Method, apparatus and electronic device for calibrating extrinsic parameters of camera
CN107507277B (en) Three-dimensional point cloud reconstruction method and device, server and readable storage medium
CN109784250B (en) Positioning method and device of automatic guide trolley
CN109479082B (en) Image processing method and apparatus
CN111028205B (en) Eye pupil positioning method and device based on binocular distance measurement
CN111160232B (en) Front face reconstruction method, device and system
WO2021208486A1 (en) Camera coordinate transformation method, terminal, and storage medium
CN112085033A (en) Template matching method and device, electronic equipment and storage medium
WO2019232793A1 (en) Two-camera calibration method, electronic device and computer-readable storage medium
CN111681186A (en) Image processing method and device, electronic equipment and readable storage medium
CN111311671B (en) Workpiece measuring method and device, electronic equipment and storage medium
CN111950554A (en) Identification card identification method, device, equipment and storage medium
WO2022267939A1 (en) Image processing method and apparatus, and computer-readable storage medium
CN112288649A (en) Image correction method and device for cylindrical object perspective imaging distortion
CN113298870B (en) Object posture tracking method and device, terminal equipment and storage medium
CN107680035B (en) Parameter calibration method and device, server and readable storage medium
CN113902853A (en) Face three-dimensional reconstruction method and device, electronic equipment and storage medium
TWI592897B (en) Image Recognition Accelerator System
CN111260574B (en) Seal photo correction method, terminal and computer readable storage medium
CN109859313B (en) 3D point cloud data acquisition method and device, and 3D data generation method and system

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240319

Address after: 518000 1104, Building A, Zhiyun Industrial Park, No. 13, Huaxing Road, Henglang Community, Longhua District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Hongyue Information Technology Co.,Ltd.

Country or region after: Zhong Guo

Address before: 710064 middle section, south two ring road, Shaanxi, Xi'an

Applicant before: CHANG'AN University

Country or region before: Zhong Guo