CN104952049A - Image inpainting method based on domain divergence interpolation - Google Patents

Image inpainting method based on domain divergence interpolation Download PDF

Info

Publication number
CN104952049A
CN104952049A CN201510348382.1A CN201510348382A CN104952049A CN 104952049 A CN104952049 A CN 104952049A CN 201510348382 A CN201510348382 A CN 201510348382A CN 104952049 A CN104952049 A CN 104952049A
Authority
CN
China
Prior art keywords
point
points
value
cavity
repaired
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510348382.1A
Other languages
Chinese (zh)
Other versions
CN104952049B (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.)
Zhejiang Gongshang University
Original Assignee
Zhejiang Gongshang 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 Zhejiang Gongshang University filed Critical Zhejiang Gongshang University
Priority to CN201510348382.1A priority Critical patent/CN104952049B/en
Publication of CN104952049A publication Critical patent/CN104952049A/en
Application granted granted Critical
Publication of CN104952049B publication Critical patent/CN104952049B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses an image inpainting method based on domain divergence interpolation. The method comprises the following steps: eight nearest points in eight directions around a to-be-inpainted point are found out firstly, whether a hole point exists in the eight points is further determined, and if the hole point exists, divergence is performed continuously in the same direction until eight non-hole domain points are obtained finally; single channel values of the eight points are subjected to subtraction pairwise, absolute values are solved, three-channel RGB (red, green, blue) values of two points with minimum absolute values are averaged respectively, finally, values are assigned to three channels of the to-be-inpainted point respectively, and image inpainting is finished. The image inpainting method can better repair holes with the crack width in the single-digit pixel range, and the repair speed is high.

Description

The image repair method of interpolation is dispersed based on field
Technical field
The invention belongs to graph and image processing field, particularly a kind of image repair method dispersing interpolation based on field.
Background technology
Along with the development of science and technology, 3D technology is more and more ripe.The 3D technology of current main flow, mainly by reference to figure and depth map information thereof, in conjunction with 3D transformation equation, forwards 3D to from 2D.But this method, can exist obvious defect, can there is less empty crack in the new view namely synthesized.In order to solve this defect, technician have studied various empty recovery technique, and empty restore design main at present comprises: FMM fast marching algorithms, Criminisi algorithm, field interpolation algorithm etc.
Traditional field interpolation algorithm, mainly by finding the point that around complex point to be repaired, eight directions are nearest, the single channel value of these eight points is made to subtract each other between two and ask absolute value again, obtain two points that absolute value is minimum, again these two some triple channel rgb values are averaged respectively, the average RGB value obtained is distinguished assignment to complex point to be repaired, namely completes image repair.Experiment shows that the method reparation exists serious deficiency, the cavity that can only perfect repair Fracture Width and be less than two pixels, and Fracture Width is greater than to the cavity of two pixels, its mass effect of repairing image very low.
Summary of the invention
For the deficiencies in the prior art, the present invention proposes a kind of image repair method dispersing interpolation based on field newly.
The technical solution adopted for the present invention to solve the technical problems is as follows:
First, determine empty point to be repaired, and find nearest upper left near the point of cavity to be repaired, upper, upper right, left and right, lower-left, under, eight, bottom right point.Be designated as respectively: a, b, c, d, e, f, g, h.And then determine whether a, b, c, d, e, f, g, h eight points exist empty point further.If exist, then continue outwards to disperse until finding is not the point in cavity.Such as: the some a of the upper left nearest apart from cavity to be repaired point is empty point, then continue to find to upper left traversal, until searching out not is the point in cavity, is designated as a, until final eight directions all obtain not be the point in cavity, amounts to eight points.Then by upper left and bottom right, upper and lower, upper right and lower-left, the single channel pixel value of the point of left and right subtracts each other asks absolute value operation.Namely | a-h|, | b-g|, | c-f|, | d-e|, and its value is designated as respectively: diff1, diff2, diff3, diff4.And calculate diff1, minimum value in diff2, diff3, diff4:
min=minminsize(diff1,minsize(diff2,minsize(diff3,diff4)))
Finally according to two points corresponding to minimum value, (such as minimum value is diff1, then find an a and h), obtain the R that its triple channel figure is corresponding, G, B value.I.e. Ra, Ga, Ba and Rh, Gh, Bh.Then calculate respectively two 3 each passages of passage and mean value, as R ,=(Ra+Rh)/2, G ,=(Ga+Gh)/2, B ,=(Ba+Bh)/2.Again by R, G, B, assignment gives the R of complex point to be repaired respectively, and G, B triple channel, can complete reparation.
Beneficial effect of the present invention: the present invention is a kind of little cavity being applicable to Fracture Width and being greater than more than two pixels, compares its picture quality of repairing of classic method more high.
Accompanying drawing explanation
Fig. 1 is traditional field interpolation method;
Fig. 2 is that the field of the invention disperses interpolation image restorative procedure.
Embodiment
Below in conjunction with accompanying drawing, the invention will be further described:
As shown in Figure 1, traditional field interpolation method be find complex point to be repaired nearest eight directions on point, no matter whether there is cavity in these eight points (if there is cavity, its single channel value is then made to be zero), all single channel value is between two subtracted each other and ask absolute value, obtain two points that value is minimum, then its triple channel rgb value is averaged, assignment gives complex point to be repaired respectively, namely completes reparation.The method, if the Fracture Width repairing cavity is greater than two pixels, can make definitely can there is empty point in around complex point to be repaired eight points, thus causes RGB triple channel to be worth repairing error.And if know that finding is not eight field points in cavity when looking for eight points in field by constantly outwards dispersing, then carry out triple channel and be worth assignment, can avoid occurring cavity, reduce error, thus optimized reparation image.
As shown in Figure 2, the present invention, mainly according to field interpolation algorithm, optimizes improvement, and then improves image repair quality, and specific embodiment of the invention is as follows:
Step 1. determines empty point to be repaired, and find nearest upper left near the point of cavity to be repaired, upper, upper right, left and right, lower-left, under, eight, bottom right point.Be designated as respectively: a, b, c, d, e, f, g, h.
Step 2. determines whether a, b, c, d, e, f, g, h eight points exist empty point further.If exist, then continue outwards to disperse until finding is not the point in cavity.Such as: the some a of the upper left nearest apart from cavity to be repaired point is empty point, then continue to find to upper left traversal, until searching out not is the point in cavity, is designated as a.
Step 3. carry out step 2 repeatedly, and making final eight directions all obtain not is the point in cavity, amounts to eight points.
Step 4. is by upper left and bottom right, upper and lower, upper right and lower-left, and the single channel pixel value of the point of left and right subtracts each other asks absolute value operation.Namely | a-h|, | b-g|, | c-f|, | d-e|, and its value is designated as respectively: diff1, diff2, diff3, diff4.And calculate diff1, minimum value min=minminsize (diff1, minsize (diff2, minsize (diff3, diff4))) in diff2, diff3, diff4.
(such as minimum value is diff1 to two points corresponding to step 5. minimum value of looking for, then find an a and h), obtain the R that its triple channel figure is corresponding, G, B value.I.e. Ra, Ga, Ba and Rh, Gh, Bh.Then calculate respectively two 3 each passages of passage and mean value, as R ,=(Ra+Rh)/2, G ,=(Ga+Gh)/2, B ,=(Ba+Bh)/2.Again by R, G, B, assignment gives the R of complex point to be repaired respectively, and G, B triple channel, can complete reparation.

Claims (1)

1. disperse the image repair method of interpolation based on field, it is characterized in that the concrete steps of the method are as follows:
Step 1. determines empty point to be repaired, and find nearest upper left near the point of cavity to be repaired, upper, upper right, left and right, lower-left, under, eight, bottom right point; Be designated as respectively: a, b, c, d, e, f, g, h;
Step 2. determines whether a, b, c, d, e, f, g, h eight points exist empty point further; If exist, then continue outwards to disperse until finding is not the point in cavity;
Step 3. carry out step 2 repeatedly, and making final eight directions all obtain not is the point in cavity, amounts to eight points;
Step 4. is by upper left and bottom right, upper and lower, upper right and lower-left, and the single channel pixel value of the point of left and right subtracts each other asks absolute value operation; Namely |a-h |, |b-g |, |c-f |, |d-e |, and its value is designated as respectively: diff1, diff2, diff3, diff4; Calculate diff1, the minimum value in diff2, diff3, diff4;
Two points that step 5. minimum value of looking for is corresponding, obtain the R that its triple channel figure is corresponding, G, B value; Then calculate respectively these two each passages of point and mean value, then by the mean value of three of gained passages respectively assignment give the triple channel of complex point to be repaired, can reparation be completed.
CN201510348382.1A 2015-06-23 2015-06-23 Based on the image repair method for facing domain diverging interpolation Active CN104952049B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510348382.1A CN104952049B (en) 2015-06-23 2015-06-23 Based on the image repair method for facing domain diverging interpolation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510348382.1A CN104952049B (en) 2015-06-23 2015-06-23 Based on the image repair method for facing domain diverging interpolation

Publications (2)

Publication Number Publication Date
CN104952049A true CN104952049A (en) 2015-09-30
CN104952049B CN104952049B (en) 2018-02-23

Family

ID=54166682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510348382.1A Active CN104952049B (en) 2015-06-23 2015-06-23 Based on the image repair method for facing domain diverging interpolation

Country Status (1)

Country Link
CN (1) CN104952049B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111242871A (en) * 2020-01-20 2020-06-05 上海微盟企业发展有限公司 Image completion method, device, equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7277595B1 (en) * 2003-01-06 2007-10-02 Apple Inc. Method and apparatus for digital image manipulation to remove image blemishes
CN101388967A (en) * 2008-10-20 2009-03-18 四川虹微技术有限公司 Gap filling method for view synthesis
CN103248909A (en) * 2013-05-21 2013-08-14 清华大学 Method and system of converting monocular video into stereoscopic video
CN103259960A (en) * 2013-04-22 2013-08-21 重庆金山科技(集团)有限公司 Data interpolation method and device and image output method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7277595B1 (en) * 2003-01-06 2007-10-02 Apple Inc. Method and apparatus for digital image manipulation to remove image blemishes
CN101388967A (en) * 2008-10-20 2009-03-18 四川虹微技术有限公司 Gap filling method for view synthesis
CN103259960A (en) * 2013-04-22 2013-08-21 重庆金山科技(集团)有限公司 Data interpolation method and device and image output method and device
CN103248909A (en) * 2013-05-21 2013-08-14 清华大学 Method and system of converting monocular video into stereoscopic video

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王茜艳 等: "基于插值的图像修复算法", 《汕头大学学报(自然科学版)》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111242871A (en) * 2020-01-20 2020-06-05 上海微盟企业发展有限公司 Image completion method, device, equipment and computer readable storage medium
CN111242871B (en) * 2020-01-20 2023-03-10 上海微盟企业发展有限公司 Image completion method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN104952049B (en) 2018-02-23

Similar Documents

Publication Publication Date Title
US9661187B1 (en) Color gamut mapping method based on color gamut of source image
WO2016043819A1 (en) Colour image enhancement guided by a greyscale image
CN104809694B (en) Digital image processing method and device
CN105578165A (en) Method and device for processing white balance of image, and vidicon
CN104809698A (en) Kinect depth image inpainting method based on improved trilateral filtering
US20180322832A1 (en) Image displaying methods and display devices
CN103973997B (en) A kind of image processing method and device
TW201541937A (en) Method and apparatus for generating depth information
TW201541938A (en) Method and apparatus for optimizing depth information
HK1164519A1 (en) Stereo matching method based on the distance and the colour difference
US20120218391A1 (en) Stereoscopic image registration and color balance evaluation display
CN104952049A (en) Image inpainting method based on domain divergence interpolation
CN103780798A (en) Image processing device and image processing method
CN105578160A (en) Fine definition demosaicking interpolation method based on FPGA platform
CN106920216B (en) Method and device for eliminating image noise
CN108024100A (en) Based on the Bayer format image interpolation method for improving edge guiding
CN103164847A (en) Method for eliminating shadow of moving target in video image
CN102137267A (en) Algorithm for transforming two-dimensional (2D) character scene into three-dimensional (3D) character scene
CN104376567A (en) Linear segmentation guided filtering (LSGF)-based stereo-matching method
CN103646382A (en) A method for processing tobacco disease image enhancement
CN106356020B (en) LED display display control method and image data dividing method
KR101289698B1 (en) Apparatus and method for enhancing image
US20220347753A1 (en) Layered modeling method for laser metal deposition (lmd) three-dimensional (3d) printing
CN102005060B (en) Method and device for automatically removing selected images in pictures
CN105740864B (en) A kind of image characteristic extracting method based on LBP

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