CN112233127B - Down-sampling method for curve splicing image - Google Patents

Down-sampling method for curve splicing image Download PDF

Info

Publication number
CN112233127B
CN112233127B CN202011104312.9A CN202011104312A CN112233127B CN 112233127 B CN112233127 B CN 112233127B CN 202011104312 A CN202011104312 A CN 202011104312A CN 112233127 B CN112233127 B CN 112233127B
Authority
CN
China
Prior art keywords
image
sketch
sketchmaskdown
curve
channel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011104312.9A
Other languages
Chinese (zh)
Other versions
CN112233127A (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.)
Shanghai Guimu Robot Co ltd
Original Assignee
Shanghai Guimu Robot Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Guimu Robot Co ltd filed Critical Shanghai Guimu Robot Co ltd
Priority to CN202011104312.9A priority Critical patent/CN112233127B/en
Publication of CN112233127A publication Critical patent/CN112233127A/en
Application granted granted Critical
Publication of CN112233127B publication Critical patent/CN112233127B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration by the use of local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/32Indexing scheme for image data processing or generation, in general involving image mosaicing

Abstract

The invention discloses a downsampling method for a curve splicing image, which comprises the following steps: acquiring an image sketch to be downsampled, which is obtained by image splicing under a curve acquisition task; adopting a pixel value to convert the image sketch, and obtaining an image sketch mask corresponding to the image sketch; respectively performing downsampling on the image sketch and the image sketch mask to obtain a corresponding image sketch Down and a corresponding image sketch MaskDown; carrying out binarization processing on the image sketchMaskDown; and synthesizing the binarized image sketchMaskDown and the image sketchDown to obtain a target image sketchFinal so as to realize down-sampling of the curve splicing image. By the scheme, the method has the advantages of completeness, reliability, simple logic, less calculation workload and the like.

Description

Down-sampling method for curve splicing image
Technical Field
The invention relates to the technical field of image processing, in particular to a downsampling method for a curve splicing image.
Background
The image stitching technology is a technology for stitching a plurality of images with overlapped parts (which may be obtained at different time, different visual angles or different sensors) into a large-scale seamless high-resolution image; in addition, image up/down sampling is to adjust the image size, and currently, zooming in and zooming out are the most common in the prior art, although geometric transformation can also realize image zooming in and zooming out. In addition, image dilation/erosion: dilation (decomposition) and Erosion (Erosion) of an image are two basic morphological operations, mainly used to find the maximum and minimum regions in an image. The expansion is similar to 'field expansion', a highlight area or a white part in the image is expanded, and the operation result image is larger than the highlight area of the original image; the erosion is similar to 'the field is eaten by silkworm', the highlight area or the white part in the image is reduced and thinned, and the operation result image is smaller than the highlight area of the original image.
In the application scene of a curve, a series of images are collected on the large-area ground according to a certain rule in the running process of the pavement detection robot, and each image comprises corresponding position information and course angle information. From this information, and by calculating the feature points of the neighboring images, the images are stitched into one large graph, which characterizes the entire detection task. In the application scenario of a curve, data of a detection task at a time is very large, and in general, in order to ensure image quality, in the stitching process, resolution of originally acquired image data is used, and a size of an overview chart finally generated by stitching of the detection task at a time of the curve is very large, as shown in fig. 1 and fig. 2, the overview chart has the advantages that accuracy of original acquisition can be maintained, and relatively good resolution is maintained.
In case of pathological analysis, etc., down-sampling is required for the current image, and as shown in fig. 3, the width and height of the image are divided by 10, so that the width and height of the new image are 1/10, which is the original width and height of the image.
The downsampling basic principle in the prior art is to calculate one pixel value of a downsampled image by using pixels of one patch of an original image, and the downsampling calculation is as shown in fig. 4 below, and different interpolation methods are different in the method of taking the patch and the calculation method from the pixel in the patch to the target pixel. However, in practice, due to the particularity of the image of the curve in the present technology, there is no image content in a large area, and at the boundary between the content and the non-content, the values of the pixels are calculated from the values of the pixels and the non-pixels, and the actual content in the image may deviate far from the actual one, as shown in fig. 5.
Therefore, a complete and reliable downsampling method with simple logic and less calculation workload for the curve splicing image is urgently needed to be provided.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a down-sampling method for a curved-path stitched image, and the technical solution adopted by the present invention is as follows:
a downsampling method for a curve-stitched image, comprising the steps of:
acquiring an image sketch to be downsampled, which is obtained by image splicing under a curve acquisition task;
adopting a pixel value to convert the image sketch, and obtaining an image sketch mask corresponding to the image sketch;
respectively performing downsampling on the image sketch and the image sketch mask to obtain a corresponding image sketch Down and a corresponding image sketch MaskDown; the widths of the images sktchDown and sketchmackDown are both wDown, and the heights of the images sktchMaskDown are both hDown;
carrying out binarization processing on the image sketchMaskDown;
and synthesizing the binarized image sketchMaskDown and the image sketchDown to obtain a target image sketchFinal so as to realize down-sampling of the curve splicing image.
Further, the converting the image sketch by using the pixel value to obtain the image sketch mask corresponding to the image sketch includes the following steps:
the image sketch is obtained by splicing k real sampled sub-images, the k real sampled sub-images are spliced into the image sketch, the sub-images are converted into images which are the same as the sub-images in size and have the pixel value of 255, the images are spliced to obtain an image sketch mask, and k is a natural number larger than 1.
Further, the converting the image sketch by using the pixel value to obtain the image sketch mask corresponding to the image sketch includes the following steps:
generating a single-channel image sketchMask with the width w and the height h by using the image sketch; the width of the image sketch is w, and the height of the image sketch is h;
setting the pixel value of the single-channel image sketchMask to 0;
sequentially checking the pixel values of the sketch [ u, v ] of the pixel points, and if the sketch [ u, v ] is larger than 0, setting the pixel values of the sketch mask [ u, v ] as Val; u is a number greater than 0 and less than or equal to w; v is a number greater than 0 and less than or equal to h; val is a positive number less than or equal to 255;
and performing expansion processing on the single-channel image sketchMask.
Preferably, the single-channel image sketchMask is subjected to expansion processing by using a convolution kernel with the width of 20, the height of 20 and the expansion frequency of 1.
Further, the binarization processing is carried out on the sketchMaskDown image, and the method comprises the following steps:
sequentially traversing pixel points in the sketchMaskDown image;
if the pixel point sketchMaskDown [ i, j ] < Val × ratio, setting the pixel point sketchMaskDown [ i, j ] ═ 0; i is more than 0 and less than wDown, j is more than 0 and less than hDown, and Val is a positive number less than or equal to 255; the ratio is a number greater than 0 and less than 1;
and if the pixel sketchMaskDown [ i, j ] is more than or equal to Val multiplied by the ratio, setting the pixel sketchMaskDown [ i, j ] to Val.
Preferably, the ratio value is 0.7, and the Val value is 255.
Further, the synthesis of the binarized image sketchMaskDown and the image sketchdown is carried out to obtain a target image sketchFinal, and the synthesis of a non-transparent channel and a transparent channel is carried out to obtain the target image sketchFinal.
Further, the synthesizing of the target pattern sketchFinal without the transparent channel comprises the following steps:
if the pixel point sketchMaskDown [ i, j ] is 0, and the pixel point sketchdown [ i, j ] of the image sketchdown is set to be 0; i is more than 0 and less than wDown, j is more than 0 and less than hDown;
if the pixel point sketchMaskDown [ i, j ] is larger than 0, and the pixel point sketchDown [ i, j ] of the image sketchDown is kept unchanged.
Further, the synthesis band transparent channel obtains a target graph sketchFinal, and the method comprises the following steps:
if the image sktchDown is a single-channel image, copying and obtaining a three-channel image;
normalizing any pixel value of the image sketchMaskDown to be between [0, 255 ];
and combining the three-channel image and the normalized image sketchMaskDown to obtain a four-channel target image sketchFinal.
Compared with the prior art, the invention has the following beneficial effects:
(1) the invention skillfully adopts the pixel value to convert the image sketch to obtain the image sketch mask, and respectively carries out downsampling with the image sketch, and has the advantages that the original content area and the original non-content area in the downsampled image can be recorded, so as to ensure the downsampled recording to be reliable.
(2) The invention skillfully carries out binarization processing on the sketchMaskDown image, and processes the area obtained by jointly calculating the original area with image content and the area without the image in the downsampling result.
(3) The method comprises the steps of generating mask images sketchmasks for a bend spliced image (generated during splicing or generated after the generation is completed), synchronously downsampling single-channel images sketchmasks in subsequent downsampling processing, and finally correcting downsampling results of the spliced image according to downsampling results of the mask images to obtain downsampled images which accord with the expected spliced image;
in conclusion, the method fills the technical blank of downsampling of the non-curve spliced image in the prior art, has the advantages of completeness, reliability, simple logic, less calculation workload and the like, and has high practical value and popularization value in the technical field of image processing.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of protection, and it will be apparent to those skilled in the art that other related drawings may be obtained based on these drawings without inventive effort.
FIG. 1 is a graph of a curve detection splice of the present invention.
FIG. 2 is a partial view of the curve detection of the present invention.
Fig. 3 is a down-sampling diagram under a curve in the prior art.
Fig. 4 is a schematic diagram of down-sampling in the prior art.
Fig. 5 is a schematic diagram of a prior art curve downsampling.
Fig. 6 is a partial down-sampling diagram in the present invention.
Fig. 7 is a mosaic to be downsampled in the present invention.
Fig. 8 is a schematic representation of the present invention prior to partial inflation.
Fig. 9 is a schematic representation of the present invention after partial expansion.
Fig. 10 is a graph of the downsampling result of the present invention.
Detailed Description
To further clarify the objects, technical solutions and advantages of the present application, the present invention will be further described with reference to the accompanying drawings and examples, and embodiments of the present invention include, but are not limited to, the following examples. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making creative efforts shall fall within the protection scope of the present application.
Examples
As shown in fig. 6 to 10, the present embodiment provides a downsampling method for a curve splicing image, including the following steps:
firstly, the input image to be downsampled is sketch which is a super large-size overview chart (28082 × 76333 pixels) spliced by one acquisition task of the pavement detection robot.
Secondly, the image sketch is a large-size stitching overview chart generated by the existing image stitching algorithm, when the sketch is generated by using all the acquired images, a diagram with the same pixel value of 255 as that of the image acquired by the pavement detection robot is used and recorded as a subMask, and the image sketch mask is generated by using the subMask according to the same rule of generating sketch by using the acquired data.
Thirdly, when the image sketchMask cannot be generated in the second step, the following manner may also be sampled:
(1) generating a single-channel image sketchMask with the width w and the height h by using the image sketch; the width of the image sketch is w, and the height of the image sketch is h;
(2) setting the pixel value of the single-channel image sketchMask to 0;
(3) sequentially checking the pixel values of the sketch [ u, v ] of the pixel points, and if the sketch [ u, v ] is larger than 0, setting the pixel values of the sketch mask [ u, v ] as Val; u is a number greater than 0 and less than or equal to w; v is a number greater than 0 and less than or equal to h; the Val value is 255;
and performing expansion processing on the single-channel image sketchMask, wherein in the embodiment, a convolution kernel with the width of m and the height of n is selected, and the step is performed to fill a hole on the single-channel image sktchMask, which is caused by the fact that the hole is actually in an area with image content but the pixel value is 0. The values of m and n are set according to actual conditions, and the number of times of applying the dilation convolution sum to the mask also needs to be set according to actual conditions, in the application scenario, m is 20, n is 20, and the dilation number is 1.
Fourthly, respectively downsampling the image sketch and the image sketch mask to obtain a corresponding image sketch Down and a corresponding image sketch MaskDown; the width of the image sktchDown and the height of the image sketchmackDown are both wDown and are both hDown.
Fifthly, performing binarization processing on the sketchMaskDown image, specifically:
(1) if the pixel point sketchMaskDown [ i, j ] < 255 × ratio, setting the pixel point sketchMaskDown [ i, j ] = 0; i is more than 0 and less than wDown, j is more than 0 and less than hDown; the ratio ratio is 0.7;
(2) if the pixel point sketchMaskDown [ i, j ] is larger than or equal to 255 × ratio, the pixel point sketchMaskDown [ i, j ] is set to be 255.
Sixthly, synthesizing the SketchDown after down-sampling and the SketchMaskDown after down-sampling and processing in the upper step into the SketchFinal, wherein the synthetic target has two methods:
(1) synthesizing a target graph sketchFinal without a transparent channel, and comprising the following steps:
(I) if the pixel point sketchMaskDown [ i, j ] is 0, and the pixel point sketchdown [ i, j ] of the image sketchdown is set to be 0; i is more than 0 and less than wDown, j is more than 0 and less than hDown;
(II) if the pixel point sketchMaskDown [ i, j ] is more than 0, and the pixel point sktchDown [ i, j ] of the image sktchDown is kept unchanged.
(2) Synthesizing a target pattern sketchFinal obtained by a transparent channel, and comprising the following steps:
(I) if the image sktchDown is a single-channel image, copying and obtaining a three-channel image;
(II) normalizing any pixel value of the image sketchMaskDown to be between [0, 255 ];
(III) combining the three-channel image and the normalized image sketchMaskDown to obtain a four-channel target image sketchFinal (28082 multiplied by 76333 pixels).
In conclusion, the invention fills the technical blank of downsampling of the spliced image without the curve in the prior art, has specific and prominent substantive characteristics and remarkable progress compared with the prior art, and has very high practical value and popularization value in the technical field of image processing.
The above-described embodiments are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention, but all changes that can be made by applying the principles of the present invention and performing non-inventive work on the basis of the principles shall fall within the scope of the present invention.

Claims (9)

1. A down-sampling method for a curve splicing image is characterized by comprising the following steps:
acquiring an image sketch to be downsampled, which is obtained by image splicing under a curve acquisition task;
adopting a pixel value to convert the image sketch, and obtaining an image sketch mask corresponding to the image sketch;
respectively carrying out downsampling on the image sketch and the image sketch mask to obtain a corresponding image sketch Down and a corresponding image sketch mask Down; the widths of the images sktchDown and sketchmackDown are both wDown, and the heights of the images sktchMaskDown are both hDown;
carrying out binarization processing on the image sketchMaskDown;
and synthesizing the binarized image sketchMaskDown and the image sketchDown to obtain a target image sketchFinal so as to realize down-sampling of the curve splicing image.
2. The downsampling method for a curve splicing image according to claim 1, wherein the converting the image sketch using the pixel value and obtaining the image sketch mask corresponding to the image sketch comprises the following steps:
the image sketch is obtained by splicing k actually sampled sub-images, the k actually sampled sub-images are spliced into the image sketch, the sub-images are converted into images which have the same size as the sub-images and the pixel value of 255, and the images are spliced to obtain an image sketch mask; and k is a natural number greater than 1.
3. The downsampling method for a curve splicing image according to claim 1, wherein the converting the image sketch using the pixel value and obtaining the image sketch mask corresponding to the image sketch comprises the following steps:
generating a single-channel image sketchMask with the width w and the height h by using the image sketch; the width of the image sketch is w, and the height of the image sketch is h;
setting the pixel value of the single-channel image sketchMask to 0;
sequentially checking the pixel values of the sketch [ u, v ] of the pixel points, and if the sketch [ u, v ] is larger than 0, setting the pixel values of the sketch mask [ u, v ] as Val; u is a number greater than 0 and less than or equal to w; v is a number greater than 0 and less than or equal to h; val is a positive number less than or equal to 255;
and performing expansion processing on the single-channel image sketchMask.
4. The downsampling method for curve-stitched images according to claim 3, wherein the single-channel image sketchMask is dilated by using a convolution kernel with a width of 20, a height of 20 and a dilation number of 1.
5. The downsampling method for curve splicing images according to claim 1, wherein the image sketchMaskDown is subjected to binarization processing, and the method comprises the following steps:
sequentially traversing pixel points in the sketchMaskDown image;
if the pixel point sketchMaskDown [ i, j ] < Val × ratio, setting the pixel point sketchMaskDown [ i, j ] ═ 0; i is more than 0 and less than wDown, j is more than 0 and less than hDown, and Val is a positive number less than or equal to 255; the ratio is a number greater than 0 and less than 1;
and if the pixel point sketchMaskDown [ i, j ] is more than or equal to Val multiplied by ratio, setting the pixel point sketchMaskDown [ i, j ] to Val.
6. A downsampling method for curve-stitched images according to claim 5, characterized in that the ratio is 0.7 and the Val is 255.
7. The downsampling method for a curve splicing image according to claim 1, wherein the synthesizing the binarized image sketchMaskDown and the image sketchdown to obtain the target image sketchFinal comprises synthesizing a non-transparent channel and a transparent channel to obtain the target image sketchFinal.
8. The downsampling method for curve-stitched images according to claim 7, wherein the synthesizing of the transparency-free channel to obtain the target graph sketchFinal comprises the following steps:
if the pixel point sketchMaskDown [ i, j ] is 0, and the pixel point sketchdown [ i, j ] of the image sketchdown is set to be 0; i is more than 0 and less than wDown, j is more than 0 and less than hDown;
if the pixel point sketchMaskDown [ i, j ] is larger than 0, and the pixel point sketchDown [ i, j ] of the image sketchDown is kept unchanged.
9. The down-sampling method for the merged image of curve according to claim 7, wherein the synthetic band transparent channel obtains a target sketch sketchFinal, comprising the following steps:
if the image sktchDown is a single-channel image, copying and obtaining a three-channel image;
normalizing any pixel value of the image sketchMaskDown to be between [0, 255 ];
and combining the three-channel image and the normalized image sketchMaskDown to obtain a four-channel target image sketchFinal.
CN202011104312.9A 2020-10-15 2020-10-15 Down-sampling method for curve splicing image Active CN112233127B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011104312.9A CN112233127B (en) 2020-10-15 2020-10-15 Down-sampling method for curve splicing image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011104312.9A CN112233127B (en) 2020-10-15 2020-10-15 Down-sampling method for curve splicing image

Publications (2)

Publication Number Publication Date
CN112233127A CN112233127A (en) 2021-01-15
CN112233127B true CN112233127B (en) 2022-09-16

Family

ID=74118302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011104312.9A Active CN112233127B (en) 2020-10-15 2020-10-15 Down-sampling method for curve splicing image

Country Status (1)

Country Link
CN (1) CN112233127B (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5365823B2 (en) * 2011-10-14 2013-12-11 株式会社モルフォ Image composition apparatus, image composition method, image composition program, and recording medium
CN106504196B (en) * 2016-11-29 2018-06-29 微鲸科技有限公司 A kind of panoramic video joining method and equipment based on space spherical surface
CN107730528A (en) * 2017-10-28 2018-02-23 天津大学 A kind of interactive image segmentation and fusion method based on grabcut algorithms
CN108830149B (en) * 2018-05-07 2021-03-16 深圳市恒扬数据股份有限公司 Target bacterium detection method and terminal equipment
CN109636862B (en) * 2018-11-16 2021-06-25 广州视源电子科技股份有限公司 Image processing method, system, terminal, storage medium and writing board device
CN109462747B (en) * 2018-12-11 2020-06-26 成都美律科技有限公司 DIBR system cavity filling method based on generation countermeasure network
CN109871841B (en) * 2019-02-14 2023-04-21 腾讯科技(深圳)有限公司 Image processing method, device, terminal and storage medium
CN110008846B (en) * 2019-03-13 2022-08-30 南京邮电大学 Image processing method
CN110533029A (en) * 2019-08-02 2019-12-03 杭州依图医疗技术有限公司 Determine the method and device of target area in image
CN111667400B (en) * 2020-05-30 2021-03-30 温州大学大数据与信息技术研究院 Human face contour feature stylization generation method based on unsupervised learning

Also Published As

Publication number Publication date
CN112233127A (en) 2021-01-15

Similar Documents

Publication Publication Date Title
US8401333B2 (en) Image processing method and apparatus for multi-resolution feature based image registration
CN104574347B (en) Satellite in orbit image geometry positioning accuracy evaluation method based on multi- source Remote Sensing Data data
CN101477684B (en) Process for reconstructing human face image super-resolution by position image block
CN111062931B (en) Detection method of spliced and tampered image
CN109858527B (en) Image fusion method
CN110892255B (en) Image processing apparatus, method and storage medium for detecting defect from image
CN103034982A (en) Image super-resolution rebuilding method based on variable focal length video sequence
CN109712071A (en) Unmanned plane image mosaic and localization method based on track constraint
CN111861866A (en) Panoramic reconstruction method for substation equipment inspection image
CN111260675B (en) High-precision extraction method and system for image real boundary
CN113962905A (en) Single image rain removing method based on multi-stage feature complementary network
CN112233127B (en) Down-sampling method for curve splicing image
KR20050063991A (en) Image matching method and apparatus using image pyramid
CN112508832A (en) Object-oriented remote sensing image data space-time fusion method, system and equipment
CN115880288B (en) Detection method, system and computer equipment for electronic element welding
CN116109535A (en) Image fusion method, device and computer readable storage medium
CN114862889A (en) Road edge extraction method and device based on remote sensing image
JPS62131382A (en) Vector conversion system for binary picture
CN112419208A (en) Construction drawing review-based vector drawing compiling method and system
CN114266781A (en) Defect inspection apparatus, defect inspection method, and information recording medium
Xiao et al. Utilizing edge to extract roads in high-resolution satellite imagery
CN110599398A (en) Online image splicing and fusing method based on wavelet technology
KR20170087734A (en) Apparatus and method for high resolution image generation using gradient information
KR20170087731A (en) Apparatus and method for super resolution image reconstruction
KR20080069084A (en) Apparatus and method for image restoration based on self-training

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