[go: up one dir, main page]

CN105825476B - A Fast Image Scanning and Splicing Method Applied in DSP - Google Patents

A Fast Image Scanning and Splicing Method Applied in DSP Download PDF

Info

Publication number
CN105825476B
CN105825476B CN201610409070.1A CN201610409070A CN105825476B CN 105825476 B CN105825476 B CN 105825476B CN 201610409070 A CN201610409070 A CN 201610409070A CN 105825476 B CN105825476 B CN 105825476B
Authority
CN
China
Prior art keywords
image
line
reference line
pixel
matched
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.)
Expired - Fee Related
Application number
CN201610409070.1A
Other languages
Chinese (zh)
Other versions
CN105825476A (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.)
Yangtze Delta Region Institute of Tsinghua University Zhejiang
Original Assignee
Yangtze Delta Region Institute of Tsinghua University Zhejiang
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 Yangtze Delta Region Institute of Tsinghua University Zhejiang filed Critical Yangtze Delta Region Institute of Tsinghua University Zhejiang
Priority to CN201610409070.1A priority Critical patent/CN105825476B/en
Publication of CN105825476A publication Critical patent/CN105825476A/en
Application granted granted Critical
Publication of CN105825476B publication Critical patent/CN105825476B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • 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
    • G06T2207/10008Still image; Photographic image from scanner, fax or copier

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

本发明公开一种应用于DSP的图像快速扫描拼接方式,其包括如下步骤:步骤1:获取待拼接的图像集合,选取第一张图像和第二张图像进行拼接:首先确定基准线和匹配范围;步骤2:计算基准线上相邻像素之差;步骤3:在匹配线上确定最佳匹配位置,其中匹配线处于匹配范围内,且与基准线具有相同的高度;步骤4:实现拼接:找到最佳匹配位置之后将第二张图像在匹配线右侧的部分替换到第一张图像基准线的右侧,即得到拼接结果图像;步骤5:接下来将步骤4得到的拼接结果图像作为第一张图像,接着读取一张新图像作为第二张图像重复步骤1‑步骤4,即可实现对多张图像进行拼接。The invention discloses an image fast scanning and splicing method applied to DSP, which comprises the following steps: Step 1: acquiring a set of images to be spliced, selecting a first image and a second image for splicing: first determining a reference line and a matching range ; Step 2: Calculate the difference between adjacent pixels on the reference line; Step 3: Determine the best matching position on the matching line, where the matching line is within the matching range and has the same height as the reference line; Step 4: Implement stitching: After finding the best matching position, replace the part of the second image on the right side of the matching line to the right side of the reference line of the first image to obtain the stitching result image; Step 5: Next, use the stitching result image obtained in Step 4 as The first image, then read a new image as the second image and repeat steps 1-4 to achieve stitching of multiple images.

Description

A kind of quick Overlap-scanning mode of image applied to DSP
Technical field
The present invention relates to technical field of image processing, and in particular to a kind of quick Overlap-scanning side of image applied to DSP Formula.
Background technique
Currently, image mosaic is typically necessary carry out images match.The matching process of image generally has matching based on gray scale Standard, registration based on feature etc..Existing frequently-used mode is all using the registration mode based on feature.It is existing to be matched based on feature In the technical solution of quasi- mode, figure generally is realized using Harris Corner Detection, SIFT scale invariant feature conversion scheduling algorithm As splicing.Wherein Harris Corner Detection, principle are to detect characteristic point using the feature of a second-order matrix, are extracted Feature have rotational invariance, the disadvantage is that not having scale invariability;SIFT algorithm is to detect certain by Gauss difference space Check that certain extreme values carry out location feature point.SIFT algorithm improves the quality and accuracy of images match, using also relatively wider It is general.
However the existing preferable image mosaic mode of imaging effect needs to realize in high-performance PC machine, needs efficiently to locate Manage speed and very big memory headroom, but the embedded processing systems of similar dsp processor, suffer from processing speed and The limitation of memory headroom, it is undesirable in terms of processing speed and splicing effect using conventional image mosaic mode.
Summary of the invention
Therefore, for above-mentioned problem, the present invention is based on the above-mentioned requirement to dsp system, propose that one kind quickly scans Panoramic mosaic mode improves existing joining method, reduces the limitation of processing speed and memory headroom.
In order to solve the above-mentioned technical problem, thinking of the present invention is as follows: when the distance moved between two pictures It when excessive, then can cannot be neglected deformation between image, may can also be especially for user with the variation of light and shade Center rotates to the right the case where shooting panoramic photo.At this time to obtain ideal splicing result, two pictures are not only found out Match point will also carry out deformation correction and Lightness disposal to picture.However, it is contemplated that the moving distance between two pictures is minimum When (for example only moving a column pixel), then the shooting interval of two pictures is extremely short, and the deformation and light and shade between image are poor It is different all negligible, so that it may the image mosaic mode quickly scanned using one kind.
Specifically, the technical scheme adopted by the invention is that, a kind of quick Overlap-scanning mode of image applied to DSP, Include the following steps:
Step 1: obtaining image collection to be spliced, choose first image and second image is spliced: first really Determine reference line and matching range: choosing first image and second image in image collection, first looked in first image One reference line, up-and-down boundary of the reference line from image respectively vacate 10 row pixels, high 460 pixel, and the right margin 320 from image arranges Pixel;Then it keeps left second image center and determines a matching range, matching range size is wide 30 column pixel, high by 470 Pixel, up-and-down boundary of the matching range from image respectively vacate 5 row pixels;
Step 2: the difference of adjacent pixel on calculating benchmark line: in matching range by matched line one by one with reference line carry out Match, wherein matched line and reference line have same height, and matching process is: two neighboring pixel value is first found out in reference line Maximum preceding 50 pairs of pixels, and record the position where this 50 pairs of values:
A1=a1-a2
A2=a2-a3
……
A459=a459-a460
The wherein pixel value that a [i] is every on benchmark line, A [i] is the difference of its adjacent two o'clock, 1≤i≤459.To A [i] carries out sequence from big to small and records preceding 50 value A [0]~corresponding coordinate position of A [49];
Step 3: best match position is determined on a match line: and then found out two-by-two on corresponding position in matched line The difference of pixel value, and 50 pairs of differences of this 50 pairs of differences and reference line are subtracted each other two-by-two and the sum of are taken absolute value, to matching model Each matched line in enclosing repeats above operation, then the smallest matched line of the sum of absolute value is the best match position to be looked for It sets.Ask:
Wherein AiFor the pixel value in benchmark line, BiFor the pixel value in matched line.It finds out corresponding to minimum value I position, as best match position;
Step 4: realizing splicing: finding best match position and be later substituted into second image in matched line right part To get splicing result image on the right side of first image benchmark line;
Step 5: the splicing result image for next obtaining step 4 then reads a new figure as first image Multiple images can be spliced as continuing above step as second image to obtain panorama sketch;
Step 6: cut up-and-down boundary: the panoramic picture obtained at this time has good effect, however due to flat in camera Upper lower deviation is inevitable during moving, therefore result images can be needed there are blank by upper and lower gutter on up-and-down boundary Divide and cuts out to get final result image.
Panoramic mosaic is carried out to image using the above method of the invention, speed is fast, slowly revolves in user's handheld device When turning, a new images can be read every a few tens of milliseconds and be spliced, therefore the difference between the image of adjacent twi-read Very little is just as above-mentioned example, so the effect and reality degree of splicing are also high.To sum up, the present invention is using above-mentioned Method enormously simplifies Processing Algorithm, to greatly reduce the limit of the processing speed and memory headroom to dsp processor System, disclosure is particularly well suited to hand held devices to carry out image mosaic using above-mentioned quick scanning mode, has expanded it significantly Application scenarios have good practicability.
Detailed description of the invention
Now in conjunction with specific embodiment, the present invention is further described.
During image mosaic, when the distance moved between two pictures is excessive, then it can not allow to neglect between image Depending on deformation, may can also with light and shade variation, the feelings of shooting panoramic photo are rotated to the right especially for customer-centric Condition.At this time to obtain ideal splicing result, the match point of two pictures is not only found out, also deformation is carried out to picture and rectified Just and Lightness disposal.However, it is contemplated that when the moving distance between two pictures is minimum (for example only moving a column pixel), then The shooting interval of two pictures is extremely short, all negligible (picture of this project of the deformation and light and shade difference between image Size is fixed as 640*480), such as two picture moving distances only have 10 column pixels, so that it may it is quickly scanned using one kind Image mosaic mode.Connecting method of the invention is applied to using DSP as the embedded device of hardware carrier, which can It to carry out the Image Acquisition of 30 frame per second, therefore is actually carrying out in splicing, in pixel per second movement in 300 column left and right In the case of the image mosaic set forth in the present invention quickly scanned can be realized.
Specifically, a kind of quick Overlap-scanning mode of image applied to DSP of the invention, the specific implementation steps are as follows:
Step 1: obtaining image collection to be spliced first, then determine reference line matching range: choosing in image collection Two images, first a reference line is looked in first image, up-and-down boundary of the reference line from image respectively vacates 10 row pixels, High 460 pixel, why vacating when 10 row pixels allow for the splicing of adjacent two picture has the case where displacement up and down, from image 320 column pixel of right margin, why image middle position look for reference line be because shooting when image hit exactly caused by shape Become minimum;Then it keeps left second image center and determines a matching range, range size is wide 30 column pixel, high 470 picture Element, matching range respectively vacate 5 row pixels from image up-and-down boundary, so just can be corrected the case where upper and lower displacement to realize Splicing;
Step 2: the difference of adjacent pixel on calculating benchmark line: the core concept of algorithm be in matching range by matched line by Item is matched with reference line, and wherein matched line and reference line have same height, and matching process is: first asking in reference line The maximum preceding 50 pairs of pixels of two neighboring pixel value out, and record the position where this 50 pairs of values:
A1=a1-a2
A2=a2-a3
……
A459=a459-a460
The wherein pixel value that a [i] is every on benchmark line, A [i] is the difference of its adjacent two o'clock, 1≤i≤459.To A [i] carries out sequence from big to small and records preceding 50 value A [0]~corresponding coordinate position of A [49];
Step 3: determining best match position on a match line: finding out pixel two-by-two on corresponding position in matched line The difference of value, and 50 pairs of differences of this 50 pairs of differences and reference line are subtracted each other two-by-two and the sum of are taken absolute value, in matching range Each matched line repeat above operation, then the smallest matched line of the sum of absolute value be the best match position to be looked for.I.e. It asks:
Wherein AiFor the pixel value in benchmark line, BiFor the pixel value in matched line.It finds out corresponding to minimum value I position, as best match position;
Step 4: realizing splicing: finding best match position and be later substituted into second image in matched line right part To get splicing result image on the right side of first image benchmark line;
Step 5: next using result images as first image, then reading a new images as second image Multiple images can be spliced to obtain panorama sketch by continuing above step;
Step 6: cut up-and-down boundary: the panoramic picture obtained at this time has good effect, however due to flat in camera Upper lower deviation is inevitable during moving, therefore result images can be needed there are blank by upper and lower gutter on up-and-down boundary Divide and cuts out to get final result image.
Panoramic mosaic should be carried out to image in this way, speed is fast, can be with when user's handheld device slowly rotates Every a few tens of milliseconds read a new images spliced, therefore the difference very little between the image of adjacent twi-read just as with On the example mentioned it is the same, so the effect and reality degree of splicing are also high.
Although specifically showing and describing the present invention in conjunction with preferred embodiment, those skilled in the art should be bright It is white, it is not departing from the spirit and scope of the present invention defined by the appended claims, it in the form and details can be right The present invention makes a variety of changes, and is protection scope of the present invention.

Claims (3)

1. a kind of quick Overlap-scanning mode of image applied to DSP, characterized by the following steps:
Step 1: obtaining image collection to be spliced, choose first image and second image is spliced: determining base first Directrix and matching range;
Step 2: the difference of adjacent pixel on calculating benchmark line;
Step 3: determining best match position on a match line, wherein matched line is in matching range, and is had with reference line Identical height;
Step 4: realizing splicing: finding partial replacement after best match position by second image on the right side of matched line to the The right side of one image benchmark line to get arrive splicing result image;
Step 5: the splicing result image for next obtaining step 4 then reads a new images and makees as first image Step 1- step 4 is repeated for second image, can be realized and multiple images are spliced;
The step 3 specifically includes following content: matched line matched with reference line one by one in matching range, wherein Wiring and reference line have same height, and matching process is: first found out in reference line two neighboring pixel value it is maximum before 50 pairs of pixels, and record the position where this 50 pairs of values:
A1=a1-a2
A2=a2-a3
……
A459=a459-a460
The wherein pixel value that a [i] is every on benchmark line, A [i] is the difference of its adjacent two o'clock, 1≤i≤459;
Sequence from big to small is carried out to A [i], and records preceding 50 value A [0]~corresponding coordinate position of A [49];
Then the difference of pixel value two-by-two is found out on corresponding position in matched line, and by the 50 of this 50 pairs of differences and reference line Difference is subtracted each other two-by-two and the sum of is taken absolute value, each matched line in matching range is repeated above operation, then absolutely The smallest matched line of the sum of value is the best match position to be looked for;Ask:
Wherein AiFor the pixel value in benchmark line, BiFor the pixel value in matched line;Find out i corresponding to minimum value Position, as best match position.
2. the quick Overlap-scanning mode of image according to claim 1, it is characterised in that: further include step 6: to what is obtained The up-and-down boundary of final splicing result image is cut.
3. the quick Overlap-scanning mode of image according to claim 1 or 2, it is characterised in that: the step 1 specifically includes Following content: choosing first image and second image in image collection, first look for a reference line in first image, Up-and-down boundary of the reference line from image respectively vacates 10 row pixels, high 460 pixel, the 320 column pixel of right margin from image;Then exist Second image center, which keeps left, determines a matching range, and matching range size is wide 30 column pixel, and high 470 pixel matches model It encloses the up-and-down boundary from image and respectively vacates 5 row pixels.
CN201610409070.1A 2016-06-12 2016-06-12 A Fast Image Scanning and Splicing Method Applied in DSP Expired - Fee Related CN105825476B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610409070.1A CN105825476B (en) 2016-06-12 2016-06-12 A Fast Image Scanning and Splicing Method Applied in DSP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610409070.1A CN105825476B (en) 2016-06-12 2016-06-12 A Fast Image Scanning and Splicing Method Applied in DSP

Publications (2)

Publication Number Publication Date
CN105825476A CN105825476A (en) 2016-08-03
CN105825476B true CN105825476B (en) 2019-02-05

Family

ID=56532250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610409070.1A Expired - Fee Related CN105825476B (en) 2016-06-12 2016-06-12 A Fast Image Scanning and Splicing Method Applied in DSP

Country Status (1)

Country Link
CN (1) CN105825476B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110555803B (en) * 2019-09-12 2023-08-08 福建云造科技有限公司 Method for judging whether patterns in printing can be spliced or not and pattern splicing method
CN112102215A (en) * 2020-09-03 2020-12-18 广州南沙联合集装箱码头有限公司 Image fast splicing method based on error statistics
CN115578441B (en) * 2022-08-30 2023-07-28 感知信息科技(浙江)有限责任公司 Vehicle side image stitching and vehicle size measuring method based on deep learning
CN116320294A (en) * 2023-02-15 2023-06-23 广东电网有限责任公司 Electric power operation site panoramic security monitoring cavity compensation method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6785427B1 (en) * 2000-09-20 2004-08-31 Arcsoft, Inc. Image matching using resolution pyramids with geometric constraints
CN101398901A (en) * 2008-10-31 2009-04-01 中国航空无线电电子研究所 Rapid image matching method for auxiliary navigation
CN102908122A (en) * 2012-09-17 2013-02-06 广州市伟迈机电科技有限公司 Imaging and image mosaic processing methods for digitalizer
CN103617625A (en) * 2013-12-13 2014-03-05 中国气象局北京城市气象研究所 Image matching method and image matching device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6785427B1 (en) * 2000-09-20 2004-08-31 Arcsoft, Inc. Image matching using resolution pyramids with geometric constraints
CN101398901A (en) * 2008-10-31 2009-04-01 中国航空无线电电子研究所 Rapid image matching method for auxiliary navigation
CN102908122A (en) * 2012-09-17 2013-02-06 广州市伟迈机电科技有限公司 Imaging and image mosaic processing methods for digitalizer
CN103617625A (en) * 2013-12-13 2014-03-05 中国气象局北京城市气象研究所 Image matching method and image matching device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于DSP的实时图像拼接技术;张云峰;《液晶与显示》;20131231;第28卷(第6期);963-967

Also Published As

Publication number Publication date
CN105825476A (en) 2016-08-03

Similar Documents

Publication Publication Date Title
US8831382B2 (en) Method of creating a composite image
CN101416219B (en) Foreground/background segmentation in digital images
CN105825476B (en) A Fast Image Scanning and Splicing Method Applied in DSP
US20100142807A1 (en) Image identification method and imaging apparatus
CN103327245B (en) A kind of Atomatic focusing method of infrared imaging system
CN112215925A (en) Self-adaptive follow-up tracking multi-camera video splicing method for coal mining machine
WO2017092631A1 (en) Image distortion correction method for fisheye image, and calibration method for fisheye camera
CN110136083B (en) A method and device for updating basemaps combined with interactive
CN112687231A (en) Brightness and chrominance data extraction method, equipment and computer readable storage medium
CN118014832B (en) Image stitching method and related device based on linear feature invariance
US9554121B2 (en) 3D scanning apparatus and method using lighting based on smart phone
CN102496147A (en) Image processing device, image processing method and image processing system
CN114332183B (en) Image registration method, device, computer equipment and storage medium
CN113313707A (en) Original image processing method, device, equipment and readable storage medium
JP2012050013A (en) Imaging apparatus, image processing device, image processing method, and image processing program
US20040109599A1 (en) Method for locating the center of a fiducial mark
US20090021595A1 (en) Low Memory Auto-Focus and Exposure System for Large Multi-Frame Image Acquisition
JP2007074578A (en) Image processing apparatus, photographing apparatus, and program
CN105758337B (en) A method of obtaining angle between lens plane and image sensor plane
CN112637573A (en) Multi-lens switching display method and system, intelligent terminal and storage medium
US9489727B2 (en) Method for generating a preferred image by replacing a region of a base image
CN107644442B (en) Spatial position calibration method of double-camera module
CN116883240A (en) Image stitching method based on gray level matching
CN108133493A (en) A kind of heterologous image registration optimization method mapped based on region division and gradual change
US20170161927A1 (en) Systems and Methods for Stitching Metallographic and Stereoscopic Images

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190205

Termination date: 20210612

CF01 Termination of patent right due to non-payment of annual fee