CN104809703A - Simple image angle correction method - Google Patents
Simple image angle correction method Download PDFInfo
- Publication number
- CN104809703A CN104809703A CN201510198966.5A CN201510198966A CN104809703A CN 104809703 A CN104809703 A CN 104809703A CN 201510198966 A CN201510198966 A CN 201510198966A CN 104809703 A CN104809703 A CN 104809703A
- Authority
- CN
- China
- Prior art keywords
- image
- rotation
- sigma
- carry out
- value
- 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
Links
Landscapes
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
- Image Analysis (AREA)
Abstract
A simple image angle correction method comprises the following steps: pre-processing images to be corrected; keeping sizes of original images and the images to be detected the same; carrying out 360-degree rotation with a=360/a step length of a on the original images, wherein a is the rotary correction precision; carrying out NC value calculation on the n rotated original images and images to be detected respectively; selecting the angle corresponding to the maximum NC value; and carry out reversed rotation with the angle the same as the angle corresponding to the maximum NC value determined in the former step on the images to be detected.
Description
Technical field
The image correction algorithm corrected is needed after the present invention relates to a kind of rotation.
Background technology
The distortion of image has a lot of type, and the deviation of image angle is wherein comparatively common situation.But the algorithm at present for rotation correction is comparatively rare, the present invention is exactly the correcting feature focusing on the anglec of rotation improving image.
Summary of the invention
After the object of the invention is to be subject to rotation attack (namely image is subject to the rotation of unknown angle) for image, according to picture material, image rotation angle is corrected, propose a kind of arithmetic logic simply based on the image rotation correction method of NC value (normalized correlation coefficient).
For realizing the object of the present invention, be achieved by the following technical solutions:
1) carry out pre-service to image, use image resize function to carry out dimensional variation to image, i.e. image A '=σ A, σ is the zoom factor of image, and A ' is original image for image to be corrected, A, makes image to be corrected and original image keep in the same size;
2) the precision a of rotation correction is determined;
3) n=360 °/a time image rotation is carried out to original image, image rotation obtain n image rotating, the rotation mode of image is chosen as ' loose '---namely keep the picture frame of image constant, picture material rotates, and the content exceeding picture frame after rotation cuts;
4) carry out NC (0 ~ 1) value to n postrotational original image and image to be corrected respectively to calculate, if image pixel value is f (x, y), x is image horizontal ordinate, y is image ordinate, f
1(x
1, y
1) be image to be corrected, f
2(x
2, y
2) be original image.The computing formula of NC value (normalized correlation coefficient) is:
5) choose the angle b that maximum NC value is corresponding, former figure is the highest with the similarity of image to be corrected under this angle rotates, and therefore this anglec of rotation is just the anglec of rotation of image to be corrected;
6) image treating rotation carries out the reverse rotation of angle in previous step, namely treats the angle rotation that image rotating carries out-b.
Further, the present invention also comprises following scheme:
A kind of simple image angle correction method, is characterized in that comprising the steps:
1) treat correcting image and carry out pre-service, make image to be corrected and original image have same size;
2) carry out to original image the angle rotation that n=360/a step-length is 360 ° of a, wherein a is the precision of rotation correction;
3) carry out NC value to n postrotational original image and image to be corrected respectively to calculate;
4) angle that maximum NC value is corresponding is chosen;
5) reverse rotation that correcting image carries out the angle equal angular corresponding with the maximum NC value determined in previous step is treated.
Simple image angle correction method as above, wherein:
1st) step is carried out in the following way:
Carry out pre-service to image, use conventional image size change function resize to treat correcting image and carry out dimensional variation, i.e. image A '=σ A, σ is the zoom factor of image, makes two width images keep images in the same size.
Simple image angle correction method as above, wherein:
2nd) step is carried out in the following way:
N=360 °/a time image rotation is carried out to original image, image rotation obtains n image rotating, the rotation mode of image is chosen as ' loose '---namely keep the picture frame of image constant, picture material rotates, and the content exceeding picture frame after rotation cuts.
Simple image angle correction method as above, wherein:
3rd) step is carried out in the following way:
Carry out NC (0 ~ 1) value to n postrotational original image and image to be corrected respectively to calculate, to be the computing formula of f (x, y), NC value (normalized correlation coefficient) be image:
Beneficial effect of the present invention is: logic is simple, and degree of accuracy is high, and the calculated amount of image NC value is little, and therefore this algorithm speed is good.
Accompanying drawing explanation
Fig. 1 is the rotation correction schematic flow sheet of image of the present invention.
Embodiment
Below in conjunction with accompanying drawing 1, the flow process of rotation correction shown in Fig. 1 is described in detail:
(1) treat correcting image and carry out pre-service, image resize function is used to carry out dimensional variation to image, image to be corrected and original image will keep same size, also namely pre-service is carried out to image, image resize function is used to carry out dimensional variation to image, i.e. image A '=σ A, σ is the zoom factor of image, makes two width images keep image in the same size;
(2) the precision a degree of rotation correction is determined;
(3) carrying out step-length to original image is 360 ° of angles of circumference of precision a ' loose ' mode rotates; Particularly, carry out n=360 °/a time image rotation to original image, image rotation obtains n image rotating, the rotation mode of image is chosen as ' loose ', namely keep the picture frame of image constant, picture material rotates, and the content exceeding picture frame after rotation cuts;
(4) the NC value that n=360/a rotates rear original image and image to be corrected is calculated respectively: respectively NC (0 ~ 1) value is carried out to n postrotational original image and image to be corrected and calculate, if image pixel value is f (x, y), x is image horizontal ordinate, and y is image ordinate.F
1(x
1, y
1) be image to be corrected, f
2(x
2, y
2) for the computing formula of original image NC value (normalized correlation coefficient) be:
(5) the angle b that maximum NC value is corresponding is just the anglec of rotation of image to be corrected: choose the angle b that maximum NC value is corresponding, former figure is the highest with the similarity of image to be corrected under this angle rotates, and therefore this anglec of rotation is just the anglec of rotation of image to be corrected;
(6) treat the reverse rotation that image rotating carries out equal angular, namely the angle of-b rotates: the image treating rotation carries out the reverse rotation of angle in previous step, namely treats the angle rotation that image rotating carries out-b.
Beneficial effect of the present invention is: logic is simple, and degree of accuracy is high, and the calculated amount of image NC value is little, and therefore this algorithm speed is good.
Claims (4)
1. a simple image angle correction method, is characterized in that comprising the steps:
1) treat correcting image and carry out pre-service, make image to be corrected and original image have same size;
2) carry out to original image the angle rotation that n=360/a step-length is 360 ° of a, wherein a is the precision of rotation correction;
3) carry out NC value to n postrotational original image and image to be corrected respectively to calculate;
4) angle that maximum NC value is corresponding is chosen;
5) reverse rotation that correcting image carries out the angle equal angular corresponding with the maximum NC value determined in previous step is treated.
2. simple image angle correction method as claimed in claim 1, wherein:
1st) step is carried out in the following way:
Carry out pre-service to image, use image resize function to treat correcting image and carry out dimensional variation, i.e. image A '=σ A, σ is the zoom factor of image, makes original image and image to be corrected keep image in the same size.
3. simple image angle correction method as claimed in claim 1, wherein:
2nd) step is carried out in the following way:
Carry out n=360 °/a time image rotation to original image, image rotation obtains n image rotating.The rotation mode of image is chosen as ' loose ' namely keeps the picture frame of image constant, and picture material rotates, and the content exceeding picture frame after rotation cuts.
4. simple image angle correction method as claimed in claim 1, wherein:
3rd) step is carried out in the following way:
Carry out NC (0 ~ 1) value to n postrotational original image and image to be corrected respectively to calculate, the computing formula of NC value (normalized correlation coefficient) is:
Wherein image pixel value is f (x, y), x is image horizontal ordinate, and y is image ordinate, f
1(x
1, y
1) be image to be corrected, f
2(x
2, y
2) be original image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510198966.5A CN104809703A (en) | 2015-04-22 | 2015-04-22 | Simple image angle correction method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510198966.5A CN104809703A (en) | 2015-04-22 | 2015-04-22 | Simple image angle correction method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104809703A true CN104809703A (en) | 2015-07-29 |
Family
ID=53694508
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510198966.5A Pending CN104809703A (en) | 2015-04-22 | 2015-04-22 | Simple image angle correction method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104809703A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105956589A (en) * | 2016-04-27 | 2016-09-21 | 北京以萨技术股份有限公司 | Method for correcting the horizontal angle of image object |
CN106886982A (en) * | 2017-02-20 | 2017-06-23 | 江苏美伦影像系统有限公司 | CBCT image annular artifact minimizing technologies |
CN107045712A (en) * | 2017-01-19 | 2017-08-15 | 宁波江丰生物信息技术有限公司 | A kind of medical image method of adjustment and digital pathological section browse system |
WO2019127503A1 (en) * | 2017-12-29 | 2019-07-04 | 深圳配天智能技术研究院有限公司 | Image processing method, device and system |
CN116416671A (en) * | 2023-06-12 | 2023-07-11 | 太平金融科技服务(上海)有限公司深圳分公司 | Face image correcting method and device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1755707A (en) * | 2004-09-30 | 2006-04-05 | 德鑫科技股份有限公司 | Automatic correction method for tilted image |
CN101639933A (en) * | 2009-07-16 | 2010-02-03 | 上海合合信息科技发展有限公司 | Image rotation correction method and system and electronic device |
CN103325099A (en) * | 2013-07-11 | 2013-09-25 | 北京智诺英特科技有限公司 | Image correcting method and device |
-
2015
- 2015-04-22 CN CN201510198966.5A patent/CN104809703A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1755707A (en) * | 2004-09-30 | 2006-04-05 | 德鑫科技股份有限公司 | Automatic correction method for tilted image |
CN101639933A (en) * | 2009-07-16 | 2010-02-03 | 上海合合信息科技发展有限公司 | Image rotation correction method and system and electronic device |
CN103325099A (en) * | 2013-07-11 | 2013-09-25 | 北京智诺英特科技有限公司 | Image correcting method and device |
Non-Patent Citations (5)
Title |
---|
武汉三维3720060455: "图像配准算法在印刷检测中的应用——药盒印刷检测", 《HTTP://BLOG.SINA.COM.CN/S/BLOG_DDBB9E270101ILDY.HTML》 * |
段秀丽 等: "利用相似性配准技术判别肝胆CT图像扫描顺序", 《计算机工程与应用》 * |
祝明波 等: "《弹载合成孔径雷达制导及其关键技术》", 30 June 2014, 国防工业出版社 * |
綦宏伟 等: "基于机器视觉的药盒印刷质量检测系统配准算法研究", 《广东印刷》 * |
钟金荣 等: "特征提取和匹配的图像倾斜校正", 《中国图象图形学报》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105956589A (en) * | 2016-04-27 | 2016-09-21 | 北京以萨技术股份有限公司 | Method for correcting the horizontal angle of image object |
CN107045712A (en) * | 2017-01-19 | 2017-08-15 | 宁波江丰生物信息技术有限公司 | A kind of medical image method of adjustment and digital pathological section browse system |
CN106886982A (en) * | 2017-02-20 | 2017-06-23 | 江苏美伦影像系统有限公司 | CBCT image annular artifact minimizing technologies |
WO2019127503A1 (en) * | 2017-12-29 | 2019-07-04 | 深圳配天智能技术研究院有限公司 | Image processing method, device and system |
CN116416671A (en) * | 2023-06-12 | 2023-07-11 | 太平金融科技服务(上海)有限公司深圳分公司 | Face image correcting method and device, electronic equipment and storage medium |
CN116416671B (en) * | 2023-06-12 | 2023-10-03 | 太平金融科技服务(上海)有限公司深圳分公司 | Face image correcting method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104809703A (en) | Simple image angle correction method | |
US9070034B2 (en) | Method and system for correcting QR code image | |
CN105139338B (en) | The generation method and device of multidimensional lookup table, image zoom processing method and device | |
EP2518663A3 (en) | Object recognition method and recognition apparatus | |
CN103440653A (en) | Binocular vision stereo matching method | |
CN105046658A (en) | Low-illumination image processing method and device | |
CN101122998B (en) | Image interpolation method and device based on direction detection | |
CN103971586B (en) | electronic map generating method and device | |
CN104182933A (en) | Wide-angle lens image distortion correcting method based on reverse division model | |
CN104537609A (en) | Rotated image correction method | |
CN104123535A (en) | Monocular vision robot rapid tracking method based on road correction | |
CN105243399A (en) | Method of realizing image convolution and device, and method of realizing caching and device | |
CN107680043A (en) | Single image super-resolution output intent based on graph model | |
CN109034384B (en) | Data processing method and device | |
CN102567948B (en) | Method and device for processing pixel color | |
CN105913064B (en) | A kind of image vision conspicuousness detection fitting optimization method | |
CN103455974B (en) | Image sketching style processing method | |
CN108154477B (en) | Image rotation method based on FPGA | |
CN106408517A (en) | Rapid image rotation method | |
CN104748865B (en) | A kind of multi-point combination bearing calibration for infrared image | |
CN109978898A (en) | Profile testing method based on vector field energy balane | |
CN103761713A (en) | Method for calibrating uneven brightness of microcosmic oil displacement experiment image | |
CN104463803A (en) | Method and device for eliminating image saw teeth | |
CN108537810B (en) | Improved Zernike moment sub-pixel edge detection method | |
CN111260739B (en) | Picture processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150729 |
|
RJ01 | Rejection of invention patent application after publication |