CN110324534A - Image processing method, device and electronic equipment - Google Patents
Image processing method, device and electronic equipment Download PDFInfo
- Publication number
- CN110324534A CN110324534A CN201910621104.7A CN201910621104A CN110324534A CN 110324534 A CN110324534 A CN 110324534A CN 201910621104 A CN201910621104 A CN 201910621104A CN 110324534 A CN110324534 A CN 110324534A
- Authority
- CN
- China
- Prior art keywords
- image
- offset
- pixel
- processed
- deviating track
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Processing (AREA)
Abstract
This application discloses a kind of image processing method, device and electronic equipments to be merged, to obtain the image of curtain shooting effect after similar single-lens reflex camera by carrying out after repeatedly deviating to the image around deviating track with image to be processed and template image.Specifically, which comprises obtain image and deviating track to be processed;Along the deviating track, multiple migration processing is carried out to the image for being located at the deviating track peripheral region on the image to be processed, obtains several migrated images;Image superposition is carried out several described migrated images, obtains superimposed image;The image of target object is obtained from the image to be processed;The image of the target object is shown to the corresponding position in the superimposed image according to the deviating track.Scheme described in the present embodiment, can be in the case where not depending on the hardware configuration of single-lens reflex camera equipment, and curtain shoots similar image effect after realizing similar slr camera.
Description
Technical field
This application involves field of image processings, in particular to a kind of image processing method, device and electronic equipment.
Background technique
Single-lens reflex camera equipment has a kind of style of shooting that rear curtain is synchronous, this style of shooting, using low speed shutter in the dusk, night
Or indoor shot mobile object controls flash lamp and glistens before curtain is closed after end exposure when shooting, in this way,
While taking the diplopia of subject movement, moreover it is possible to which subject is clapped it is clear that dragging so as to the clear background of realization body
The dreamlike effect of shadow.
In the prior art, curtain synchronous effect depends on hardware to realize after realization, that is to say, that needs to set single-lens reflex camera
Standby Flashing Light Parameters and time of flashing are controlled, the mode higher cost of curtain synchronous effect after this acquisition, to user
Technical requirements it is also higher, curtain synchronous images after general user is difficult to shoot effect preferably.
Summary of the invention
In order at least overcome above-mentioned deficiency in the prior art, the first purpose of the application is to provide a kind of image procossing
Method, which comprises
Obtain image and deviating track to be processed;
Along the deviating track, the image that the deviating track peripheral region is located on the image to be processed is carried out more
Secondary migration processing obtains several migrated images;
Image superposition is carried out several described migrated images, obtains superimposed image;
The image of target object is obtained from the image to be processed;
The image of the target object is shown to the corresponding position in the superimposed image according to the deviating track.
Optionally, described along the deviating track, to being located at the deviating track peripheral region on the image to be processed
Image the step of carrying out multiple migration processing, obtaining several migrated images include:
According to different offsets, calculate under the offset in the image of deviating track peripheral region, each pixel
Pixel value of the point after deviating track offset, obtains migrated image, and the offset is the deviating track peripheral region
Overall offset distance.
Optionally, described calculate is located in the image of deviating track peripheral region under the offset, and each pixel is along institute
State deviating track offset after pixel value, obtain migrated image the step of include:
According to the deviating track, the corresponding offset weight of each pixel obtained in the image to be processed is calculated,
The offset weight is the shift ratio of the pixel, and the offset weight closer to the pixel of the deviating track is bigger;
According to different offsets, the product of the offset weight of the offset and each pixel is calculated;
Each pixel in the image to be processed is calculated according to the offset and the product of the offset weight of each pixel
Corresponding offset pixels point;
The pixel value for obtaining the corresponding offset pixels point of each pixel, obtains migrated image.
Optionally, described calculate is located in the image of deviating track peripheral region under the offset, and each pixel is along institute
State deviating track offset after pixel value, obtain migrated image the step of include:
Obtain the offset weight with the deviating track distance for each pixel within the scope of pre-determined distance, wherein institute
The shift ratio that offset weight is the pixel is stated, the offset weight closer to the pixel of the deviating track is bigger;
According to different offsets, the product of the offset weight of the offset and each pixel is calculated
Each pixel in the image to be processed is calculated according to the offset and the product of the offset weight of each pixel
Corresponding offset pixels point;
The pixel value for obtaining the corresponding offset pixels point of each pixel, obtains migrated image.
Optionally, the step of image for obtaining target object includes:
Obtain the template image including objects' contour;
The image of the target object is obtained from the image to be processed according to the template image.
Optionally, described the step of carrying out image superposition several described migrated images, obtain superimposed image, includes:
By in each width migrated image, the pixel value of the pixel at same row, the coordinate with a line is averaged, and is obtained
Superimposed image.
Optionally, the method also includes:
Obtain preset offset;
The product for calculating the offset Yu default bias multiple obtains new offset.
Optionally, described to be shown the image of the target object in the superimposed image according to the deviating track
The step of corresponding position includes:
Obtain first position of the target object in the image to be processed;
Determine the second position corresponding with the first position in the superimposed image;
The image of the target object is shown on the second position in superimposed image, so that the target object
Image be located at the deviating track end;
Wherein, the position one of position of the target object in the image to be processed and the end of the deviating track
It causes.
The another object of the application is to provide a kind of image processing apparatus, and described device includes:
First obtains module, for obtaining image and deviating track to be processed;
Offset module, along the deviating track, to being located at the deviating track peripheral region on the image to be processed
Image carries out multiple migration processing, obtains several migrated images;
Laminating module obtains superimposed image for carrying out image superposition several described migrated images;
Second obtains module, for obtaining the image of target object from the image to be processed;
Fusion Module, for being shown the image of the target object in the superimposed image according to the deviating track
Corresponding position.
The another object of the application is to provide a kind of electronic equipment, and the electronic equipment includes image acquisition units, deposits
Reservoir and processor, shown image acquisition units communicate to connect respectively with the memory, the processor, the memory with
The processor communication connects, and executable instruction is stored in the memory, and the processor is executing the executable finger
When enabling, the method as described in any of the above item is realized.
In terms of existing technologies, the application has the advantages that
The image processing method, device and electronic equipment of the embodiment of the present application, by the way that track will be located on image to be processed
The image of surrounding is repeatedly deviated along deviating track, to obtain multiple migrated images, is obtained according to multiple migrated images
The image of target object in image to be processed is finally shown the corresponding position in superimposed image, so just by superimposed image
The picture similar to curtain sync pulse jamming effect after single-lens reflex camera can be obtained.Since this method can be realized by image processing method, because
This, without relying on the particular arrangement to hardware.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached
Figure is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore is not construed as pair
The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this
A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the structural schematic block diagram of electronic equipment provided by the embodiments of the present application;
Fig. 2 is the flow diagram one of image processing method provided by the embodiments of the present application;
Fig. 3 is the flow diagram two of image processing method provided by the embodiments of the present application;
Fig. 4 is the subdivision result schematic diagram of triangulation provided by the embodiments of the present application;
Fig. 5 is the flow diagram three of image processing method provided by the embodiments of the present application;
Fig. 6 is the exemplary diagram of image to be processed provided by the embodiments of the present application;
Fig. 7 is the schematic diagram of deviating track provided by the embodiments of the present application;
Fig. 8 is template image schematic diagram provided by the embodiments of the present application;
Fig. 9 is offset effect figure provided by the embodiments of the present application;
Figure 10 is the structure of image processing apparatus provided by the embodiments of the present application.
Icon: 100- electronic equipment;110- image processing apparatus;111- first obtains module;112- offset module;113-
Laminating module;114- second obtains module;115- Fusion Module;120- memory;130- processor;140- Image Acquisition list
Member.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is
Some embodiments of the present application, instead of all the embodiments.The application being usually described and illustrated herein in the accompanying drawings is implemented
The component of example can be arranged and be designed with a variety of different configurations.
Therefore, the detailed description of the embodiments herein provided in the accompanying drawings is not intended to limit below claimed
Scope of the present application, but be merely representative of the selected embodiment of the application.Based on the embodiment in the application, this field is common
Technical staff's every other embodiment obtained without making creative work belongs to the model of the application protection
It encloses.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.
In the description of the present application, it is also necessary to which explanation is unless specifically defined or limited otherwise, term " setting ",
" installation ", " connected ", " connection " shall be understood in a broad sense, for example, it may be fixedly connected, may be a detachable connection or one
Connect to body;It can be mechanical connection, be also possible to be electrically connected;It can be directly connected, it can also be indirect by intermediary
It is connected, can be the connection inside two elements.For the ordinary skill in the art, on being understood with concrete condition
State the concrete meaning of term in this application.
Referring to Figure 1, Fig. 1 is the structural schematic diagram of electronic equipment 100 provided by the embodiments of the present application, the electronic equipment
100 include image processing apparatus 110, memory 120 and processor 130, and the memory 120 is communicated with the processor 130
Connection is stored with executable instruction in the memory 120 to realize data interaction.Described image processing unit 110 includes extremely
Few one can be stored in the memory 120 or be solidificated in the electronic equipment in the form of software or firmware (firmware)
Software function module in 100 operating system (operating system, OS).The processor 130 is described for executing
The executable module stored in memory 120, such as software function module included by described image processing unit 110 and calculating
Machine program etc..
Optionally, in the present embodiment, the electronic equipment 100 further includes image acquisition units 140, and described image acquisition is single
Member 140 is separately connected with the memory 120, the processor 130.
Fig. 2 is referred to, Fig. 2 is the flow diagram one of image processing method provided in an embodiment of the present invention, described image
Processing method can be realized that the method includes the steps S110- step S150 by above-mentioned electronic equipment 100.Below to step S110-
Step S150 is described in detail.
Step S110 obtains image and deviating track to be processed.
In the present embodiment, the image to be processed is the image for needing to be processed into rear curtain synchronous effect, can be various figures
As the image of acquisition equipment acquisition, for example, the image that the prophase shoots such as video camera, mobile phone are good.Certainly, the image to be processed
It can be by the image of image capture device captured in real-time.
In the present embodiment, the deviating track is the rail of the shade of curtain synchronous effect after needing to generate in image to be processed
Mark.Wherein, deviating track can be set by the user.
For example, user can obtain deviating track set by user by touch screen-device etc..Specifically, it is touching
It is set with a region on screen as canvas area, then draws out deviating track in canvas area by user, obtains including inclined
Move the first image of track.In the present embodiment, deviating track can also be determined with function input by user etc..
Step S120, along the deviating track, to being located at the deviating track peripheral region on the image to be processed
Image carries out multiple migration processing, obtains several migrated images.
Specifically, it according to different offsets, calculates under the offset in the image of deviating track peripheral region, respectively
Pixel value of a pixel after deviating track offset, obtains migrated image, and the offset is the deviating track week
Enclose the overall offset distance in region.
That is, all being carried out using image of the offset to deviating track peripheral region for each offset
Once along the offset of deviating track.
Fig. 3 is referred to, optionally, described calculate is located in the image of deviating track peripheral region under the offset, each
The step of pixel value of the pixel after deviating track offset, acquisition migrated image includes step S1211- step S1214.
It is corresponding to calculate each pixel obtained in the image to be processed according to the deviating track by step S1211
Weight is deviated, the offset weight is the shift ratio of the pixel, closer to the offset of the pixel of the deviating track
Weight is bigger.
Deviating track is drawn below in conjunction with user, to explain the offset weight of each pixel on image to be processed in detail
Calculation method.
By taking the canvas area is consistent with the size of image to be processed as an example, due to the canvas area can with it is to be processed
The size of image is consistent, so the first image is consistent with the size of image to be processed, at this point, each pixel on painting canvas with to
It is corresponding with the pixel to be located at same a line, the pixel of same row on processing image.The deviating track that user is drawn is in painting canvas
On the position consistency of pixel passed through on image to be processed of the position of pixel passed through and deviating track.Wherein,
Deviating track includes multiple sub-trajectories, and each sub-trajectory is to be located along the same line on the deviating track and continuous part.
After obtaining the first image, triangle is carried out to the first image according to each sub-trajectory in the first image first
Subdivision.
In the present embodiment, for the ease of processing, it can convert the track in the first image to after obtaining the first image
Multiple vectors, then generate the first new image further according to the vector after conversion, and the size of the first new image can be old
First image zoomed in or out with certain proportion after size.It is zoomed in and out that is, carrying out can be for triangulation
The first image that treated newly.
Referring to figure 4., the method for triangulation is explained for two vertex by deviating track by the first image in detail.
Rectangle frame represents the edge of the first image in figure, and track, that is, deviating track in rectangle frame, deviating track is by rectangle frame
The vertex in the upper left corner and the vertex in the lower right corner, successively using each sub-trajectory of deviating track as the side of a triangle, respectively
A vertex by one in the vertex in the vertex in the lower left corner of the rectangle frame and the upper right corner as triangle carries out subdivision,
The subdivision result that the minimum unit in the first image after subdivision is triangle can so be obtained.For example, deviating track is each
A sub-trajectory is respectively T1, T2, T3, T4, T5, T6 and T7, and the vertex in the lower left corner is Q, and the vertex in the upper right corner is O, then, it carries out
After triangulation, T1, T2, T3, T4, T5, T6 and T7 respectively with Q constitute a triangle, T1, T2, T3, T4, T5, T6 and T7 with
O respectively constitutes a triangle.
In the present embodiment, each corresponding initial offset weight of the sub-trajectory, the initial offset weight is sub- rail
The original degrees of offset of mark.
After carrying out triangulation, then for each pixel, it is corresponding with the pixel described to calculate the pixel
Where first distance and the pixel between sub-trajectory on triangle, vertex and the sub- rail far from the sub-trajectory
The quotient of second distance between mark, obtain the pixel apart from weight, it is described apart from weight be the pixel by the mesh
Mark the influence degree of object.
Wherein, sub-trajectory corresponding with pixel is the sub-trajectory where the pixel in the side of triangle.
Weight is deviated described in finally according to described apart from weight and the initial offset weight computing.
Please continue to refer to Fig. 4, for example, pixel P is located in the triangle of sub-trajectory T4 and vertex O composition, pixel P with
First distance between sub-trajectory T4 is l1, and the second distance between point O and sub-trajectory T4 is l2, it is possible to be calculated
Pixel P apart from weight W=l1/l4.Obtain the pixel after weight, then can be according to the distance of the pixel
Its offset weight of weight computing.
The initial offset weight includes the first offset component and the second offset component, first offset component, described
Second offset component respectively represents degrees of offset of the pixel on preset first direction and preset second direction, institute
It states according to described apart from including: to calculate described the first the step of offset weight described in weight and the initial offset weight computing
The product of one offset component and the offset weight obtains third offset component;Then calculate second offset component with it is described
The product of offset weight obtains the 4th offset component;Finally obtained according to the third offset component and the 4th offset component
The offset weight, wherein the offset weight includes the 5th offset component and the 6th offset component.
For example, an initial offset weight (X, Y) can be set, wherein X represents the sub- rail for each sub-trajectory
Offset weight component of the mark in X direction, i.e. the first offset component, Y represent the sub-trajectory in the offset weight point of y direction
It measures, i.e. the second offset component, in the present embodiment, 1 can be set by the total amount of X and Y, that is to say, that X+Y=1.It is described initial
Deviating weight is the original degrees of offset of sub-trajectory, at this point, still by taking above-mentioned pixel P as an example, can be according to triangulation after
The first image calculate offset weight, i.e. (X, Y) * W.
When the first image for subdivision is consistent with the size of the image to be processed, then, the 5th offset component is
Equal to third offset component, the 6th offset component is equal to the 4th offset component.
When the size of the size of the first image for subdivision and image to be processed is inconsistent, in the present embodiment, in institute
Before stating the step of obtaining the offset weight according to the third offset component and the 4th offset component, can also will described in
The third offset component of each pixel and the 4th offset component constitute the second image in first image, in the present embodiment, second
Image can be stored in the form of .bin file.In this way, described according to the third offset component and the 4th offset component
When obtaining the offset weight, first second image can be zoomed in and out, obtained identical as the picture size to be processed
Third image, wherein each pixel of the third image includes the 5th offset component and the 6th offset component.
For example, when third offset component and the 4th offset component are constituted the second image, it can be corresponding by each pixel
Third offset component and the 4th offset component to should be used as pixel R, G, two channel values of R, G in channel B, will be another
The channel value of a channel B is set as 0.In this way, the second image can be obtained, after obtaining the second image, using existing figure
As Zoom method handles the second image, third image can be obtained in this way, and the R, G's, channel B in third image is logical
Road value is all calculated by R, G of each pixel in the second image, channel B and is obtained.That is, each picture in third image
The channel value in the channel R of vegetarian refreshments represents the 5th offset component, and the channel value in the channel G of each pixel in third image represents
6th offset component.
Please continue to refer to Fig. 3, step S1212, according to different offsets, the inclined of the offset and each pixel is calculated
Move the product of weight.
Optionally, before step S1212, the method also includes obtaining multiple and different offsets.
Optionally, it in the present embodiment, obtains multiple and different offsets and specifically includes, obtain preset offset first.
Then the product of the offset Yu default bias multiple is calculated, a new offset is obtained.New offset is being obtained every time
Afterwards, it all repeats and calculates the product of the offset and default bias multiple and repeatedly just obtain multiple and different offsets
Amount.In the present embodiment, the number for repeating above-mentioned steps can be pre-set.
For example, preset offset is w, default bias multiple is 1.02, pre-set time for computing repeatedly offset
Number is 3, then, obtained multiple offsets are respectively w, 1.02*w, 1.02^2*w, 1.02^3*w.
Step S1213 calculates the corresponding offset pixels point of each pixel in the image to be processed.
Specifically, it is calculated according to the product of the offset and the offset weight of each pixel each in the image to be processed
The corresponding offset pixels point of pixel.
The position of the pixel in said first direction is first position component, position in this second direction
Pixel value for second position component, after the offset weight computing offset according to the default bias amount and the pixel
The step of include: the third offset component and the 4th offset component for obtaining the pixel first;Then the described 5th is calculated partially
The product of component and the default bias amount is moved, the first Middle Component is obtained and calculates first Middle Component and the first position
The sum of component obtains the first offset coordinates;The product of the 6th offset component and the default bias amount is calculated, is obtained in second
Between component;The sum of first Middle Component and the first position component are calculated, the second offset coordinates are obtained;Obtain described
The pixel value of one offset coordinates and the second offset coordinates corresponding position, the pixel value after obtaining pixel offset.
For example, offset is w, the position of pixel P is (x, y), the pixel value P (x, y) of pixel P, the 5th offset point
Amount is px, the 6th offset component is py, then under the offset, the pixel value of pixel (x, y) are as follows:
Step S1214 obtains the pixel value of the corresponding offset pixels point of each pixel, obtains migrated image.
Fig. 5 is referred to, optionally, described calculate is located in the image of deviating track peripheral region under the offset, each
The step of pixel value of the pixel after deviating track offset, acquisition migrated image includes step S1221- step S1224.
Step S1221 obtains the offset weight with the deviating track distance for each pixel within the scope of pre-determined distance,
Wherein, the offset weight is the shift ratio of the pixel, closer to the offset weight of the pixel of the deviating track
It is bigger.
In the present embodiment, offset weight can be manually set.
Step S1222, according to different offsets, calculate the offset and each pixel offset weight it
Product.
Step S1223 calculates the corresponding offset pixels point of corresponding each pixel in the image to be processed.
Specifically, it is calculated according to the offset with the product of the offset weight of each pixel corresponding in the image to be processed
The corresponding offset pixels point of each pixel.
Step S1224 obtains the pixel value of the corresponding offset pixels point of each pixel, obtains migrated image.
About the detailed process of step S1222- step S1223, step S1212- step S1213 is please referred to, herein no longer
It repeats.
Please continue to refer to Fig. 2, step S130, image superposition is carried out several described migrated images, obtains superimposed image.
Optionally, step S130 is specially by the pixel in each width migrated image, at same row, the coordinate with a line
The pixel value of point is averaged, and obtains superimposed image.
For example, migrated image A, migrated image B and migrated image C are respectively migrated image corresponding to different offsets,
In migrated image A, the pixel value of each pixel is respectively Aij, in migrated image B, the pixel value of each pixel is respectively
Bij, in migrated image C, the pixel value of each pixel is respectively Cij, wherein the line number of the pixel in i representative image, j generation
The columns of pixel in table image, then, according to migrated image A, migrated image B and migrated image C the superimposed image D's calculated
The pixel value D of each pixelijFor Aij、BijWith CijBe averaged, in this way, superimposed image D can be obtained.
In this way, user's figure is overlapped and takes mean value after n offset, P ' (x, y) is position (x, y) in final mean value result figure
Pixel pixel value, its calculation formula is:
Wherein,For kth value of the migration result figure on pixel (x, y), n is deflection graph in superimposed image
The quantity of picture.
Step S140 obtains the image of target object from the image to be processed.
In the present embodiment, the method that the image of target object is obtained from image to be processed can use target identification side
Method identifies target object from image to be processed by the Model of Target Recognition of trained completion, thus according to identifying
Target object the image of the target object is obtained from image to be processed.
In the present embodiment, the image of target object can also be obtained by way of template, specifically, acquisition includes first
Then the template image of objects' contour obtains the object from the image to be processed further according to the template image
The image of body.Wherein, obtaining the template image including objects' contour can be obtained by following two mode:
First way directly smears masking-out by user manually.
The second way carries out image segmentation to obtained migration result figure, for example, can adopt when target object is people
With human body dividing method, to obtain template image.
The image of the target object is shown pair in the superimposed image according to the deviating track by step S150
Answer position.
In the present embodiment, can by way of image co-registration by superimposed image and image to be processed and template image into
Row fusion, for example, being merged using alpha, then the final result image obtained are as follows:
P1 (x, y)=P(x, y)*Alpha+P′(x, y)*(1-Alpha)
Wherein, P1 (x, y)For the pixel value for the pixel that position in final result image is (x, y), P(x, y)For figure to be processed
Position is the pixel value of the pixel of (x, y), P ' as in(x, y)For the pixel value for the pixel that position in superimposed image is (x, y).
Alpha is transparency, for example, the location transparency degree of the corresponding pixel of target object is 1, the pixel of other positions is corresponding
Transparency is 0.
It is optionally, described according to the offset in the present embodiment by taking obtained migration result figure carries out image segmentation as an example
The image of the target object is shown that the step of corresponding position in the superimposed image includes: to obtain the target by track
First position of the object in the image to be processed.Determine second corresponding with the first position in the superimposed image
It sets.The image of the target object is shown on the second position in superimposed image, so that the figure of the target object
Image position is in the deviating track end.
Wherein, the position one of position of the target object in the image to be processed and the end of the deviating track
It causes.
About the treatment effect of the present embodiment, Fig. 6, Fig. 7, Fig. 8 and Fig. 9 are please referred to, wherein Fig. 6 is image to be processed, figure
7 be the deviating track deviated to image to be processed, and Fig. 8 is the template image that user draws, by the image to be processed of Fig. 6,
After the deviating track of Fig. 7 and the template image of Fig. 8 are overlapped, obtained effect picture is as shown in figure 9, as seen from Figure 9, scheme
The clarity of character image as in is higher, and background is clearly present the blur effect along deviating track direction.
Referring to Figure 10, embodiments herein also provides a kind of image processing apparatus 110, and described device includes first obtaining
Modulus block 111, offset module 112, laminating module 113, second obtain module 114 and Fusion Module 115.Described image processing dress
The electronic equipment 100 can be stored in the memory 120 in the form of software or firmware or be solidificated in including one by setting 110
Operating system (operating system, OS) in software function module.
Specifically, described first module 111 is obtained, for obtaining image and deviating track to be processed.
The first acquisition module 111 in the present embodiment obtains module 111 about described first for executing step S110
Specifically describe the description that can refer to step S110.
Offset module 112, for being located at around the deviating track on the image to be processed along the deviating track
The image in region carries out multiple migration processing, obtains several migrated images.
Offset module 112 in the present embodiment is for executing step S120, the specific descriptions about the offset module 112
It can refer to the description of step S120.
Laminating module 113 obtains superimposed image for carrying out image superposition several described migrated images.
Laminating module 113 in the present embodiment is for executing step S130, the specific descriptions about the laminating module 113
It can refer to the description of step S130.
Second obtains module 114, for obtaining the image of target object from the image to be processed.
The second acquisition module 114 in the present embodiment obtains module 114 about described second for executing step S140
Specifically describe the description that can refer to step S140.
Fusion Module 115, for being shown the image of the target object in the stacking chart according to the deviating track
Corresponding position as in.
Fusion Module 115 in the present embodiment is for executing step S150, the specific descriptions about the Fusion Module 115
It can refer to the description of step S150.
To sum up, scheme provided by the present embodiment, by the way that image to be processed is carried out different degrees of offset along track,
The corresponding deflection graph of each degrees of offset is obtained, is finally merged each deflection graph, image to be processed and template image, most
The image similar to curtain shooting effect after single-lens reflex camera is obtained eventually.In this way, since the hardware such as the flash of light, the rear curtain that need not rely on single-lens reflex camera are set
It is standby, the image of curtain shooting effect after similar single-lens reflex camera can be also shot using common image capture device, to the technology of user
It is required that it is also relatively low, the image of curtain shooting effect after similar single-lens reflex camera can be shot being ignorant of the people of single-lens reflex camera equipment.
The above, the only various embodiments of the application, but the protection scope of the application is not limited thereto, it is any
Those familiar with the art within the technical scope of the present application, can easily think of the change or the replacement, and should all contain
Lid is within the scope of protection of this application.Therefore, the protection scope of the application is subject to the protection scope in claims.
Claims (10)
1. a kind of image processing method, which is characterized in that the described method includes:
Obtain image and deviating track to be processed;
Along the deviating track, the image that the deviating track peripheral region is located on the image to be processed is carried out repeatedly inclined
Shifting processing, obtains several migrated images;
Image superposition is carried out several described migrated images, obtains superimposed image;
The image of target object is obtained from the image to be processed;
The image of the target object is shown to the corresponding position in the superimposed image according to the deviating track.
2. the method according to claim 1, wherein described along the deviating track, to the image to be processed
Going up the step of image positioned at the deviating track peripheral region carries out multiple migration processing, obtains several migrated images includes:
According to different offsets, calculate under the offset in the image of deviating track peripheral region, each pixel edge
Pixel value after the deviating track offset, obtains migrated image, and the offset is the total of the deviating track peripheral region
Solid offsetting distance.
3. according to the method described in claim 2, it is characterized in that, being located at deviating track peripheral region under described calculating offset
In the image in domain, each pixel along the deviating track offset after pixel value, obtain migrated image the step of include:
According to the deviating track, the corresponding offset weight of each pixel obtained in the image to be processed is calculated, it is described
The shift ratio that weight is the pixel is deviated, the offset weight closer to the pixel of the deviating track is bigger;
According to different offsets, the product of the offset weight of the offset and each pixel is calculated;
It is corresponding with each pixel in the product of the offset weight of each pixel calculating image to be processed according to the offset
Offset pixels point;
The pixel value for obtaining the corresponding offset pixels point of each pixel, obtains migrated image.
4. according to the method described in claim 2, it is characterized in that, being located at deviating track peripheral region under described calculating offset
In the image in domain, each pixel along the deviating track offset after pixel value, obtain migrated image the step of include:
Obtain the offset weight with the deviating track distance for each pixel within the scope of pre-determined distance, wherein described inclined
The shift ratio that weight is the pixel is moved, the offset weight closer to the pixel of the deviating track is bigger;
According to different offsets, the product of the offset weight of the offset and each pixel is calculated;
It is corresponding with each pixel in the product of the offset weight of each pixel calculating image to be processed according to the offset
Offset pixels point;
The pixel value for obtaining the corresponding offset pixels point of each pixel, obtains migrated image.
5. method according to claim 1-4, which is characterized in that it is described obtain target object image the step of
Include:
Obtain the template image including objects' contour;
The image of the target object is obtained from the image to be processed according to the template image.
6. method according to claim 1-4, which is characterized in that described to carry out figure several described migrated images
As the step of being superimposed, obtaining superimposed image includes:
By in each width migrated image, the pixel value of the pixel at same row, the coordinate with a line is averaged, and is superimposed
Image.
7. method according to claim 1-4, which is characterized in that the method also includes:
Obtain preset offset;
The product for calculating the offset Yu default bias multiple obtains new offset.
8. method according to claim 1-4, which is characterized in that it is described according to the deviating track by the mesh
Mark object image be shown in the superimposed image corresponding position the step of include:
Obtain first position of the target object in the image to be processed;
Determine the second position corresponding with the first position in the superimposed image;
The image of the target object is shown on the second position in superimposed image, so that the figure of the target object
Image position is in the deviating track end;
Wherein, the position consistency of position of the target object in the image to be processed and the end of the deviating track.
9. a kind of image processing apparatus, which is characterized in that described device includes:
First obtains module, for obtaining image and deviating track to be processed;
Offset module, along the deviating track, to the image for being located at the deviating track peripheral region on the image to be processed
Multiple migration processing is carried out, several migrated images are obtained;
Laminating module obtains superimposed image for carrying out image superposition several described migrated images;
Second obtains module, for obtaining the image of target object from the image to be processed;
Fusion Module, for the image of the target object to be shown to pair in the superimposed image according to the deviating track
Answer position.
10. a kind of electronic equipment, which is characterized in that the electronic equipment includes image acquisition units, memory and processor, institute
Show that image acquisition units communicate to connect respectively with the memory, the processor, the memory and the processor communication
It connects, is stored with executable instruction in the memory, the processor realizes such as right when executing the executable instruction
It is required that the described in any item methods of 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910621104.7A CN110324534B (en) | 2019-07-10 | 2019-07-10 | Image processing method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910621104.7A CN110324534B (en) | 2019-07-10 | 2019-07-10 | Image processing method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110324534A true CN110324534A (en) | 2019-10-11 |
CN110324534B CN110324534B (en) | 2021-08-20 |
Family
ID=68123169
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910621104.7A Active CN110324534B (en) | 2019-07-10 | 2019-07-10 | Image processing method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110324534B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111145309A (en) * | 2019-12-18 | 2020-05-12 | 万翼科技有限公司 | Image superposition method and related equipment |
CN112541867A (en) * | 2020-12-04 | 2021-03-23 | Oppo(重庆)智能科技有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
CN112672056A (en) * | 2020-12-25 | 2021-04-16 | 维沃移动通信有限公司 | Image processing method and device |
CN113923368A (en) * | 2021-11-25 | 2022-01-11 | 维沃移动通信有限公司 | Shooting method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102811352A (en) * | 2011-06-03 | 2012-12-05 | 卡西欧计算机株式会社 | Moving image generating method and moving image generating apparatus |
CN103049922A (en) * | 2012-12-05 | 2013-04-17 | 深圳深讯和科技有限公司 | Method and device for generating tilt-shift special-effect image |
CN104159033A (en) * | 2014-08-21 | 2014-11-19 | 深圳市中兴移动通信有限公司 | Method and device of optimizing shooting effect |
US20150237269A1 (en) * | 2014-02-20 | 2015-08-20 | Google Inc. | Methods and Systems for Adjusting Sensor Viewpoint to a Virtual Viewpoint |
-
2019
- 2019-07-10 CN CN201910621104.7A patent/CN110324534B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102811352A (en) * | 2011-06-03 | 2012-12-05 | 卡西欧计算机株式会社 | Moving image generating method and moving image generating apparatus |
CN103049922A (en) * | 2012-12-05 | 2013-04-17 | 深圳深讯和科技有限公司 | Method and device for generating tilt-shift special-effect image |
US20150237269A1 (en) * | 2014-02-20 | 2015-08-20 | Google Inc. | Methods and Systems for Adjusting Sensor Viewpoint to a Virtual Viewpoint |
CN104159033A (en) * | 2014-08-21 | 2014-11-19 | 深圳市中兴移动通信有限公司 | Method and device of optimizing shooting effect |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111145309A (en) * | 2019-12-18 | 2020-05-12 | 万翼科技有限公司 | Image superposition method and related equipment |
CN112541867A (en) * | 2020-12-04 | 2021-03-23 | Oppo(重庆)智能科技有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
CN112672056A (en) * | 2020-12-25 | 2021-04-16 | 维沃移动通信有限公司 | Image processing method and device |
CN113923368A (en) * | 2021-11-25 | 2022-01-11 | 维沃移动通信有限公司 | Shooting method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110324534B (en) | 2021-08-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110324534A (en) | Image processing method, device and electronic equipment | |
Liu et al. | Robust keyframe-based monocular SLAM for augmented reality | |
US10477005B2 (en) | Portable electronic devices with integrated image/video compositing | |
CN110012209A (en) | Panorama image generation method, device, storage medium and electronic equipment | |
CN104717427B (en) | A kind of automatic zooming method, device and mobile terminal | |
CN105718887A (en) | Shooting method and shooting system capable of realizing dynamic capturing of human faces based on mobile terminal | |
CN100527165C (en) | Real time object identification method taking dynamic projection as background | |
CN106996777B (en) | A kind of vision navigation method based on ground image texture | |
WO2016141543A1 (en) | System and method for adaptive panoramic image generation | |
CN110035218B (en) | Image processing method, image processing device and photographing equipment | |
CN105374019A (en) | A multi-depth image fusion method and device | |
CN106851122A (en) | The scaling method and device of the auto exposure parameter based on dual camera system | |
CN106934777A (en) | Scan image acquisition methods and device | |
EP1292877A1 (en) | Apparatus and method for indicating a target by image processing without three-dimensional modeling | |
CN109828681A (en) | Laser pen light stream trace tracking method, projection device and computer readable storage medium | |
CN106454061B (en) | Electronic device and image processing method | |
CN106444846A (en) | Unmanned aerial vehicle and method and device for positioning and controlling mobile terminal | |
CN105898107A (en) | Target object snapping method and system | |
CN110084765A (en) | A kind of image processing method, image processing apparatus and terminal device | |
CN107205141A (en) | A kind of method for controlling projection and projector equipment | |
CN113329172A (en) | Shooting method and device and electronic equipment | |
CN112085013A (en) | Tooth image acquisition device and image processing method | |
TW201608323A (en) | The electric device having a photographing function and the photographing method thereof | |
CN106023074A (en) | Splicing method for video images from different areas | |
Cuevas et al. | Statistical moving object detection for mobile devices with camera |
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 |