CN109493281A - Image processing method, device, electronic equipment and computer readable storage medium - Google Patents
Image processing method, device, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN109493281A CN109493281A CN201811309942.2A CN201811309942A CN109493281A CN 109493281 A CN109493281 A CN 109493281A CN 201811309942 A CN201811309942 A CN 201811309942A CN 109493281 A CN109493281 A CN 109493281A
- Authority
- CN
- China
- Prior art keywords
- image
- pixel
- pixel value
- overlapping region
- overlapping
- 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.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 21
- 238000012545 processing Methods 0.000 claims abstract description 112
- 238000000034 method Methods 0.000 claims abstract description 28
- 238000004590 computer program Methods 0.000 claims description 14
- 238000004422 calculation algorithm Methods 0.000 abstract description 35
- 238000010586 diagram Methods 0.000 description 11
- 230000000694 effects Effects 0.000 description 6
- 230000004927 fusion Effects 0.000 description 6
- 229910052754 neon Inorganic materials 0.000 description 4
- GKAOGPIIYCISHV-UHFFFAOYSA-N neon atom Chemical compound [Ne] GKAOGPIIYCISHV-UHFFFAOYSA-N 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 1
- 241000209140 Triticum Species 0.000 description 1
- 235000021307 Triticum Nutrition 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4007—Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4038—Image mosaicing, e.g. composing plane images from plane sub-images
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The present invention provides a kind of image processing method, device, electronic equipment and computer readable storage mediums, are related to technical field of image processing, this method comprises: obtaining target image to be processed;It is multiple images block by target image cutting according to the size of target image and preset picture size;Multiple images block jointly comprises all information of target image;Image procossing is carried out to multiple images block respectively, obtains multiple treated image blocks;Treated that image block splices by multiple, the target image that obtains that treated.The present invention can make to be only applicable to the image that fixed-size image processing algorithm can be flexibly applied to sizes.
Description
Technical field
The present invention relates to technical field of image processing, more particularly, to a kind of image processing method, device, electronic equipment and
Computer readable storage medium.
Background technique
With the development of computer science, diversified image processing algorithm is suggested, so that image after processing can
Enough reach required effect.However, many image processing algorithms are only due to the limitation of many factors such as algorithm design, hardware condition
A certain fixed-size image can be handled, can not adaptively be applied to various sizes of image.Such case one
Aspect limits the size of image to be processed, on the other hand also makes troubles to user, such as, user is large-sized in order to handle
Entire image may also need to expend time energy and go designed image Processing Algorithm again.
Summary of the invention
It can in view of this, the purpose of the present invention is to provide a kind of image processing method, device, electronic equipment and computers
Storage medium is read, can make to be only applicable to the image that fixed-size image processing algorithm can be flexibly applied to sizes.
To achieve the goals above, technical solution used in the embodiment of the present invention is as follows:
In a first aspect, the embodiment of the invention provides a kind of image processing methods, comprising: obtain target figure to be processed
Picture;It is multiple images block by the target image cutting according to the size of the target image and preset picture size;It is more
A described image block jointly comprises all information of the target image;Multiple described image blocks are carried out at image respectively
Reason obtains multiple treated image blocks;By it is multiple it is described treated that image block splices, the target figure that obtains that treated
Picture.
Further, the size and preset picture size according to the target image, the target image is cut
The step of being divided into multiple images block, comprising: obtain default overlapping widths and default stack height;According to the width of the target image
Degree and height, preset picture traverse and picture altitude and the default overlapping widths and the default stack height, by institute
Stating the uniform cutting of target image is multiple images block;Wherein, two adjacent described image blocks have overlapping region, and left and right phase
The width of the overlapping region of two adjacent described image blocks is not less than the default overlapping widths, two neighbouring figures
As the height of the overlapping region of block is not less than the default stack height.
Further, it is described by it is multiple it is described treated that image block splices, the step for the target image that obtains that treated
Suddenly, comprising: treated described in acquisition is each, and image block corresponds to the position in the target image;Based on each processing
The corresponding position in the target image of rear image block, to it is multiple it is described treated that image block splices, obtain just
Beginning stitching image;Interpolation processing is carried out to the overlapping region of treated described in initial stitching image image block, it will be right
Each overlapping region carries out the target image that is determined as that treated of the initial stitching image after interpolation processing.
Further, the overlapping region to treated described in initial stitching image image block carries out at interpolation
The step of reason, comprising: overlapping region that image block has is determined as by treated described in the initial stitching image two
First overlapping region;By treated described in the initial stitching image four, overlapping region that image block has is determined as
Two overlapping regions;Linear interpolation processing is carried out to the pixel of first overlapping region, to the pixel of second overlapping region
Carry out bilinear interpolation processing.
Further, the step of pixel to first overlapping region carries out linear interpolation processing, comprising: in batches from
Multiple pixels are chosen in first overlapping region, and the multiple pixels chosen to every batch of are performed both by following operation: based on selection
The pixel position, corresponding first image of the pixel of selection is searched from the linear interpolation weight table pre-established
Weight and the second image weights;Record has the corresponding relationship of location of pixels and image weights in the linear interpolation weight table;Institute
State the weight of weight that image weights include the first image where pixel and the second image where pixel;By selection
The pixel value and the first image multiplied by weight of the pixel, obtain the first pixel value, by the pixel of the pixel of selection
Value is multiplied with second image weights, obtains the second pixel value;First pixel value is added with second pixel value,
Pixel value after obtaining linear interpolation processing based on addition result.
Further, described the step of choosing multiple pixels from first overlapping region in batches, comprising: if described
The overlapping widths of one overlapping region are equal to the default overlapping widths or the stack height of first overlapping region is equal to institute
Default stack height is stated, then chooses multiple pixels from all pixels of first overlapping region in batches;If described first
The overlapping widths of overlapping region are greater than the stack height of the default overlapping widths or first overlapping region greater than described
Default stack height, then choose regional area from first overlapping region, in batches from all pixels of the regional area
Multiple pixels are chosen in value;Wherein, the overlapping widths of the regional area are equal to the default overlapping widths or the target
The stack height of overlapping region is equal to the default stack height.
Further, described to be added first pixel value with second pixel value, it is obtained linearly based on addition result
The step of pixel value after interpolation processing, comprising: first pixel value is added with second pixel value, obtains being added knot
Fruit;Judge whether the image weights in the linear interpolation weight table are greater than 1;If not, the addition result is directly determined
For the pixel value after linear interpolation processing;If so, the addition result is normalized, after normalized
Addition result is determined as the pixel value after linear interpolation processing.
Further, the step of pixel to second overlapping region carries out bilinear interpolation processing, comprising: in batches
Multiple pixels are chosen from second overlapping region, and the multiple pixel values chosen to every batch of perform the following operations: based on choosing
The pixel corresponding first of selection is searched in the position of the pixel taken from the bilinear interpolation weight table pre-established
Image weights, the second image weights, third image weights and the 4th image weights;Recording in the bilinear interpolation weight table has
The corresponding relationship of location of pixels and image weights;Described image weight includes the weight of the first image where pixel, pixel institute
The weight of the second image, the weight of the 4th image where the weight and pixel of third image where pixel;It will choosing
The pixel value and the first image multiplied by weight of the pixel taken, obtain the first pixel value, by the pixel of selection
Pixel value is multiplied with second image weights, obtains the second pixel value, by the pixel value of the pixel of selection and described the
Three image weights are multiplied, and obtain third pixel value, the pixel value of the pixel of selection is multiplied with the 4th image weights,
Obtain the 4th pixel value;By first pixel value, second pixel value, the third pixel value and the 4th pixel value
It is added, obtains bilinear interpolation treated pixel value.
Further, described the step of choosing multiple pixels from second overlapping region in batches, comprising: if described
The overlapping widths of two overlapping regions are equal to the default overlapping widths, and the stack height of second overlapping region is equal to described
Default stack height, then choose multiple pixels from all pixels of second overlapping region in batches;If second weight
The overlapping widths in folded region are greater than the stack height of the default overlapping widths or second overlapping region greater than described pre-
If stack height, regional area is chosen from second overlapping region, is selected from all pixels of the regional area in batches
Take multiple pixels;Wherein, the overlapping widths of the regional area are equal to the default overlapping widths, and the target overlapping region
Stack height be equal to the default stack height.
Further, described by first pixel value, second pixel value, the third pixel value and the 4th picture
The step of element value is added, and obtains bilinear interpolation treated pixel value, comprising: by first pixel value, second picture
Element value, the third pixel value are added with the 4th pixel value, obtain addition result;Judge the bilinear interpolation weight table
In image weights whether be greater than 1;If not, the addition result is determined directly as bilinear interpolation treated pixel;
If so, the addition result is normalized, the addition result after normalized is determined as bilinear interpolation
Treated pixel value.
Second aspect, the embodiment of the present invention also provide a kind of image processing apparatus, comprising: obtain module, for obtain to
The target image of processing;Cutting module, for the size and preset picture size according to the target image, by the mesh
Logo image cutting is multiple images block;Multiple described image blocks jointly comprise all information of the target image;Handle mould
Block obtains multiple treated image blocks for carrying out image procossing respectively to multiple described image blocks;Splicing module is used for
By it is multiple it is described treated that image block splices, the target image that obtains that treated.
The third aspect, the embodiment of the invention provides a kind of electronic equipment, the equipment includes processor and storage device;
Computer program is stored on the storage device, the computer program executes such as first party when being run by the processor
The described in any item methods in face.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage medium, the computer-readable storage
Computer program is stored on medium, the computer program is executed when being run by processor described in above-mentioned any one of first aspect
Method the step of.
The embodiment of the invention provides a kind of image processing method, device, electronic equipment and computer readable storage medium,
It can be multiple images block by target image cutting, then to each according to the size and preset picture size of target image
Image block is respectively processed, and then by multiple treated image block is spliced to form treated target images.This mode
It can be the accessible tile size of multiple images Processing Algorithm by entire image cutting, after being handled respectively each image block again
The entire image that is spliced to form that treated, this mode answer the Processing Algorithm for being only applicable to fixed picture size can also flexibly
For the image of sizes, also user is made to handle large-size images more conveniently.
Other feature and advantage of the embodiment of the present invention will illustrate in the following description, alternatively, Partial Feature and excellent
Point can deduce from specification or unambiguously determine, or the above-mentioned technology by implementing the embodiment of the present invention can obtain
Know.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate
Appended attached drawing, is described in detail below.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art
Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below
Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor
It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 shows the structural schematic diagram of a kind of electronic equipment provided by the embodiment of the present invention;
Fig. 2 shows a kind of image processing method flow charts provided by the embodiment of the present invention;
Fig. 3 shows a kind of image cutting schematic diagram provided by the embodiment of the present invention;
Fig. 4 (a) shows the adjacent schematic diagram in left and right of two image blocks of one kind provided by the embodiment of the present invention;
Fig. 4 (b) shows the neighbouring schematic diagram of two image blocks of one kind provided by the embodiment of the present invention;
Fig. 4 (c) shows the adjacent schematic diagram of four image blocks of one kind provided by the embodiment of the present invention;
Fig. 5 (a) shows the adjacent schematic diagram in left and right of two image blocks of one kind provided by the embodiment of the present invention;
Fig. 5 (b) shows the adjacent schematic diagram of four image blocks of one kind provided by the embodiment of the present invention;
Fig. 6 shows a kind of structural block diagram of image processing apparatus provided by the embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention
Technical solution be clearly and completely described, it is clear that described embodiments are some of the embodiments of the present invention, rather than
Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Under every other embodiment obtained, shall fall within the protection scope of the present invention.
In view of many image processing algorithms are merely able to handle a certain fixed-size image in the prior art, nothing
Method is applied to the problem of various sizes of image, a kind of image processing method provided in an embodiment of the present invention, device, electronic equipment
And computer readable storage medium, it describes in detail below to the embodiment of the present invention.
Embodiment one:
Firstly, a kind of image processing method, device, the electronics to describe for realizing the embodiment of the present invention are set referring to Fig.1
Standby and computer readable storage medium exemplary electronic device 100.
The structural schematic diagram of a kind of electronic equipment as shown in Figure 1, electronic equipment 100 include one or more processors
102, one or more storage devices 104, input unit 106, output device 108 and image collecting device 110, these components
It is interconnected by bindiny mechanism's (not shown) of bus system 112 and/or other forms.It should be noted that electronic equipment shown in FIG. 1
100 component and structure be it is illustrative, and not restrictive, as needed, the electronic equipment also can have other
Component and structure.
The processor 102 can use digital signal processor (DSP), field programmable gate array (FPGA), can compile
At least one of journey logic array (PLA) example, in hardware realizes that the processor 102 can be central processing unit
(CPU) or one or more of the processing unit of other forms with data-handling capacity and/or instruction execution capability
Combination, and can control other components in the electronic equipment 100 to execute desired function.
The storage device 104 may include one or more computer program products, and the computer program product can
To include various forms of computer readable storage mediums, such as volatile memory and/or nonvolatile memory.It is described easy
The property lost memory for example may include random access memory (RAM) and/or cache memory (cache) etc..It is described non-
Volatile memory for example may include read-only memory (ROM), hard disk, flash memory etc..In the computer readable storage medium
On can store one or more computer program instructions, processor 102 can run described program instruction, to realize hereafter institute
The client functionality (realized by processor) in the embodiment of the present invention stated and/or other desired functions.In the meter
Can also store various application programs and various data in calculation machine readable storage medium storing program for executing, for example, the application program use and/or
The various data etc. generated.
The input unit 106 can be the device that user is used to input instruction, and may include keyboard, mouse, wheat
One or more of gram wind and touch screen etc..
The output device 108 can export various information (for example, image or sound) to external (for example, user), and
It and may include one or more of display, loudspeaker etc..
Described image acquisition device 110 can shoot the desired image of user (such as photo, video etc.), and will be clapped
The image taken the photograph is stored in the storage device 104 for the use of other components.
Illustratively, for realizing image processing method according to an embodiment of the present invention, device, electronic equipment and computer
The exemplary electronic device of readable storage medium storing program for executing may be implemented as the intelligent terminals such as smart phone, tablet computer, computer,
In the specific implementation, which can also be that ARM CPU platform or GPU etc. itself have SIMD (Single
Instruction, Multiple Data, single instrction, most evidence) characteristic equipment.
Embodiment two:
A kind of image processing method is present embodiments provided, this method can be executed by above-mentioned electronic equipment, shown in Figure 2
A kind of image processing method flow chart, this method comprises the following steps:
Step S202 obtains target image to be processed.Wherein, target image to be processed can according to need and voluntarily
Setting.
Target image cutting is multiple figures according to the size of target image and preset picture size by step S204
As block;Multiple images block jointly comprises all information of target image.It is also understood that the multiple images block of cutting covers
The entire area of target image.Wherein, the size of image block is related to preset picture size, and such as, the size of image block can
To be equal to preset picture size.It is understood that the accessible picture size of different image processing algorithms is different,
Therefore the preset picture size referred in the present embodiment is related to the image processing algorithm for needing to use target image,
That is, preset picture size depends primarily on the image processing algorithm for needing to use to target image, such as, preset image ruler
Very little can be the accessible picture size of image processing algorithm to be employed.Wherein, image processing algorithm to be employed can root
It is preset according to demand, the Processing Algorithm in arbitrary image process field, such as Image denoising algorithm, image specifically can be used
Affine transformation etc., is not limited herein.
Typically, the size of target image to be processed is larger, and due to many factors such as algorithm design, hardware conditions
Limitation, the accessible picture size of image processing algorithm is limited, and impotentia directly handles larger-size target image, is based on
This, target image cutting is the accessible small-sized image block of image processing algorithm by the present embodiment, in order to image procossing calculation
Method can directly be handled the image block of small size.It in the specific implementation, can be multiple by the uniform cutting of target image
Image block, the width and height of image block may be the same or different, be not limited herein.
Step S206 carries out image procossing to multiple images block respectively, obtains multiple treated image blocks.Wherein, scheme
As processing mode depend on image processing algorithm, and image processing algorithm can be it is according to demand and preset.
Step S208, treated that image block splices by multiple, the target image that obtains that treated.
Multiple treated image blocks are arranged according to the position before cutting, are spliced to form entire image.Due to spelling
Each image block in entire image after connecing be by image procossing, therefore the entire image being spliced to form i.e. it is believed that
It is through image processing algorithm treated target image.
Above-mentioned image processing method provided in an embodiment of the present invention, being capable of size according to target image and preset image
Target image cutting is multiple images block, is then respectively processed to each image block, and then will be after multiple processing by size
The image block target image that is spliced to form that treated.Entire image cutting can be multiple images Processing Algorithm by this mode
Accessible tile size, the entire image that is spliced to form that treated after being handled respectively each image block again, this mode make
The Processing Algorithm for being only applicable to fixed picture size can also be flexibly applied to the image of sizes, also make user more convenient
Ground handles large-size images.
In view of treated image block in splicing it is possible that splicing trace, in order to obtain effect more
Good treated target image, the present embodiment is in the size and preset picture size according to target image, by target figure
When picture cutting is multiple images block, it can make adjacent image block that there is overlapping region, when to splice that adjacent image block again,
Alleviate splicing trace by the fusion of overlapping region, so that splicing trace will not be shown on the target image that makes that treated.
Based on this, in cutting target image, a kind of image cutting schematic diagram as shown in connection with fig. 3 specifically can refer to following steps: first
Default overlapping widths o1 and default stack height o2 is first obtained, then according to the width W of target image and height H, preset figure
Image width degree w and picture altitude h and default overlapping widths o1 and default stack height o2, is more by the uniform cutting of target image
A image block.Wherein, two adjacent image blocks have an overlapping region, and the overlapping region of adjacent two image blocks in left and right
Width is not less than default overlapping widths, and the height of the overlapping region of two neighbouring image blocks is high not less than default overlapping
Degree.Overlapping region size between different image blocks may be the same or different, such as, image block 1 and image block 2 it
Between the area of overlapping region be less than the area of overlapping region between image block 3 and image block 4.Wherein, due to adjacent two
There is overlapping region between a graph block, in order to clearly illustrate the boundary between graph block in Fig. 3, horizontal different images block is each
From boundary fineness it is different, and simply illustrate that by a whole picture target image cutting be 12 image blocks, adjacent image block
Between have overlapping region.
In the specific implementation, presetting overlapping widths o1 and default stack height o2 may be the same or different.Default weight
The value of folded width o1 and default stack height o2 mainly first passes through experiment adjustment in advance and determines and obtain.Such as, one is first preset
A initial overlapping widths o1 ' and initial stack height o2 ' is then based on the initial overlapping widths o1 ' and initial stack height o2 '
Above-mentioned image processing method, the target image after obtaining final process are executed, if shown on treated target image multiple
Have between image block and more significantly splice trace, then initial overlapping widths o1 ' and initial stack height o2 ' is adjusted
It is whole, such as, the value of initial overlapping widths o1 ' and initial stack height o2 ' are further increased, is then held again based on value adjusted
The above-mentioned image processing method of row, adjusts repeatedly, until finally obtained, treated that target image does not splice significantly
Until trace, by this time overlapping widths and stack height be determined as last preset o1 and o2 value.
In order to simplify processing, to further speed up processing speed, default overlapping widths o1 and default overlapping can also be set
Height o2 is all the same, is o.
On the basis of adjacent image block has overlapping region, treated that image block splices by multiple, obtains everywhere
The step of target image after reason, is referred to following steps execution:
(1) each treated corresponding position in the target image of image block is obtained.Such as, it is shown in Fig. 3 each
The corresponding number of image block, can record number and its position on former target image of each image block before cutting.Such as
For fruit describes image block according to ranks, then the image block (may be simply referred to as image block 1) that number is 1 is located in former target image
The first row first row.
(2) based on the corresponding position in the target image of each treated image block, to multiple treated image blocks
Spliced, obtains initial stitching image.It is understood that image block adjacent in splicing will appear overlapping region.
(3) interpolation processing is carried out to the overlapping region of treated in initial stitching image image block, it will be to each overlay region
Domain carries out the target image that is determined as that treated of the initial stitching image after interpolation processing.By splicing the stage to image block
Overlapping region carries out interpolation mixing, can slow down the splicing trace even being eliminated between two adjacent image blocks.When it is implemented,
Linear difference algorithm can be used, naturally it is also possible to realize using other interpolation algorithms such as cubic interpolation algorithm.
In a kind of specific embodiment, the overlapping region of treated in initial stitching image image block is carried out slotting
When value processing, it is referred to following steps:
Firstly, treated that overlapping region that image block has is determined as the first overlay region by two in initial stitching image
Domain;By four in initial stitching image, treated that overlapping region that image block has is determined as the second overlapping region.For convenient for
Understand, the first overlapping region includes the overlapping region (grey area between two or so the adjacent image blocks illustrated in Fig. 4 (a)
Domain) and Fig. 4 (b) in illustrate two neighbouring image blocks between overlapping region (gray area).And the second overlapping
Region may refer to the overlapping region (gray area) that four image blocks shown in Fig. 4 (c) can have.
Then, linear interpolation processing is carried out to the pixel of the first overlapping region, the pixel of the second overlapping region is carried out double
Linear interpolation processing.
Since the first overlapping region is the overlapping region between two image blocks, and the second overlapping region is four image blocks
Between overlapping region, therefore to the pixel of the first overlapping region carry out linear interpolation processing, to the pixel of the second overlapping region
Carry out bilinear interpolation processing.For ease of understanding, the present embodiment, which is furthermore presented, carries out line to the pixel of the first overlapping region
Property interpolation processing, and the specific embodiment of bilinear interpolation processing is carried out to the pixel of the second overlapping region:
(1) linear interpolation processing is carried out to the pixel of the first overlapping region
Firstly, multiple pixels are chosen from the first overlapping region in batches.
Specifically, if the overlapping widths of the first overlapping region are equal to default overlapping widths or the first overlapping region
Stack height be equal to default stack height, then multiple pixels are chosen from all pixels of the first overlapping region in batches, namely
To selected pixels in entire first overlapping region.K pixel is such as disposably chosen from the first overlapping region, is chosen altogether more
It is secondary, until all pixels in the first overlapping region have it is selected get, to ensure that the pixel in the first overlapping region can be into
Row linear interpolation processing.It is this disposably choose multiple pixels by way of, disposable only choose one compared to conventional
For pixel is handled, it can effectively accelerate the pixel interpolation processing speed of overlapping region.
If the overlapping widths of the first overlapping region are greater than the stack height of default overlapping widths or the first overlapping region
Greater than default stack height, then regional area is chosen from the first overlapping region, in batches from all pixels value of regional area
Choose multiple pixels;Wherein, the overlapping widths of regional area are equal to default overlapping widths or the overlapping of target overlapping region is high
Degree is equal to default stack height.In this case, the overlapping area of the first overlapping region is larger, greater than specified overlapping dimension,
In view of two adjacent image blocks are generally only to occur splicing trace because of edge pixel, only needing (can to edge pixel
Determined based on pre-set overlapping region size) it is handled, when the size in overlapping region is larger, in order to promote linear insert
Specified overlapping ruler can only be chosen without handling entire overlapping region from the first overlapping region by being worth treatment effeciency
Very little region carries out interpolation processing.For ease of understanding, reference can be made to Fig. 5 (a), by taking image block 3 and image block 4 as an example, wherein
Regional area is had chosen on overlapping region (using grey as background) between image block 3 and image block 4 (using oblique line item as filling
Signal), it is only necessary to the pixel in localized region carries out interpolation.
Secondly, to every batch of choose multiple pixels be performed both by operations described below (referring to step 1~step 3):
Step 1, the pixel of selection is searched in the position of the pixel based on selection from the linear interpolation weight table pre-established
Corresponding first image weights and the second image weights;Record has pair of location of pixels and image weights in linear interpolation weight table
It should be related to;Image weights include the weight of the weight of the first image where pixel and the second image where pixel.Its
In, pixel of the pixel of selection in the overlapping region between the first image and the second image can will specifically have overlay region
One of two images in domain are used as the first image, another image is as the second image.Such as, by taking Fig. 4 (a) as an example, the first figure
As can be image block 1, the second image can be image block 2.By taking image 4 (b) as an example, the first image can be image block 1, the
Two images can be image block 5.By pre-establishing linear interpolation weight table, the corresponding power of pixel can be searched directly from table
Weight, can also further promote interpolation processing speed.
Step 2, the pixel value of the pixel of selection is multiplied with the first image weights, obtains the first pixel value, by selection
The pixel value of pixel is multiplied with the second image weights, obtains the second pixel value.
Step 3, the first pixel value and the second pixel value are added, the picture after linear interpolation processing is obtained based on addition result
Element value.
Specifically, the first pixel value and the second pixel value are added, addition result is obtained;Then judge that linear interpolation is weighed
Whether the image weights in weight table are greater than 1;If not, will add up the pixel value that result is determined directly as after linear interpolation processing;
If so, addition result is normalized, after the addition result after normalized is determined as linear interpolation processing
Pixel value.It wherein, is that will add up result compared with default value to the concrete mode that addition result is normalized,
Obtain the pixel coverage in original target image.
It is understood that the weight in linear interpolation weight table may be then shown as without normalized greater than 1
Value, then need to will add up result and be normalized, and if the weight in linear interpolation weight table first passes through normalizing in advance
Change processing, then be shown as the value less than 1, therefore addition result no longer needs to be normalized.Wherein, at the normalization of weight
Reason mode are as follows: weight is compared with setting numerical value, to obtain the numerical value less than 1.
(2) bilinear interpolation processing is carried out to the pixel of the second overlapping region
Firstly, multiple pixels are chosen from the second overlapping region in batches.
Specifically, if the overlapping widths of the second overlapping region are equal to default overlapping widths, and the second overlapping region
Stack height is equal to default stack height, then chooses multiple pixels from all pixels of the second overlapping region in batches;Namely it is right
Selected pixels in entire second overlapping region.
If the overlapping widths of the second overlapping region are greater than the stack height of default overlapping widths or the second overlapping region
Greater than default stack height, regional area is chosen from the second overlapping region, is chosen from all pixels of regional area in batches
Multiple pixels;Wherein, the overlapping widths of regional area are equal to default overlapping widths, and the stack height of target overlapping region is equal to
Default stack height.In this case, the overlapping area of the second overlapping region is larger, greater than specified overlapping dimension, in order to mention
Bilinear interpolation treatment effeciency is risen, can only be carried out from interpolation from the region for choosing specified overlapping dimension in the second overlapping region
Reason.Can be found in Fig. 5 (b), by taking image block 3, image block 4, image block 7 and image block 8 as an example, wherein four image blocks it
Between overlapping region (using grey as background) on have chosen regional area (using oblique line item as filling illustrate), it is only necessary to partial zones
Pixel in domain carries out interpolation.
Secondly, to every batch of choose multiple pixel values execute operations described below (referring to step 1~step 3):
Step 1, the picture of selection is searched in the position of the pixel based on selection from the bilinear interpolation weight table pre-established
Corresponding first image weights of element, the second image weights, third image weights and the 4th image weights;Bilinear interpolation weight table
Middle record has the corresponding relationship of location of pixels and image weights;Image weights include the first image where pixel weight, as
The weight of third image where the weight of the second image where plain, pixel and the weight of the 4th image where pixel;
Step 2, the pixel value of the pixel of selection is multiplied with the first image weights, obtains the first pixel value, by selection
The pixel value of pixel is multiplied with the second image weights, obtains the second pixel value, by the pixel value of the pixel of selection and third image
Multiplied by weight obtains third pixel value, and the pixel value of the pixel of selection is multiplied with the 4th image weights, obtains the 4th pixel
Value;
Step 3, the first pixel value, the second pixel value, third pixel value and the 4th pixel value are added, obtain bilinearity and inserts
Value treated pixel value.
Specifically, the first pixel value, the second pixel value, third pixel value and the 4th pixel value are added, it is added
As a result;Judge whether the image weights in bilinear interpolation weight table are greater than 1;If not, will add up result be determined directly as it is double
Pixel after linear interpolation processing;If so, addition result is normalized, by the addition result after normalized
It is determined as bilinear interpolation treated pixel value.
Similarly, the weight in bilinear interpolation weight table may without normalized, for the value greater than 1, then need by
Addition result is normalized, and if the weight in linear interpolation weight table has first passed through normalized in advance, for
Value less than 1, therefore addition result no longer needs to be normalized.
In above-mentioned (two) to the pixel of the second overlapping region carry out bilinear interpolation processing correlation step and above-mentioned (one)
In linear interpolation processing is carried out to the pixel of the first overlapping region correlation step it is similar, do not refer to that place can refer to above-mentioned (one)
In corresponding content, herein without repeating.The above-mentioned pixel to the first overlapping region carries out linear interpolation processing, and to second
The two ways that the pixel of overlapping region carries out bilinear interpolation processing can disposably choose multiple pixels and carry out interpolation processing,
It is particularly applicable to Single Instruction Multi-data, can effectively promote processing speed.
In conclusion above-mentioned image processing method provided in this embodiment, can be multiple images by entire image cutting
The accessible tile size of Processing Algorithm, the entire image that is spliced to form that treated after being handled respectively each image block again, this
Kind mode makes the Processing Algorithm for being only applicable to fixed picture size that can also be flexibly applied to the image of sizes, also makes user
Large-size images are handled more conveniently.And by making adjacent image block that there is overlay region during cutting entire image
Domain, and the mode of interpolation fusion is carried out to overlapping region, it can be effectively improved splicing trace caused by image block splicing, so that
The better effect that spliced entire image is presented.It further, can be disposable when carrying out interpolation fusion to overlapping region
Choose multiple pixels and carry out interpolation processings, and interpolation weights be it is preset, also further improve interpolation efficiency, accelerate
The processing speed of target image.
Embodiment three:
On the basis of example 2, a kind of specific image procossing example is present embodiments provided, which can apply
Having SIMD in ARM CPU platform or GPU etc. itself, (Single Instruction, Multiple Data, singly refers to
Enable, most evidence) equipment of characteristic specifically may include following steps:
Step 31, the wide w of image processing algorithm needed for obtaining image to be processed and its width W and high H, user, image block
With high h and adjacent block overlapping region size o;It is understood that in the present embodiment, enabling neighbouring to be convenient to carry out
Block is identical as the overlapping region size of left and right adjacent block namely default overlapping widths o1 in above-described embodiment and default overlapping it is high
It is all the same to spend o2, and is equal to o.
Step 32, calculate image number of blocks: (H/h+n) * (W/w+n), wherein "/" indicate division of integer, n be it is preset just
Integer, in a kind of embodiment, n=1.Such as, H=14, h=4, usual H are 3.5 divided by the result of h, but due to image block
Quantity is integer, then by the way of division of integer, enabling the division result of H and h is 3, if setting n=1, H/h+n=
4 namely each column of image to be processed need at least four image block.It should be noted that the above is only citing example, it should not
It is viewed as a limitation.
Required image number of blocks is quickly calculated by the above-mentioned means, can be convenient.The setting of above-mentioned n value needs to protect
Card image number of blocks can cover the entire area of image to be processed, and adjacent image block overlapping region width and height are not less than o.
Step 33, it is based on image number of blocks, cutting is carried out to image to be processed.Equally, in the most egress of image to be processed
Divide in result, all image blocks cover the entire area of image to be processed, and adjacent image block overlapping region width and height be not small
In o.
Step 34, all image blocks are handled with image processing algorithm respectively, image block after being handled.
Step 35, image block after processing is arranged according to the position in original image to be processed, obtain without
Image after the processing of interpolation fusion.
Step 36, placed in the middle to choose width or height for the overlapping region of two adjacent image blocks in image after processing
No more than the part of overlapping region size o, picture element interpolation is carried out using preset instruction set.
Wherein, preset instruction set can be a kind of computations collection in ARM architecture microprocessor, can be realized single instrction
Multiple data stream operation, in a kind of specific embodiment, which can be NEON instruction set, wherein NEON is
A kind of expansion structure suitable for ARM series processors.By using NEON instruction set, inserting for multiple pixels can be handled simultaneously
It is worth operation, to realize that algorithm accelerates.
Step 37, placed in the middle to choose width or height not for two adjacent image block overlapping regions in image after processing
More than the part of overlapping region size o, picture element interpolation is carried out using preset instruction set.
Step 38, it obtains by 33~step 37 of above-mentioned steps treated image, and will treated that image is supplied to
User.
For ease of understanding, more detailed below by taking the overlapping region of two adjacent image blocks carries out linear interpolation as an example
Illustrate the overlapping region interpolation algorithm based on preset instruction set:
(1) k phase of the overlapping region for the two adjacent image blocks of load instruction while taking-up concentrated using preset instructions
Adjacent pixel value;
(2) from the linear interpolation weight table precalculated, interpolation weight is taken out in the load instruction concentrated using preset instructions
Weight;
For ease of understanding, by taking the linear interpolation of two horizontally adjacent image blocks as an example, two length are created as image overlapping
The one-dimension array a and b of peak width o can be in one embodiment the pixel of x with set distance overlapping region left margin,
Two interpolation weights on left images block are respectively a [x]=1.0-1.0/o, b [x]=1.0/o.Power in this mode
Weight values be less than 1 namely weight have passed through normalized in advance.In another embodiment, if preset instructions
Integrate as NEON instruction set, is integer arithmetic in usual calculating process, therefore it is whole greater than 1 that a [x] and b [x], which can be set,
Number, in order to execute arithmetic operation.
By the above-mentioned means, the corresponding interpolation weights of each pixel can be precalculated, and establish linear difference weight table.?
In another embodiment,
(3) the multiple pixel values and corresponding two that will be taken out in two image blocks using the multiplying order that preset instructions are concentrated
A interpolation weights are multiplied respectively, two after being weighted group pixel value;
(4) above-mentioned two groups of pixel values are added using the addition instruction that preset instructions are concentrated, after obtaining overlapping region fusion
Pixel value.
If the weighted value in linear interpolation weight table is all larger than 1, also need to merge overlapping region obtained in (4)
Pixel value afterwards is normalized that (such as, for pixel value divided by o), pixel of the normalizing into original image to be processed is big
Small range.If the weighted value in linear interpolation weight table is respectively less than 1, no longer need to merge overlapping region obtained in (4)
Pixel value afterwards is normalized.
In practical applications, the picture that preset instructions concentrate the selection of specific instruction to depend on pixel value digit, take out every time
Prime number amount etc., herein without limiting.
In conclusion above-mentioned image procossing example provided in this embodiment, in such a way that piecemeal handles entire image, energy
Enough make to be only applicable to fixed-size image processing algorithm that a variety of larger sized images can be flexibly applied to;By whole in cutting
Make adjacent image block that there is overlapping region during width image, and carries out the mode of interpolation fusion, Neng Gouyou to overlapping region
Effect improves splicing trace caused by image block splicing, so that the better effect that spliced entire image is presented.Moreover, logical
It crosses and interpolation is carried out using overlapping region of the preset instruction set to adjacent image block, can disposably choose multiple pixels and carry out interpolation
Processing, and interpolation weights be it is preset, also further improve interpolation efficiency, accelerate entire image processing speed
Degree.
Example IV:
For image processing method provided in embodiment two, the embodiment of the invention provides a kind of image procossing dresses
It sets, a kind of structural block diagram of image processing apparatus shown in Figure 6, including following module:
Module 602 is obtained, for obtaining target image to be processed;
Target image cutting is by cutting module 604 for the size and preset picture size according to target image
Multiple images block;Multiple images block jointly comprises all information of target image;
Processing module 606 obtains multiple treated image blocks for carrying out image procossing respectively to multiple images block;
Splicing module 608, for treated that image block splices by multiple, the target image that obtains that treated.
Entire image cutting can be that multiple images processing is calculated by above-mentioned image processing apparatus provided in an embodiment of the present invention
The accessible tile size of method, be spliced to form that treated after being handled respectively each image block again entire image, this mode
Make the Processing Algorithm for being only applicable to fixed picture size that can also be flexibly applied to the image of sizes, also makes user more square
Just large-size images are handled.
In one embodiment, above-mentioned cutting module 604 is used for: obtaining default overlapping widths and default stack height;
According to the width of target image and height, preset picture traverse and picture altitude and default overlapping widths and default overlapping
It highly, is multiple images block by the uniform cutting of target image;Wherein, two adjacent image blocks have overlapping region, and left and right
The width of the overlapping region of two adjacent image blocks is not less than default overlapping widths, the overlapping of two neighbouring image blocks
The height in region is not less than default stack height.
In one embodiment, above-mentioned splicing module 608 is used for: obtaining that each treated that image block is corresponding in target
Position in image;Based on the corresponding position in the target image of each treated image block, to multiple treated images
Block is spliced, and initial stitching image is obtained;Interpolation is carried out to the overlapping region of treated in initial stitching image image block
Processing will carry out the target image that is determined as that treated of the initial stitching image after interpolation processing to each overlapping region.
In one embodiment, above-mentioned splicing module 608 is further used for: after two processing in initial stitching image
The overlapping region that has of image block be determined as the first overlapping region;By four in initial stitching image treated image block tools
Some overlapping regions are determined as the second overlapping region;Linear interpolation processing is carried out to the pixel of the first overlapping region, to the second weight
The pixel in folded region carries out bilinear interpolation processing.
When pixel of the above-mentioned splicing module 608 to the first overlapping region carries out linear interpolation processing, can use following
Specific embodiment:
In a specific embodiment, above-mentioned splicing module 608 is further used for: selecting from the first overlapping region in batches
Take multiple pixels, and the multiple pixels chosen to every batch of are performed both by following operation: the position of the pixel based on selection is built from advance
Corresponding first image weights of pixel and the second image weights of selection are searched in vertical linear interpolation weight table;Linear interpolation power
Record has the corresponding relationship of location of pixels and image weights in weight table;Image weights include the power of the first image where pixel
The weight of the second image where weight and pixel;The pixel value of the pixel of selection is multiplied with the first image weights, obtains
The pixel value of the pixel of selection is multiplied with the second image weights, obtains the second pixel value by one pixel value;By the first pixel value and
Second pixel value is added, the pixel value after linear interpolation processing is obtained based on addition result.
In a specific embodiment, above-mentioned splicing module 608 is further used for: if the overlapping of the first overlapping region
Width is equal to default overlapping widths or the stack height of the first overlapping region is equal to default stack height, then in batches from first
Multiple pixels are chosen in all pixels of overlapping region;If the overlapping widths of the first overlapping region are greater than default overlapping widths,
Or first the stack height of overlapping region be greater than default stack height, then choose regional area from the first overlapping region, point
It criticizes and chooses multiple pixels from all pixels value of regional area;Wherein, it is wide to be equal to default overlapping for the overlapping widths of regional area
Degree or the stack height of target overlapping region are equal to default stack height.
In a specific embodiment, above-mentioned splicing module 608 is further used for: by the first pixel value and the second pixel
Value is added, and obtains addition result;Judge whether the image weights in linear interpolation weight table are greater than 1;If not, will add up result
Pixel value after being determined directly as linear interpolation processing;If so, addition result is normalized, by normalized
Addition result afterwards is determined as the pixel value after linear interpolation processing.
When above-mentioned splicing module 608 carries out bilinear interpolation processing to the pixel of the second overlapping region, can use with
Lower specific embodiment:
In a specific embodiment, above-mentioned splicing module 608 is further used for: selecting from the second overlapping region in batches
Take multiple pixels, and the multiple pixel values chosen to every batch of perform the following operations: the position of the pixel based on selection is built from advance
Corresponding first image weights of pixel, the second image weights, third image of selection are searched in vertical bilinear interpolation weight table
Weight and the 4th image weights;Record has the corresponding relationship of location of pixels and image weights in bilinear interpolation weight table;Image
Weight includes the third image where the weight of the second image where the weight of the first image where pixel, pixel, pixel
Weight and pixel where the 4th image weight;The pixel value of the pixel of selection is multiplied with the first image weights, is obtained
To the first pixel value, the pixel value of the pixel of selection is multiplied with the second image weights, obtains the second pixel value, by the picture of selection
The pixel value of element is multiplied with third image weights, obtains third pixel value, and the pixel value of the pixel of selection and the 4th image are weighed
Heavy phase multiplies, and obtains the 4th pixel value;First pixel value, the second pixel value, third pixel value and the 4th pixel value are added, obtained
Bilinear interpolation treated pixel value.
In a specific embodiment, above-mentioned splicing module 608 is further used for: if the overlapping of the second overlapping region
Width is equal to default overlapping widths, and the stack height of the second overlapping region is equal to default stack height, then in batches from the second weight
Multiple pixels are chosen in all pixels in folded region;If the overlapping widths of the second overlapping region are greater than default overlapping widths, or
The stack height of the second overlapping region of person is greater than default stack height, and regional area is chosen from the second overlapping region, in batches from
Multiple pixels are chosen in all pixels of regional area;Wherein, the overlapping widths of regional area are equal to default overlapping widths, and mesh
The stack height for marking overlapping region is equal to default stack height.
In a specific embodiment, above-mentioned splicing module 608 is further used for: by the first pixel value, the second pixel
Value, third pixel value and the 4th pixel value are added, and obtain addition result;Judging the image weights in bilinear interpolation weight table is
It is no to be greater than 1;If not, will add up result is determined directly as bilinear interpolation treated pixel;If so, to addition result into
Addition result after normalized is determined as bilinear interpolation treated pixel value by row normalized.
The technical effect of device provided by the present embodiment, realization principle and generation is identical with previous embodiment, for letter
It describes, Installation practice part does not refer to place, can refer to corresponding contents in preceding method embodiment.
Embodiment five:
Corresponding to method and apparatus provided by previous embodiment, the embodiment of the invention also provides a kind of computer-readable
Storage medium is stored with computer program on the computer readable storage medium, execution when computer program is run by processor
The step of any of the above-described image processing method.
Image processing method, device provided by the embodiment of the present invention, electronic equipment and computer readable storage medium
Computer program product, the computer readable storage medium including storing program code, the instruction that said program code includes
It can be used for executing previous methods method as described in the examples, specific implementation can be found in embodiment of the method, and details are not described herein.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
In the description of the present invention, it should be noted that term " center ", "upper", "lower", "left", "right", "vertical",
The orientation or positional relationship of the instructions such as "horizontal", "inner", "outside" be based on the orientation or positional relationship shown in the drawings, merely to
Convenient for description the present invention and simplify description, rather than the device or element of indication or suggestion meaning must have a particular orientation,
It is constructed and operated in a specific orientation, therefore is not considered as limiting the invention.In addition, term " first ", " second ",
" third " is used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance.
Finally, it should be noted that embodiment described above, only a specific embodiment of the invention, to illustrate the present invention
Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair
It is bright to be described in detail, those skilled in the art should understand that: anyone skilled in the art
In the technical scope disclosed by the present invention, it can still modify to technical solution documented by previous embodiment or can be light
It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make
The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention, should all cover in protection of the invention
Within the scope of.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.
Claims (13)
1. a kind of image processing method characterized by comprising
Obtain target image to be processed;
It is multiple images block by the target image cutting according to the size of the target image and preset picture size;
Multiple described image blocks jointly comprise all information of the target image;
Image procossing is carried out to multiple described image blocks respectively, obtains multiple treated image blocks;
By it is multiple it is described treated that image block splices, the target image that obtains that treated.
2. the method according to claim 1, wherein the size according to the target image and preset
Picture size, by the target image cutting be multiple images block the step of, comprising:
Obtain default overlapping widths and default stack height;
It is wide according to the width of the target image and height, preset picture traverse and picture altitude and the default overlapping
The uniform cutting of the target image is multiple images block by degree and the default stack height;
Wherein, two adjacent described image blocks have overlapping region, and the overlay region of the adjacent two described image blocks in left and right
The width in domain is not less than the default overlapping widths, and the height of the overlapping region of two neighbouring described image blocks is not less than
The default stack height.
3. according to the method described in claim 2, it is characterized in that, described described treated that image block is spelled by multiple
It connects, the step of the target image that obtains that treated, comprising:
Treated described in acquisition is each, and image block corresponds to the position in the target image;
Based on the corresponding position in the target image of each treated image block, to multiple treated figures
As block is spliced, initial stitching image is obtained;
Interpolation processing is carried out to the overlapping region of treated described in initial stitching image image block, it will be to each described heavy
Folded region carries out the target image that is determined as that treated of the initial stitching image after interpolation processing.
4. according to the method described in claim 3, it is characterized in that, described to treated described in the initial stitching image
The overlapping region of image block carries out the step of interpolation processing, comprising:
By treated described in the initial stitching image two, overlapping region that image block has is determined as the first overlay region
Domain;
By treated described in the initial stitching image four, overlapping region that image block has is determined as the second overlay region
Domain;
Linear interpolation processing is carried out to the pixel of first overlapping region, two-wire is carried out to the pixel of second overlapping region
Property interpolation processing.
5. according to the method described in claim 4, it is characterized in that, the pixel to first overlapping region carries out linearly
The step of interpolation processing, comprising:
Multiple pixels are chosen from first overlapping region in batches, and the multiple pixels chosen to every batch of are performed both by following behaviour
Make:
The pixel pair of selection is searched in the position of the pixel based on selection from the linear interpolation weight table pre-established
The first image weights and the second image weights answered;Record has location of pixels and image weights in the linear interpolation weight table
Corresponding relationship;Described image weight includes the power of the weight of the first image where pixel and the second image where pixel
Weight;
By the pixel value of the pixel of selection and the first image multiplied by weight, the first pixel value is obtained, by the institute of selection
The pixel value for stating pixel is multiplied with second image weights, obtains the second pixel value;
First pixel value is added with second pixel value, the pixel after linear interpolation processing is obtained based on addition result
Value.
6. according to the method described in claim 5, it is characterized in that, it is described chosen from first overlapping region in batches it is multiple
The step of pixel, comprising:
If the overlapping widths of first overlapping region are equal to the default overlapping widths or first overlapping region
Stack height is equal to the default stack height, then chooses multiple pictures from all pixels of first overlapping region in batches
Element;
If the overlapping widths of first overlapping region are greater than the default overlapping widths or first overlapping region
Stack height is greater than the default stack height, then regional area is chosen from first overlapping region, in batches from the office
Multiple pixels are chosen in all pixels value in portion region;Wherein, the overlapping widths of the regional area are equal to the default overlapping
Width or the stack height of the target overlapping region are equal to the default stack height.
7. according to the method described in claim 5, it is characterized in that, described by first pixel value and second pixel value
It is added, the step of pixel value after linear interpolation processing is obtained based on addition result, comprising:
First pixel value is added with second pixel value, obtains addition result;
Judge whether the image weights in the linear interpolation weight table are greater than 1;
If not, the addition result to be determined directly as to the pixel value after linear interpolation processing;
If so, the addition result is normalized, the addition result after normalized is determined as linearly inserting
Value treated pixel value.
8. according to the method described in claim 4, it is characterized in that, the pixel to second overlapping region carries out two-wire
The step of property interpolation processing, comprising:
Multiple pixels are chosen from second overlapping region in batches, and following behaviour is executed to multiple pixel values that every batch of is chosen
Make:
The pixel of selection is searched in the position of the pixel based on selection from the bilinear interpolation weight table pre-established
Corresponding first image weights, the second image weights, third image weights and the 4th image weights;The bilinear interpolation weight
Record has the corresponding relationship of location of pixels and image weights in table;Described image weight includes the power of the first image where pixel
The weight of third image where the weight of the second image where weight, pixel, pixel and the 4th image where pixel
Weight;
By the pixel value of the pixel of selection and the first image multiplied by weight, the first pixel value is obtained, by the institute of selection
The pixel value for stating pixel is multiplied with second image weights, obtains the second pixel value, by the pixel value of the pixel of selection
It is multiplied with the third image weights, obtains third pixel value, by the pixel value of the pixel of selection and the 4th image
Multiplied by weight obtains the 4th pixel value;
First pixel value, second pixel value, the third pixel value are added with the 4th pixel value, obtained double
Pixel value after linear interpolation processing.
9. according to the method described in claim 8, it is characterized in that, it is described chosen from second overlapping region in batches it is multiple
The step of pixel, comprising:
If the overlapping widths of second overlapping region are equal to the default overlapping widths, and the weight of second overlapping region
Folded height is equal to the default stack height, then chooses multiple pixels from all pixels of second overlapping region in batches;
If the overlapping widths of second overlapping region are greater than the default overlapping widths or second overlapping region
Stack height is greater than the default stack height, regional area is chosen from second overlapping region, in batches from the part
Multiple pixels are chosen in all pixels in region;Wherein, the overlapping widths of the regional area are equal to the default overlapping widths,
And the stack height of the target overlapping region is equal to the default stack height.
10. according to the method described in claim 8, it is characterized in that, described by first pixel value, second pixel
The step of value, the third pixel value are added with the 4th pixel value, obtain bilinear interpolation treated pixel value, wraps
It includes:
First pixel value, second pixel value, the third pixel value are added with the 4th pixel value, obtain phase
Add result;
Judge whether the image weights in the bilinear interpolation weight table are greater than 1;
If not, the addition result is determined directly as bilinear interpolation treated pixel;
If so, the addition result is normalized, the addition result after normalized is determined as bilinearity
Pixel value after interpolation processing.
11. a kind of image processing apparatus characterized by comprising
Module is obtained, for obtaining target image to be processed;
Cutting module, for the size and preset picture size according to the target image, by the target image cutting
For multiple images block;Multiple described image blocks jointly comprise all information of the target image;
Processing module obtains multiple treated image blocks for carrying out image procossing respectively to multiple described image blocks;
Splicing module, for by it is multiple it is described treated that image block splices, the target image that obtains that treated.
12. a kind of electronic equipment, which is characterized in that the equipment includes processor and storage device;It is deposited on the storage device
Computer program is contained, the computer program is executed when being run by the processor such as any one of claims 1 to 10 institute
The method stated.
13. a kind of computer readable storage medium, computer program, feature are stored on the computer readable storage medium
The step of being, the described in any item methods of the claims 1 to 10 executed when the computer program is run by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811309942.2A CN109493281A (en) | 2018-11-05 | 2018-11-05 | Image processing method, device, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811309942.2A CN109493281A (en) | 2018-11-05 | 2018-11-05 | Image processing method, device, electronic equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109493281A true CN109493281A (en) | 2019-03-19 |
Family
ID=65693753
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811309942.2A Pending CN109493281A (en) | 2018-11-05 | 2018-11-05 | Image processing method, device, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109493281A (en) |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110400250A (en) * | 2019-07-29 | 2019-11-01 | 杭州凝眸智能科技有限公司 | Intelligent image preprocess method and system based on AI |
CN110910312A (en) * | 2019-11-21 | 2020-03-24 | 北京百度网讯科技有限公司 | Image processing method and device, automatic driving vehicle and electronic equipment |
CN111754393A (en) * | 2020-06-28 | 2020-10-09 | 展讯通信(上海)有限公司 | Image processing method, system, electronic device, and medium |
CN111833288A (en) * | 2019-04-12 | 2020-10-27 | 阿里巴巴集团控股有限公司 | Image recognition method, device and equipment |
CN112188214A (en) * | 2020-09-22 | 2021-01-05 | 展讯通信(上海)有限公司 | Image processing method, system, electronic device, and medium |
CN112215770A (en) * | 2020-10-10 | 2021-01-12 | 成都数之联科技有限公司 | Image processing method, system, device and medium |
CN112577960A (en) * | 2020-12-07 | 2021-03-30 | 上海威士顿信息技术股份有限公司 | Method and system for detecting impurities in tobacco leaves and computer-readable storage medium |
CN113096043A (en) * | 2021-04-09 | 2021-07-09 | 杭州睿胜软件有限公司 | Image processing method and device, electronic equipment and storage medium |
CN113298703A (en) * | 2021-06-25 | 2021-08-24 | 北京爱芯科技有限公司 | Image processing method and device, electronic equipment and storage medium |
CN113487484A (en) * | 2021-07-09 | 2021-10-08 | 上海智砹芯半导体科技有限公司 | Image splicing method and device, electronic equipment and computer readable storage medium |
CN113487480A (en) * | 2021-06-30 | 2021-10-08 | 北京达佳互联信息技术有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
CN113506304A (en) * | 2021-04-30 | 2021-10-15 | 艾酷软件技术(上海)有限公司 | Image processing method and device, electronic equipment and readable storage medium |
CN113724157A (en) * | 2021-08-11 | 2021-11-30 | 浙江大华技术股份有限公司 | Image blocking method, image processing method, electronic device, and storage medium |
CN113822799A (en) * | 2020-06-19 | 2021-12-21 | 南宁富桂精密工业有限公司 | Image amplification method, device and computer readable storage medium |
CN113890961A (en) * | 2021-10-13 | 2022-01-04 | Oppo广东移动通信有限公司 | Image processing method and device, terminal and readable storage medium |
CN117726507A (en) * | 2023-08-04 | 2024-03-19 | 荣耀终端有限公司 | Image processing method and device |
CN117993029A (en) * | 2024-04-03 | 2024-05-07 | 武昌首义学院 | Satellite information and training data warehouse network safety protection method and system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020067864A1 (en) * | 2000-11-15 | 2002-06-06 | Masatoshi Matsuhira | Image processing device and image processing method |
CN103034973A (en) * | 2012-12-05 | 2013-04-10 | 焦点科技股份有限公司 | Self-adaptive image scaling method based on bicubic interpolation |
CN103164848A (en) * | 2011-12-09 | 2013-06-19 | 腾讯科技(深圳)有限公司 | Image processing method and system |
CN105023260A (en) * | 2014-04-22 | 2015-11-04 | Tcl集团股份有限公司 | Panorama image fusion method and fusion apparatus |
CN106683045A (en) * | 2016-09-28 | 2017-05-17 | 深圳市优象计算技术有限公司 | Binocular camera-based panoramic image splicing method |
CN107203986A (en) * | 2017-05-26 | 2017-09-26 | 努比亚技术有限公司 | A kind of image interfusion method, device and computer-readable recording medium |
-
2018
- 2018-11-05 CN CN201811309942.2A patent/CN109493281A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020067864A1 (en) * | 2000-11-15 | 2002-06-06 | Masatoshi Matsuhira | Image processing device and image processing method |
CN103164848A (en) * | 2011-12-09 | 2013-06-19 | 腾讯科技(深圳)有限公司 | Image processing method and system |
CN103034973A (en) * | 2012-12-05 | 2013-04-10 | 焦点科技股份有限公司 | Self-adaptive image scaling method based on bicubic interpolation |
CN105023260A (en) * | 2014-04-22 | 2015-11-04 | Tcl集团股份有限公司 | Panorama image fusion method and fusion apparatus |
CN106683045A (en) * | 2016-09-28 | 2017-05-17 | 深圳市优象计算技术有限公司 | Binocular camera-based panoramic image splicing method |
CN107203986A (en) * | 2017-05-26 | 2017-09-26 | 努比亚技术有限公司 | A kind of image interfusion method, device and computer-readable recording medium |
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111833288A (en) * | 2019-04-12 | 2020-10-27 | 阿里巴巴集团控股有限公司 | Image recognition method, device and equipment |
CN111833288B (en) * | 2019-04-12 | 2024-02-09 | 阿里巴巴集团控股有限公司 | Image recognition method, device and equipment |
CN110400250A (en) * | 2019-07-29 | 2019-11-01 | 杭州凝眸智能科技有限公司 | Intelligent image preprocess method and system based on AI |
CN110910312A (en) * | 2019-11-21 | 2020-03-24 | 北京百度网讯科技有限公司 | Image processing method and device, automatic driving vehicle and electronic equipment |
CN113822799A (en) * | 2020-06-19 | 2021-12-21 | 南宁富桂精密工业有限公司 | Image amplification method, device and computer readable storage medium |
CN111754393A (en) * | 2020-06-28 | 2020-10-09 | 展讯通信(上海)有限公司 | Image processing method, system, electronic device, and medium |
CN112188214A (en) * | 2020-09-22 | 2021-01-05 | 展讯通信(上海)有限公司 | Image processing method, system, electronic device, and medium |
CN112215770B (en) * | 2020-10-10 | 2022-08-02 | 成都数之联科技股份有限公司 | Image processing method, system, device and medium |
CN112215770A (en) * | 2020-10-10 | 2021-01-12 | 成都数之联科技有限公司 | Image processing method, system, device and medium |
CN112577960B (en) * | 2020-12-07 | 2024-05-24 | 上海威士顿信息技术股份有限公司 | Method and system for detecting impurities in tobacco leaves and computer-readable storage medium |
CN112577960A (en) * | 2020-12-07 | 2021-03-30 | 上海威士顿信息技术股份有限公司 | Method and system for detecting impurities in tobacco leaves and computer-readable storage medium |
CN113096043A (en) * | 2021-04-09 | 2021-07-09 | 杭州睿胜软件有限公司 | Image processing method and device, electronic equipment and storage medium |
WO2022228434A1 (en) * | 2021-04-30 | 2022-11-03 | 维沃移动通信有限公司 | Image processing method and apparatus, electronic device, and readable storage medium |
CN113506304A (en) * | 2021-04-30 | 2021-10-15 | 艾酷软件技术(上海)有限公司 | Image processing method and device, electronic equipment and readable storage medium |
CN113298703A (en) * | 2021-06-25 | 2021-08-24 | 北京爱芯科技有限公司 | Image processing method and device, electronic equipment and storage medium |
CN113487480A (en) * | 2021-06-30 | 2021-10-08 | 北京达佳互联信息技术有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
CN113487484B (en) * | 2021-07-09 | 2022-08-12 | 上海智砹芯半导体科技有限公司 | Image splicing method and device, electronic equipment and computer readable storage medium |
CN113487484A (en) * | 2021-07-09 | 2021-10-08 | 上海智砹芯半导体科技有限公司 | Image splicing method and device, electronic equipment and computer readable storage medium |
CN113724157A (en) * | 2021-08-11 | 2021-11-30 | 浙江大华技术股份有限公司 | Image blocking method, image processing method, electronic device, and storage medium |
CN113890961A (en) * | 2021-10-13 | 2022-01-04 | Oppo广东移动通信有限公司 | Image processing method and device, terminal and readable storage medium |
CN117726507A (en) * | 2023-08-04 | 2024-03-19 | 荣耀终端有限公司 | Image processing method and device |
CN117993029A (en) * | 2024-04-03 | 2024-05-07 | 武昌首义学院 | Satellite information and training data warehouse network safety protection method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109493281A (en) | Image processing method, device, electronic equipment and computer readable storage medium | |
US11567624B2 (en) | Techniques to modify content and view content on mobile devices | |
CN110473141A (en) | Image processing method, device, storage medium and electronic equipment | |
CN107563953A (en) | The blocks operation of channel array and the image processor of two-dimensional shift register is performed with two dimension | |
CN107408291A (en) | Use the two-stage vector stipulations of the one-dimensional synchronous array of two peacekeepings | |
CN106780401B (en) | A kind of method and mobile terminal of picture processing | |
EP1794714A1 (en) | Magnification and pinching of two-dimensional images | |
CN107563954A (en) | The core processing of blocks operation on channel array and the image processor of two-dimensional shift register is performed with two dimension | |
CN106663311B (en) | System and method for increasing the locating depth of image | |
CN102201108A (en) | Edge processing techniques | |
US20040052431A1 (en) | Block-based rotation of arbitrary-shaped images | |
WO2019184888A1 (en) | Image processing method and apparatus based on convolutional neural network | |
CN108924440A (en) | Paster display methods, device, terminal and computer readable storage medium | |
CN109635525A (en) | Adding method, device, equipment and the storage medium of watermark | |
CN109871841A (en) | Image processing method, device, terminal and storage medium | |
JP2022188301A (en) | Information processing apparatus, and information processing method | |
CN107239518A (en) | A kind of image comparison method, contrast device, electronic equipment and storage medium | |
CN111190677A (en) | Information display method, information display device and terminal equipment | |
CN114255160A (en) | Data processing method, device, equipment and storage medium | |
CN114003194A (en) | Operation method and device based on multiplier and computer readable storage medium | |
CN110264401A (en) | Continuous type image magnification method, device and storage medium based on radial basis function | |
WO2022228434A1 (en) | Image processing method and apparatus, electronic device, and readable storage medium | |
WO2011053314A1 (en) | Arranging secondary images adjacent to a primary image | |
CN109544587A (en) | A kind of FIG pull handle method, apparatus and terminal device | |
CN109388311A (en) | A kind of image display method, device and equipment |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190319 |