CN102339469A - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN102339469A
CN102339469A CN2010102357161A CN201010235716A CN102339469A CN 102339469 A CN102339469 A CN 102339469A CN 2010102357161 A CN2010102357161 A CN 2010102357161A CN 201010235716 A CN201010235716 A CN 201010235716A CN 102339469 A CN102339469 A CN 102339469A
Authority
CN
China
Prior art keywords
picture
original image
image
pixel
revising
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
CN2010102357161A
Other languages
Chinese (zh)
Other versions
CN102339469B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201010235716.1A priority Critical patent/CN102339469B/en
Publication of CN102339469A publication Critical patent/CN102339469A/en
Application granted granted Critical
Publication of CN102339469B publication Critical patent/CN102339469B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

The invention provides an image processing method and an image processing device, and belongs to the technical field of computers. The image processing method in the embodiment of the invention comprises the following steps of: establishing a corresponding relationship of pixel points between a modified picture and an original picture; and when a user selects an image range in one picture and amplifies the image range, determining an image range, which is needed to be amplified, in the other picture according to the corresponding relationship, so that the amplified images of the original picture and the modified picture are consistent. By the embodiment of the invention, when the user arbitrarily drags to select the image range which is needed to be amplified on the picture, the image ranges of the original picture and the modified picture, which are displayed after being amplified, are consistent.

Description

Image processing method and device
Technical field
The present invention relates to field of computer technology, particularly a kind of image processing method and device.
Background technology
Can handle image through various image processing softwares in the prior art, for example " QQ image " software.Existing image processing software all has the function of cutting out, comparing function arranged side by side, enlarging function.For example: as shown in Figure 1, the left side is an original image, and the right side is a picture after the modification after cutting out.Cut out and be meant a part of selecting in the original image, and other parts are cut out.As shown in Figure 1, the part in the original image in left side is cut out out picture after the formation modification as shown at right.Comparing function arranged side by side is meant as shown in Figure 1, original image is compared with revising the back picture side by side, conveniently to make amendment.Enlarging function is meant that the user drags through mouse in picture surface and shoots a retrievable arrow or select a part of picture in the picture for his mode, and this part is amplified.
All be to come the mark picture in the prior art with pixel, in the prior art all be first pixel with the picture upper left corner as initial pixel, the horizontal ordinate of other pixels and ordinate are the pixel count of this initial pixel of distance.
In realizing process of the present invention, the inventor finds that there is following problem at least in prior art:
The user drags through mouse in picture surface and shoots a retrievable arrow or select a part of image range in the picture for his mode, then confirms the picture of this selection with the four angular coordinate of selected image range.Original image with Fig. 1 is an example with revising the back picture and carrying out when comparing side by side, and it is as shown in Figure 2 that it amplifies the back.Among Fig. 2 the synoptic diagram of conventional images process software when showing side by side; Fig. 2 left side down for original image, bottom right for revise the back picture, upper left be the enlarged drawing of original image, upper right enlarged drawing for picture after revising.Existing image processing software, the user with original image with revise the back picture side by side relatively and when amplifying, can see picture as shown in Figure 2.The user has selected an image range the picture after the modification of bottom right, image processing software identical coordinate in the original image under the left side is selected image range; Then like original image and the image range of revising the back picture are amplified shown in upper left and upper right.Owing to just simply user-selected image range coordinate is indiscriminately imitated in another picture in the prior art, and, is so just caused this image range inconsistent with the picture of revising in the picture of back at original image because both origin coordinates points have changed.
Summary of the invention
When after the user is with original image and modification, scheming to compare side by side in the prior art in order to solve; If when selecting an image range to amplify therein among the width of cloth figure; Can cause the inconsistent problem of two width of cloth figure institute enlarged image scopes, the embodiment of the invention has proposed a kind of image processing method and device.Said technical scheme is following:
The embodiment of the invention has proposed a kind of image processing method, comprising:
When revising the size of original image, set up the corresponding relation between pixel and the corresponding pixel of revising back picture in the said original image;
When picture amplifies after to said original image or modification, obtain required enlarged image scope; Corresponding relation according between the pixel of said original image and the corresponding pixel of revising the back picture amplifies the relevant position of picture after said original image and the modification respectively, so that the image after amplifying is consistent.
Preferred, said when revising the size of original image as technique scheme, set up in the said original image pixel and modification afterwards the corresponding relation between the corresponding pixel of picture comprise:
When revising the size of said original image, obtain the said initial pixel of revising the back picture, and calculate the coordinate that this initial pixel is arranged in said original image,
According to the said coordinate of initial pixel in original image of revising the back picture; Obtain and revise the difference of picture initial pixel in back with respect to the initial pixel of original image; And calculate the coordinate of the said pixel of revising the back picture and the coordinate that this pixel is positioned at said original image with this, with obtain in the original image pixel with revise after corresponding relation Pt between the corresponding pixel of picture n(i n, j n)=F n(Pt 0(i, j)), wherein Pt n(i n, j n) be the said pixel coordinate of revising in the picture of back, Pt 0(i j) is being arranged in the coordinate of original image, F for corresponding pixel nBe mapping function.
Preferred as technique scheme, said when picture amplifies after to said original image or modification, obtain required enlarged image scope; Corresponding relation based between said original image and the corresponding pixel of revising the back picture amplifies the relevant position of picture after said original image and the modification respectively, so that consistent the comprising of image after amplifying:
When the user selects first image range of required amplification in said original image, confirm the side-play amount Pt of coordinate points between said first image range and the said original image Offset
According to this side-play amount, and the corresponding relation Pt between the pixel in the original image and the corresponding pixel of revising the back picture n(i n, j n)=F n(Pt 0(i, j)) obtains the said second corresponding image range in the picture of back of revising;
Second image range of picture after first image range of said original image and the said modification is amplified in proportion; That is:
Coordinate after original image amplifies is Pt 0(x, y)=f Ratio* Pt 0(i, j)+Pt OffsetF wherein RatioBe pantograph ratio;
The coordinate of revising after the back picture amplifies is Pt n(x, y)=f Ratio* K n(Pt n(i n, j n))+Pt OffsetF wherein RatioBe pantograph ratio; K nBe mapping function F nInverse function.
Preferred as technique scheme, said when picture amplifies after to said original image or modification, obtain required enlarged image scope; Corresponding relation based between said original image and the corresponding pixel of revising the back picture amplifies the relevant position of picture after said original image and the modification respectively, so that consistent the comprising of image after amplifying:
Be used for when the user said when revising the back picture and selecting second image range of required amplification, confirm after said second image range and said the modification side-play amount Pt of coordinate points between the picture Offset
According to this side-play amount, and the corresponding relation Pt between the pixel in the original image and the corresponding pixel of revising the back picture n(i n, j n)=F n(Pt 0(i, j)) obtains first corresponding in the said original image image range;
Second image range of picture and first image range of said original image after said the modification are amplified in proportion; That is:
The coordinate of revising after the back picture amplifies is Pt n(x, y)=f Ratio* Pt n(i, j)+Pt OffsetF wherein RatioBe pantograph ratio;
Coordinate after original image amplifies is Pt n(x, y)=f Ratio* K n(Pt n(i n, j n))+Pt OffsetF wherein RatioBe pantograph ratio; K nBe mapping function F nInverse function.
The embodiment of the invention has also proposed a kind of image processing apparatus, comprising:
The corresponding relation determination module is used for when revising the size of original image, sets up the corresponding relation between pixel and the corresponding pixel of revising back picture in the said original image;
The image range determination module is used for when amplifying to said original image or after revising, obtaining required enlarged image scope; Corresponding relation according between said original image and the corresponding pixel of revising the back picture amplifies the relevant position of picture after said original image and the modification, so that the image after amplifying is consistent.
Preferred as technique scheme, said corresponding relation determination module comprises:
The coordinate acquiring unit is used for when revising the size of said original image, and obtain the said initial pixel of revising the back picture, and calculate the coordinate that this initial pixel is arranged in said original image,
The corresponding relation unit; Be used for the coordinate of revising the initial pixel of back picture at original image according to said; Obtain and revise the difference of picture initial pixel in back with respect to the initial pixel of original image; And do the coordinate that pixel is positioned at said original image with this coordinate and this that calculates the said pixel of revising the back picture, with obtain in the original image pixel with revise after corresponding relation Pt between the corresponding pixel of picture n(i n, j n)=F n(Pt 0(i, j)), wherein Pt n(i n, j n) be the said pixel coordinate of revising in the picture of back, Pt 0(i j) is being arranged in the coordinate of original image, F for corresponding pixel nBe mapping function.
Preferred as technique scheme, said image range determination module comprises:
The first side-play amount acquiring unit, be used for when the user when said original image is selected first image range of required amplification, confirm the side-play amount Pt of coordinate points between said first image range and the said original image OffsetSide-play amount Pt OffsetCan be the initial pixel coordinate of this first image range difference with respect to the origin coordinates point coordinate of original image;
First amplifying unit is used for according to this side-play amount, and the corresponding relation Pt between the pixel in the original image and the corresponding pixel of revising the back picture n(i n, j n)=F n(Pt 0(i, j)) obtains the said second corresponding image range in the picture of back of revising; Second image range of picture after first image range of said original image and the said modification is amplified in proportion; That is:
Coordinate after original image amplifies is Pt 0(x, y)=f Ratio* Pt 0(i, j)+Pt OffsetF wherein RatioBe pantograph ratio;
The coordinate of revising after the back picture amplifies is Pt n(x, y)=f Ratio* K n(Pt n(i n, j n))+Pt OffsetF wherein RatioBe pantograph ratio; K nBe mapping function F nInverse function.
Preferred as technique scheme, said image range determination module comprises:
The second side-play amount acquiring unit, be used for when the user said when revising the back picture and selecting second image range of required amplification, confirm after said second image range and said the modification side-play amount Pt of coordinate points between the picture OffsetSide-play amount Pt OffsetCan be the initial pixel coordinate of this second image range difference with respect to the origin coordinates point coordinate of revising the back picture;
Second amplifying unit, according to this side-play amount, and the corresponding relation Pt between the pixel in the original image and the corresponding pixel of revising the back picture n(i n, j n)=F n(Pt 0(i, j)) obtains first corresponding in the said original image image range; Then second image range of picture and first image range of said original image after said the modification are amplified in proportion; That is:
The coordinate of revising after the back picture amplifies is Pt n(x, y)=f Ratio* Pt n(i, j)+Pt OffsetF wherein RatioBe pantograph ratio;
Coordinate after original image amplifies is Pt n(x, y)=f Ratio* K n(Pt n(i n, j n))+Pt OffsetF wherein RatioBe pantograph ratio; K nBe mapping function F nInverse function.
The beneficial effect of the technical scheme that the embodiment of the invention provides is: the embodiment of the invention has proposed a kind of image processing method and device, through setting up the corresponding relation of revising pixel between back picture and the original image; When the user selects in the pictures image range to amplify therein, confirm required enlarged image scope in another picture through this corresponding relation, so that the image after the amplification of picture is consistent after said original image and the modification.The embodiment of the invention lets the user on picture, pull arbitrarily and selects required enlarged image scope, and the image range of original image after can also guaranteeing to amplify and modification back picture is consistent.
Description of drawings
In order to be illustrated more clearly in the technical scheme of the embodiment of the invention; To do one to the accompanying drawing that uses among the embodiment below introduces simply; Obviously, below listed accompanying drawing only be some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 carries out comparison synoptic diagram arranged side by side after existing image processing software is cut out;
The synoptic diagram of Fig. 2 for a picture among Fig. 1 being selected amplify and compare side by side after the image range;
Fig. 3 is the schematic flow sheet of first embodiment of the invention;
Fig. 4 is the structural representation of third embodiment of the invention.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, embodiment of the present invention is done to describe in detail further below in conjunction with accompanying drawing.
The mentality of designing of the embodiment of the invention is: because the coordinate of the picture after cutting out can be corresponding to the coordinate of original image, so set up the pixel revised in the picture of back and the corresponding relation between the respective pixel point in the original image in the embodiment of the invention; When picture carries out the part amplification to original image and after revising, then can confirm corresponding image range like this.So just can guarantee that the user can choose at random required enlarged image scope when carrying out comparing side by side, and guarantee original image and revise the image range of back picture after amplification in full accord.
Below through embodiment the present invention is further explained.
Embodiment 1
First embodiment of the invention has proposed a kind of image processing method, and its flow process is as shown in Figure 3, comprising:
Step 101, when revising the accompanying drawing size, set up the corresponding relation between pixel and the corresponding pixel of revising back picture in the original image;
Step 102, when picture is amplified, obtain required enlarged image scope;
Step 103, according to the corresponding relation between said original image and the corresponding pixel of revising the back picture, the relevant position of picture after said original image and the modification is amplified respectively, so that the image after amplifying is consistent.
The embodiment of the invention lets the user on picture, pull arbitrarily and selects required enlarged image scope, and the image range of original image after can also guaranteeing to amplify and modification back picture is consistent.
Embodiment 2
Second embodiment of the invention has proposed a kind of image processing method, is on the basis of first embodiment, to improve, and comprising:
Step 201, when revising the accompanying drawing size, set up the corresponding relation between pixel and the corresponding pixel of revising back picture in the original image;
Step 202, when picture is amplified, obtain required enlarged image scope;
Step 203, according to the corresponding relation between said original image and the corresponding pixel of revising the back picture, the relevant position of picture after said original image and the modification is amplified respectively, so that the image after amplifying is consistent.
Wherein, described step 201 can be specially:
Step 2011, when revising the accompanying drawing size, obtain the said initial pixel of revising the back picture, and calculate the coordinate that this initial pixel is arranged in said original image,
Step 2012, according to the said coordinate of initial pixel in original image of revising the back picture; Obtain and revise the difference of picture initial pixel in back with respect to the initial pixel of original image; And do the coordinate that pixel is positioned at said original image with this coordinate and this that calculates the said pixel of revising the back picture, with obtain in the original image pixel with revise after corresponding relation Pt between the corresponding pixel of picture n(i n, j n)=F n(Pt 0(i, j)), wherein Pt 0(i j) is the said coordinate (i that revises in the picture of back n, j n) pixel, Pt 0(i, j) this pixel is being arranged in the coordinate of original image, F nBe mapping function.
After the initial pixel that has obtained modification back picture, just can obtain the corresponding coordinate in original image of each pixel of revising the back picture.So just can be easy to obtain mapping function F n
For example: when the original image in left side as shown in Figure 1 is cut out, its edge is cut out, obtained like picture after the modification on the right side of Fig. 1.Like this, the coordinate of the pixel of the correspondence of initial pixel in original image of modification back picture is (20,30); Then revise the back picture each coordinate (s, p), its horizontal ordinate in original image be (s+20, p+30).So just can calculate mapping function F according to these two known parameters n
Can calculate the coordinate that is arranged in original image according to the initial pixel of revising the back picture like this, obtain the corresponding relation between pixel and the corresponding pixel of revising back picture in the original image.This mode not only calculated amount is low, and this corresponding relation is accurate.
In step 203, the user can select an image range to amplify in original image, also can after modification, select an image range to amplify in the picture.
When in original image, selecting an image range to amplify, then this step 203 can comprise:
Step 203a, when the user selects first image range of required amplification in said original image, confirm the side-play amount Pt of coordinate points between said first image range and the said original image Offset
Step 203b, according to this side-play amount, and the corresponding relation Pt between the pixel in the original image and the corresponding pixel of revising the back picture n(i n, j n)=F n(Pt 0(i, j)) obtains the said second corresponding image range in the picture of back of revising.
Step 203c, second image range of picture after first image range of said original image and the said modification is amplified in proportion.That is:
Coordinate after original image amplifies is Pt 0(x, y)=f Ratio* Pt 0(i, j)+Pt OffsetF wherein RatioBe pantograph ratio;
The coordinate of revising after the back picture amplifies is Pt n(x, y)=f Ratio* K n(Pt n(i n, j n))+Pt OffsetF wherein RatioBe pantograph ratio; K nBe mapping function F nInverse function.
Wherein, pantograph ratio fratio and side-play amount PtOffset are the known parameters that can import acquisition according to the user.
In step 203b, side-play amount Pt OffsetCan calculate acquisition with respect to the difference of the origin coordinates point coordinate of original image through the initial pixel coordinate of this first image range.Since obtained original image and the corresponding relation of revising the back picture in aforesaid step 2011 and the step 2022, therefore can be according to the side-play amount Pt that calculates of this corresponding relation and acquisition Offset, first image range that can calculate this original image corresponding second image range in the picture after modification.Can make first image range identical through simple mode like this with the pairing image of second image range.
When selecting an image range to amplify in the picture after modification, then this step 203 can comprise:
Step 203A, be used for when the user said when revising the back picture and selecting second image range of required amplification, confirm after said second image range and said the modification side-play amount Pt of coordinate points between the picture Offset
Step 203B, according to this side-play amount, and the corresponding relation Pt between the pixel in the original image and the corresponding pixel of revising the back picture n(i n, j n)=F n(Pt 0(i, j)) obtains first corresponding in the said original image image range.
Step 203C, revise second image range of back picture and first image range of said original image is amplified in proportion with said.That is:
The coordinate of revising after the back picture amplifies is Pt n(x, y)=f Ratio* Pt n(i, j)+Pt OffsetF wherein RatioBe pantograph ratio;
Coordinate after original image amplifies is Pt n(x, y)=f Ratio* K n(Pt n(i n, j n))+Pt OffsetF wherein RatioBe pantograph ratio; K nBe mapping function F nInverse function.
Wherein the principle of step 203B is identical with aforesaid step 203b, repeats no more at this.
Wherein, in aforesaid step, the user may occur and in original image, select an image range, revise the image range that does not have in the picture of back and comprised in this image range.This situation can adopt multiple mode to carry out subsequent treatment, and the embodiment of the invention is not made qualification to this.For example: can point out the user to go beyond the scope; Again for example: the part that picture after revising lacks is added background color to replenish.
In second embodiment of the invention, can obtain corresponding relation through simple mode, this mode not only calculated amount is low, and this corresponding relation is accurate.Simultaneously; Can also utilize above-mentioned corresponding relation to obtain the mode of carrying out corresponding amplification through above-mentioned corresponding relation; Can work as the user at original image or revise when selecting an image-region to amplify in the picture of back, the inverse function of the mapping function through relativity, and the user-selected image range coordinate and the offset function of original image; Just can calculate the image range of picture after the corresponding modification, the image after realizing amplifying with this is consistent.
Embodiment 3
Third embodiment of the invention has proposed a kind of image processing apparatus, and its structure is as shown in Figure 4, comprising:
Corresponding relation determination module 1 is used for when revising the accompanying drawing size, sets up the corresponding relation between pixel and the corresponding pixel of revising back picture in the original image;
Image range determination module 2 is used for when picture is amplified, and obtains required enlarged image scope; Corresponding relation according between said original image and the corresponding pixel of revising the back picture amplifies the relevant position of picture after said original image and the modification, so that the image after amplifying is consistent.
The embodiment of the invention lets the user on picture, pull arbitrarily and selects required enlarged image scope, and the image range of original image after can also guaranteeing to amplify and modification back picture is consistent.
Embodiment 4
Fourth embodiment of the invention has proposed a kind of image processing apparatus, is on the basis of the 3rd embodiment, to improve, and comprising:
Corresponding relation determination module 1 is used for when revising the accompanying drawing size, sets up the corresponding relation between pixel and the corresponding pixel of revising back picture in the original image;
Image range determination module 2 is used for when picture is amplified, and obtains required enlarged image scope; Corresponding relation according between said original image and the corresponding pixel of revising the back picture amplifies the relevant position of picture after said original image and the modification, so that the image after amplifying is consistent.
Wherein, corresponding relation determination module 1 comprises:
The coordinate acquiring unit is used for when revising the accompanying drawing size, and obtain the said initial pixel of revising the back picture, and calculate the coordinate that this initial pixel is arranged in said original image,
The corresponding relation unit; Be used for the coordinate of revising the initial pixel of back picture at original image according to said; Obtain and revise the difference of picture initial pixel in back with respect to the initial pixel of original image; And do the coordinate that pixel is positioned at said original image with this coordinate and this that calculates the said pixel of revising the back picture, with obtain in the original image pixel with revise after corresponding relation Pt between the corresponding pixel of picture n(i n, j n)=F n(Pt 0(i, j)), wherein Pt n(i n, j n) be the said pixel coordinate of revising in the picture of back, Pt 0(i j) is being arranged in the coordinate of original image, F for corresponding pixel nBe mapping function.
After the initial pixel that has obtained modification back picture, just can obtain the corresponding coordinate in original image of each pixel of revising the back picture.So just can be easy to obtain mapping function F n
For example: when the original image in left side as shown in Figure 1 is cut out, its edge is cut out, obtained like picture after the modification on the right side of Fig. 1.Like this, the coordinate of the pixel of the correspondence of initial pixel in original image of modification back picture is (20,30); Then revise the back picture each coordinate (s, p), its horizontal ordinate in original image be (s+20, p+30).So just can calculate mapping function F according to these two known parameters n
Can be arranged in the coordinate of original image like this according to the initial pixel of revising the back picture, obtain the corresponding relation between pixel and the corresponding pixel of revising back picture in the original image.This mode not only calculated amount is low, and this corresponding relation is accurate.
In embodiments of the present invention, the user can select an image range to amplify in original image, and then need amplify the relevant position of revising the back picture this moment; The user also can select an image range to amplify after modification in the picture, then need amplify the relevant position of original image this moment.
When in original image, selecting an image range to amplify, image range determination module 2 comprises:
The first side-play amount acquiring unit, be used for when the user when said original image is selected first image range of required amplification, confirm the side-play amount Pt of coordinate points between said first image range and the said original image OffsetSide-play amount Pt OffsetCan be the initial pixel coordinate of this first image range difference with respect to the origin coordinates point coordinate of original image;
First amplifying unit is used for according to this side-play amount, and the corresponding relation Pt between the pixel in the original image and the corresponding pixel of revising the back picture n(i n, j n)=F n(Pt 0(i, j)) obtains the said second corresponding image range in the picture of back of revising; Second image range of picture after first image range of said original image and the said modification is amplified in proportion.That is:
Coordinate after original image amplifies is Pt 0(x, y)=f Ratio* Pt 0(i, j)+Pt OffsetF wherein RatioBe pantograph ratio;
The coordinate of revising after the back picture amplifies is Pt n(x, y)=f Ratio* K n(Pt n(i n, j n))+Pt OffsetF wherein RatioBe pantograph ratio; K nBe mapping function F nInverse function.
Wherein, pantograph ratio fratio and side-play amount PtOffset are the known parameters that can import acquisition according to the user.
In the first side-play amount acquiring unit, side-play amount Pt OffsetCan calculate acquisition with respect to the difference of the origin coordinates point coordinate of original image through the initial pixel coordinate of this first image range.Since obtained original image and the corresponding relation of revising the back picture in aforesaid coordinate acquiring unit and the coordinate acquiring unit, therefore can be according to the side-play amount Pt that calculates of this corresponding relation and acquisition Offset, first image range that can calculate this original image corresponding second image range in the picture after modification.Can make first image range identical through simple mode like this with the pairing image of second image range.
When selecting an image range to amplify in the picture after modification, image range determination module 2 comprises:
The second side-play amount acquiring unit, be used for when the user said when revising the back picture and selecting second image range of required amplification, confirm after said second image range and said the modification side-play amount Pt of coordinate points between the picture OffsetSide-play amount Pt OffsetCan be the initial pixel coordinate of this second image range difference with respect to the origin coordinates point coordinate of revising the back picture;
Second amplifying unit, according to this side-play amount, and the corresponding relation Pt between the pixel in the original image and the corresponding pixel of revising the back picture n(i n, j n)=F n(Pt 0(i, j)) obtains first corresponding in the said original image image range; Then second image range of picture and first image range of said original image after said the modification are amplified in proportion.That is:
The coordinate of revising after the back picture amplifies is Pt n(x, y)=f Ratio* Pt n(i, j)+Pt OffsetF wherein RatioBe pantograph ratio;
Coordinate after original image amplifies is Pt n(x, y)=f Ratio* K n(Pt n(i n, j n))+Pt OffsetF wherein RatioBe pantograph ratio; K nBe mapping function F nInverse function.
Wherein, in aforesaid device, the user may occur and in original image, select an image range, revise the image range that does not have in the picture of back and comprised in this image range.This situation can adopt multiple mode to carry out subsequent treatment, and the embodiment of the invention is not made qualification to this.For example: can point out the user to go beyond the scope; Again for example: the part that picture after revising lacks is added background color to replenish.
In fourth embodiment of the invention, can obtain corresponding relation through simple mode, this mode not only calculated amount is low, and this corresponding relation is accurate.Simultaneously; Can also utilize above-mentioned corresponding relation to obtain the mode of carrying out corresponding amplification through above-mentioned corresponding relation; Can work as the user at original image or revise when selecting an image-region to amplify in the picture of back, the inverse function of the mapping function through relativity, and the user-selected image range coordinate and the offset function of original image; Just can calculate the image range of picture after the corresponding modification, the image after realizing amplifying with this is consistent.
If the said integrated unit of the embodiment of the invention is realized with the form of SFU software functional unit and during as independently production marketing or use, also can be stored in the computer read/write memory medium.Based on such understanding; The part that technical scheme of the present invention contributes to prior art in essence in other words can be come out with the embodied of software product; This computer software product is stored in the storage medium; Comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out all or part of of the said method of each embodiment of the present invention.And aforesaid storage medium comprises: various media that can be program code stored such as USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-Only Memory), RAS (RAM, Random Access Memory), magnetic disc or CD.
More than be merely preferred embodiment of the present invention, or not all within spirit of the present invention and principle in order to restriction the present invention, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. an image processing method is characterized in that, comprising:
When revising the size of original image, set up the corresponding relation between pixel and the corresponding pixel of revising back picture in the said original image;
When picture amplifies after to said original image or modification, obtain required enlarged image scope; Corresponding relation according between the pixel of said original image and the corresponding pixel of revising the back picture amplifies the relevant position of picture after said original image and the modification respectively, so that the image after amplifying is consistent.
2. image processing method according to claim 1 is characterized in that, and is said when revising the size of original image, and the pixel of setting up in the said original image comprises with corresponding relation between the corresponding pixel of revising back picture:
When revising the size of said original image, obtain the said initial pixel of revising the back picture, and calculate the coordinate that this initial pixel is arranged in said original image,
According to the said coordinate of initial pixel in original image of revising the back picture; Obtain and revise the difference of picture initial pixel in back with respect to the initial pixel of original image; And calculate the coordinate of the said pixel of revising the back picture and the coordinate that this pixel is positioned at said original image with this, with obtain in the original image pixel with revise after corresponding relation Pt between the corresponding pixel of picture n(i n, j n)=F n(Pt 0(i, j)), wherein Pt n(i n, j n) be the said pixel coordinate of revising in the picture of back, Pt 0(i j) is being arranged in the coordinate of original image, F for corresponding pixel nBe mapping function.
3. image processing method according to claim 2 is characterized in that, and is said when picture amplifies after to said original image or modification, obtains required enlarged image scope; Corresponding relation according between said original image and the corresponding pixel of revising the back picture amplifies the relevant position of picture after said original image and the modification respectively, so that consistent the comprising of image after amplifying:
When the user selects first image range of required amplification in said original image, confirm the side-play amount Pt of coordinate points between said first image range and the said original image Offset
According to this side-play amount, and the corresponding relation Pt between the pixel in the original image and the corresponding pixel of revising the back picture n(i n, j n)=F n(Pt 0(i, j)) obtains the said second corresponding image range in the picture of back of revising;
Second image range of picture after first image range of said original image and the said modification is amplified in proportion; That is:
Coordinate after original image amplifies is Pt 0(x, y)=f Ratio* Pt 0(i, j)+Pt OffsetF wherein RatioBe pantograph ratio;
The coordinate of revising after the back picture amplifies is Pt n(x, y)=f Ratio* K n(Pt n(i n, j n))+Pt OffsetF wherein RatioBe pantograph ratio; K nBe mapping function F nInverse function.
4. image processing method according to claim 2 is characterized in that, and is said when picture amplifies after to said original image or modification, obtains required enlarged image scope; Corresponding relation according between said original image and the corresponding pixel of revising the back picture amplifies the relevant position of picture after said original image and the modification respectively, so that consistent the comprising of image after amplifying:
Be used for when the user said when revising the back picture and selecting second image range of required amplification, confirm after said second image range and said the modification side-play amount Pt of coordinate points between the picture Offset
According to this side-play amount, and the corresponding relation Pt between the pixel in the original image and the corresponding pixel of revising the back picture n(i n, j n)=F n(Pt 0(i, j)) obtains first corresponding in the said original image image range;
Second image range of picture and first image range of said original image after said the modification are amplified in proportion; That is:
The coordinate of revising after the back picture amplifies is Pt n(x, y)=f Ratio* Pt n(i, j)+Pt OffsetF wherein RatioBe pantograph ratio;
Coordinate after original image amplifies is Pt n(x, y)=f Ratio* K n(Pt n(i n, j n))+Pt OffsetF wherein RatioBe pantograph ratio; K nBe mapping function F nInverse function.
5. an image processing apparatus is characterized in that, comprising:
The corresponding relation determination module is used for when revising the size of original image, sets up the corresponding relation between pixel and the corresponding pixel of revising back picture in the said original image;
The image range determination module is used for when amplifying to said original image or after revising, obtaining required enlarged image scope; Corresponding relation according between said original image and the corresponding pixel of revising the back picture amplifies the relevant position of picture after said original image and the modification, so that the image after amplifying is consistent.
6. image processing apparatus according to claim 5 is characterized in that, said corresponding relation determination module comprises:
The coordinate acquiring unit is used for when revising the size of said original image, and obtain the said initial pixel of revising the back picture, and calculate the coordinate that this initial pixel is arranged in said original image,
The corresponding relation unit; Be used for the coordinate of revising the initial pixel of back picture at original image according to said; Obtain and revise the difference of picture initial pixel in back with respect to the initial pixel of original image; And do the coordinate that pixel is positioned at said original image with this coordinate and this that calculates the said pixel of revising the back picture, with obtain in the original image pixel with revise after corresponding relation Pt between the corresponding pixel of picture n(i n, j n)=F n(Pt 0(i, j)), wherein Pt n(i n, j n) be the said pixel coordinate of revising in the picture of back, Pt 0(i j) is being arranged in the coordinate of original image, F for corresponding pixel nBe mapping function.
7. image processing apparatus according to claim 6 is characterized in that, said image range determination module comprises:
The first side-play amount acquiring unit, be used for when the user when said original image is selected first image range of required amplification, confirm the side-play amount Pt of coordinate points between said first image range and the said original image OffsetSide-play amount Pt OffsetCan be the initial pixel coordinate of this first image range difference with respect to the origin coordinates point coordinate of original image;
First amplifying unit is used for according to this side-play amount, and the corresponding relation Pt between the pixel in the original image and the corresponding pixel of revising the back picture n(i n, j n)=F n(Pt 0(i, j)) obtains the said second corresponding image range in the picture of back of revising; Second image range of picture after first image range of said original image and the said modification is amplified in proportion; That is:
Coordinate after original image amplifies is Pt 0(x, y)=f Ratio* Pt 0(i, j)+Pt OffsetF wherein RatioBe pantograph ratio;
The coordinate of revising after the back picture amplifies is Pt n(x, y)=f Ratio* K n(Pt n(i n, j n))+Pt OffsetF wherein RatioBe pantograph ratio; K nBe mapping function F nInverse function.
8. according to claim 5 or 6 described image processing apparatus, it is characterized in that said image range determination module comprises:
The second side-play amount acquiring unit, be used for when the user said when revising the back picture and selecting second image range of required amplification, confirm after said second image range and said the modification side-play amount Pt of coordinate points between the picture OffsetSide-play amount Pt OffsetCan be the initial pixel coordinate of this second image range difference with respect to the origin coordinates point coordinate of revising the back picture;
Second amplifying unit, according to this side-play amount, and the corresponding relation Pt between the pixel in the original image and the corresponding pixel of revising the back picture n(i n, j n)=F n(Pt 0(i, j)) obtains first corresponding in the said original image image range; Then second image range of picture and first image range of said original image after said the modification are amplified in proportion; That is:
The coordinate of revising after the back picture amplifies is Pt n(x, y)=f Ratio* Pt n(i, j)+Pt OffsetF wherein RatioBe pantograph ratio;
Coordinate after original image amplifies is Pt n(x, y)=f Ratio* K n(Pt n(i n, j n))+Pt OffsetF wherein RatioBe pantograph ratio; K nBe mapping function F nInverse function.
CN201010235716.1A 2010-07-21 2010-07-21 Image processing method and device Active CN102339469B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010235716.1A CN102339469B (en) 2010-07-21 2010-07-21 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010235716.1A CN102339469B (en) 2010-07-21 2010-07-21 Image processing method and device

Publications (2)

Publication Number Publication Date
CN102339469A true CN102339469A (en) 2012-02-01
CN102339469B CN102339469B (en) 2015-11-25

Family

ID=45515183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010235716.1A Active CN102339469B (en) 2010-07-21 2010-07-21 Image processing method and device

Country Status (1)

Country Link
CN (1) CN102339469B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345738A (en) * 2013-06-04 2013-10-09 北京百度网讯科技有限公司 Object detection method and device based on area of interest
CN106970753A (en) * 2017-03-15 2017-07-21 福建中金在线信息科技有限公司 A kind of picture amplifying method and device
WO2019196662A1 (en) * 2018-04-09 2019-10-17 杭州海康威视数字技术股份有限公司 Local enlargement of image
CN110941375A (en) * 2019-11-26 2020-03-31 腾讯科技(深圳)有限公司 Method and device for locally amplifying image and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1904940A (en) * 2005-07-28 2007-01-31 汤姆森许可贸易公司 Method and device for generating a sequence of images of reduced size
CN101179671A (en) * 2006-11-10 2008-05-14 上海奇码数字信息有限公司 Image scaling device and image scaling method
EP2015880A1 (en) * 2006-05-04 2009-01-21 Outotec Oyj Method and equipment for cooling anodes
CN101576996A (en) * 2009-06-05 2009-11-11 腾讯科技(深圳)有限公司 Processing method and device for realizing image zooming
CN101670713A (en) * 2008-09-10 2010-03-17 兄弟工业株式会社 Print label editing apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1904940A (en) * 2005-07-28 2007-01-31 汤姆森许可贸易公司 Method and device for generating a sequence of images of reduced size
EP2015880A1 (en) * 2006-05-04 2009-01-21 Outotec Oyj Method and equipment for cooling anodes
CN101179671A (en) * 2006-11-10 2008-05-14 上海奇码数字信息有限公司 Image scaling device and image scaling method
CN101670713A (en) * 2008-09-10 2010-03-17 兄弟工业株式会社 Print label editing apparatus
CN101576996A (en) * 2009-06-05 2009-11-11 腾讯科技(深圳)有限公司 Processing method and device for realizing image zooming

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵恒军: "《大小不同的图像变形方法的研究与实现》", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 4, 15 October 2007 (2007-10-15) *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345738A (en) * 2013-06-04 2013-10-09 北京百度网讯科技有限公司 Object detection method and device based on area of interest
CN103345738B (en) * 2013-06-04 2016-08-17 北京百度网讯科技有限公司 Method for checking object based on area-of-interest and device
CN106970753A (en) * 2017-03-15 2017-07-21 福建中金在线信息科技有限公司 A kind of picture amplifying method and device
WO2019196662A1 (en) * 2018-04-09 2019-10-17 杭州海康威视数字技术股份有限公司 Local enlargement of image
CN110362250A (en) * 2018-04-09 2019-10-22 杭州海康威视数字技术股份有限公司 A kind of method, apparatus and display equipment of image local amplification
CN110362250B (en) * 2018-04-09 2021-03-23 杭州海康威视数字技术股份有限公司 Image local amplification method and device and display equipment
CN110941375A (en) * 2019-11-26 2020-03-31 腾讯科技(深圳)有限公司 Method and device for locally amplifying image and storage medium
CN110941375B (en) * 2019-11-26 2023-09-05 腾讯科技(深圳)有限公司 Method, device and storage medium for locally amplifying image

Also Published As

Publication number Publication date
CN102339469B (en) 2015-11-25

Similar Documents

Publication Publication Date Title
US7595809B2 (en) Method and system for determining an occlusion cost for concurrently presenting one or more images in a shared viewing region
CN107251101B (en) Scene modification for augmented reality using markers with parameters
CN104038807B (en) A kind of figure layer mixed method and device based on OpenGL
EP2613292B1 (en) Apparatus and method for scaling layout of application in image display device
TWI343207B (en) Device and method for obtain a clear image
US20060087556A1 (en) Stereoscopic image display device
CN102147911B (en) Image processing device
CN104915332B (en) A kind of method and device for generating layout template
CA2507405A1 (en) Graphical user interface for 3-dimensional view of a data collection based on an attribute of the data
US20090102835A1 (en) Generating an asset for interactive entertainment using digital image capture
CN104751765A (en) Display control method and electronic device
CN102339469A (en) Image processing method and device
JP2012213019A (en) Image processing apparatus, image processing method, and program
CN107146197A (en) A kind of reduced graph generating method and device
US10776974B2 (en) Information processing apparatus and control method of information processing apparatus
JP2018098705A5 (en)
CN105094615A (en) Information processing method and electronic equipment
US10317880B2 (en) Print data dividing apparatus, and related program and recording medium, that determine a shape of a joint portion of a target area and generate three-dimensional shape data for division printing of the target area
CN102307308A (en) Method and equipment for generating three-dimensional image on touch screen
CN103236042A (en) Self-adaptive picture processing method and device
CN102708162A (en) Visualization method for information of ancient architecture
US10169916B2 (en) Image processing device and image processing method
CN106462600A (en) Method and device for displaying photo
CN102270086B (en) Method and the instant communication client of contact person is represented in immediate communication tool
WO2018187939A1 (en) Method for identifying three-dimensional image, and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant