CN105335987A - Image data processing method and apparatus - Google Patents

Image data processing method and apparatus Download PDF

Info

Publication number
CN105335987A
CN105335987A CN201410253811.2A CN201410253811A CN105335987A CN 105335987 A CN105335987 A CN 105335987A CN 201410253811 A CN201410253811 A CN 201410253811A CN 105335987 A CN105335987 A CN 105335987A
Authority
CN
China
Prior art keywords
image block
intermediate image
image
value
row
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410253811.2A
Other languages
Chinese (zh)
Other versions
CN105335987B (en
Inventor
焦敬恩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201410253811.2A priority Critical patent/CN105335987B/en
Publication of CN105335987A publication Critical patent/CN105335987A/en
Application granted granted Critical
Publication of CN105335987B publication Critical patent/CN105335987B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an image data processing method and apparatus, and is applied to a first electronic device. The method comprises the following steps: extracting a first intermediate image block in a first image, wherein the first image comprises M rows and N columns of pixels, the first intermediate image block comprises I rows and J columns of pixels, M is greater than and equal to I, and N is greater than and equal to J; calculating the sum of pixel values of each row of pixels in the first intermediate image block, and storing N first values; and by use of the stored I first values, successively calculating a mean value of a pixel value of each first image block in (I-m+1) first image blocks in the first intermediate image block, wherein each first image block comprises m rows and J columns of pixels, and I is greater than m. According to the invention, the first intermediate image block greater than an image block for correlation calculation is extracted from the first image, data analytical calculation is performed on the first intermediate image block, an intermediate calculation result is stored, the intermediate calculation result is used for correlation calculation of the multiple first image blocks included in the first intermediate image block, and thus reuse of calculation resources is realized.

Description

Image processing method and device
Technical field
The present invention relates to technical field of image processing, and relate more specifically to a kind of image processing method and device.
Background technology
In the image procossing of such as Image Coding, image decoding, movement image analysis and so on, generally need the correlativity between image block in calculating two images.During correlativity in calculating two images between image block, the general image block of fixed size of selecting is as calculating object.As shown in Figure 1, show the first image block in the first image and the second image block in the second image, the first image block in Fig. 1 and the second image block are the image block of 9 × 9 pixels.
To calculate the correlativity in the first image in the first image block and the second image between the second image block, can according to the correlativity between formulae discovery first image block below and the second image block,
Corr = 1 m · n Σ i = 1 i = m Σ j = 1 j = n AB - ( 1 m · n Σ i = 1 i = m Σ j = 1 j = n A ) · ( 1 m · n Σ i = 1 i = m Σ j = 1 j = n B ) Σ i = 1 i = m Σ j = 1 j = n ( A - 1 m · n Σ i = 1 i = m Σ j = 1 j = n A ) 2 · Σ i = 1 i = m Σ j = 1 j = n ( B - 1 m · n Σ i = 1 i = m Σ j = 1 j = n B ) 2 . . . ( 1 )
Wherein,
A=a(lia+i-1)(lja+j-1)
B=b(lib+i-1)(ljb+j-1)
Particularly, a (lia+i-1) (lja+j-1) represents the i-th row jth row pixel value in the first image block, b (lib+i-1) (ljb+j-1) represents the i-th row jth row pixel value in the second image block, wherein, lia is the line number of the first row in described first image of described first image block, lja is the columns of first row in described first image of described first image block, lib is the line number of the first row in described second image of described second image block, and ljb is the columns of first row in described second image of described second image block.
As can be seen from the above equation, when the first image block in calculating first image and the correlativity between the second image block in the second image, need the pixel value product of the pixel value variance of the pixel value variance of the pixel value average of the pixel value average of calculating first image block, the second image block, the first image block, the second image block, the first image block and the second image block.
Then, during correlativity between the 3rd image block in the first image block in calculating first image and the second image, need the pixel value product of the pixel value variance of the pixel value average of calculating the 3rd image block, the 3rd image block, the 3rd image block and the first image block.Even if the second image block only differs a line up and down with the 3rd image block, do not reuse some intermediate results about the second image block yet.
In computation process as above, hardware resource and the software resource of image processing equipment will be taken in a large number, and also not make full use of the intermediate result produced in each correlation calculations, make resource utilization lower.
Therefore, need a kind of new image processing method and device, it can make full use of hardware resource in image processing equipment and software resource, and resource utilization is improved greatly.
Summary of the invention
In order to solve the problems of the technologies described above, the invention provides a kind of image processing method and device, it by extracting the first intermediate image block of the image block be greater than for correlation calculations in the first image, the first extracted intermediate image block is carried out to data analysis calculating and preserves results of intermediate calculations, then results of intermediate calculations is used in the correlation calculations of multiple first image blocks included in described first intermediate image block, thus realize the multiplexing of computational resource, improve resource utilization.
According to an aspect of the present invention, provide a kind of image processing method, be applied to the first electronic equipment, comprise: in the first image, extract the first intermediate image block, described first image comprises M capable N row pixel, and described first intermediate image block comprises I capable J row pixel, wherein, M >=I, N >=J; Calculate the pixel value sum of often row pixel in described first intermediate image block, and store I the first value; Utilize I the first value stored, calculate the pixel value mean value of each first image block in (I-m+1) individual first image block in described first intermediate image block successively, wherein said first image block comprises m capable J row pixel, wherein, and I>m.
According to the embodiment of the present invention, described image processing method also comprises: in the second image, extract the second intermediate image block, described second image and described first image have same size, and described first intermediate image block and described second intermediate image block have same size; Calculate the pixel value sum of often row pixel in described second intermediate image block, and store I the second value; And utilize I the second value stored, calculate the pixel value mean value of each second image block in (I-m+1) individual second image block in described second intermediate image block successively, wherein said first image block and described second image block have same size.
According to the embodiment of the present invention, described image processing method also comprises: the pixel value product calculating respective pixel in described first intermediate image block and described second intermediate image block, obtains I × J product; Calculate the sum of products of often row product in described I × J product, and store I the 3rd value; And utilize I the 3rd value stored, calculate the pixel value product mean value of the second image block that each first image block is corresponding with described second intermediate image block in (I-m+1) individual first image block in described first intermediate image block successively.
According to the embodiment of the present invention, described image processing method also comprises: for each first image block in (I-m+1) individual first image block in described first intermediate image block, the related coefficient according between its second image block corresponding with described second intermediate image block of following formulae discovery:
Corr = 1 m · J Σ i = l i = l + m - 1 MABi - ( 1 m · J Σ i = l i = l + m - 1 Ai ) · ( 1 m · J Σ i = l i = l + m - 1 Bi ) Σ i = l i = l + m - 1 Σ j = 1 j = J ( aij - 1 m · J Σ i = l i = l + m - 1 Ai ) 2 · Σ i = l i = l + m - 1 Σ j = 1 j = J ( bij - 1 m · J Σ i = l i = l + m - 1 Bi ) 2
Wherein, Ai is i-th the first value and represents the i-th row pixel value sum in described first intermediate image block, Bi is i-th the second value and represents the i-th row pixel value sum in described second intermediate image block, MABi is i-th the 3rd value and represents the sum of products of the i-th row product in described I × J product, aij represents the i-th row jth row pixel value in the first intermediate image block, bij represents the i-th row jth row pixel value in the second intermediate image block, wherein, l is the line number of the first row in described first intermediate image block of described first image block.
According to a further aspect of the invention, provide a kind of image data processing system, be applied to the first electronic equipment, comprise: intermediate image block extracting parts, for extracting the first intermediate image block in the first image, described first image comprises M capable N row pixel, described first intermediate image block comprises I capable J row pixel, wherein, M >=I, N >=J; Pixel value summation component, for calculating the pixel value sum of often row pixel in described first intermediate image block, and stores I the first value; Image block is averaged parts, for utilizing stored I the first value, calculate the pixel value mean value of each first image block in (I-m+1) individual first image block in described first intermediate image block successively, wherein said first image block comprises m capable J row pixel, wherein, I>m.
According to the embodiment of the present invention, in described image data processing system, described intermediate image block extracting parts also for extracting the second intermediate image block in the second image, described second image and described first image have same size, and described first intermediate image block and described second intermediate image block have same size; Described pixel value summation component also for calculating the pixel value sum of often row pixel in described second intermediate image block, and stores I the second value; Described image block averages parts also for utilizing stored I the second value, calculate the pixel value mean value of each second image block in (I-m+1) individual second image block in described second intermediate image block successively, wherein said first image block and described second image block have same size.
According to the embodiment of the present invention, described image data processing system also comprises: pixel dot product parts, for calculating the pixel value product of respective pixel in described first intermediate image block and described second intermediate image block, obtains I × J product; Dot product summation component, for calculating the sum of products of often row product in described I × J product, and stores I the 3rd value; And image block dot product is averaged parts, for utilizing stored I the 3rd value, calculate the pixel value product mean value of the second image block that each first image block is corresponding with described second intermediate image block in (I-m+1) individual first image block in described first intermediate image block successively.
According to the embodiment of the present invention, described image data processing system also comprises: Calculation of correlation factor parts, for each first image block in (I-m+1) individual first image block in described first intermediate image block, the related coefficient according between its second image block corresponding with described second intermediate image block of following formulae discovery:
Corr = 1 m · J Σ i = l i = l + m - 1 MABi - ( 1 m · J Σ i = l i = l + m - 1 Ai ) · ( 1 m · J Σ i = l i = l + m - 1 Bi ) Σ i = l i = l + m - 1 Σ j = 1 j = J ( aij - 1 m · J Σ i = l i = l + m - 1 Ai ) 2 · Σ i = l i = l + m - 1 Σ j = 1 j = J ( bij - 1 m · J Σ i = l i = l + m - 1 Bi ) 2
Wherein, Ai is i-th the first value and represents the i-th row pixel value sum in described first intermediate image block, Bi is i-th the second value and represents the i-th row pixel value sum in described second intermediate image block, MABi is i-th the 3rd value and represents the sum of products of the i-th row product in described I × J product, aij represents the i-th row jth row pixel value in the first intermediate image block, bij represents the i-th row jth row pixel value in the second intermediate image block, wherein, l is the line number of the first row in described first intermediate image block of described first image block.
According to the embodiment of the present invention, described first intermediate image block lays respectively at the first image and going together mutually in the second image with described second intermediate image block, and described first image block lays respectively at the first image and going together mutually in the second image with described second image block.
Adopt the image processing method according to the embodiment of the present invention and device, by extracting the first intermediate image block and the second intermediate image block that are greater than for the image block of correlation calculations respectively in the first image and the second image, the first and second extracted intermediate image blocks are carried out to data analysis calculating and preserve results of intermediate calculations, then results of intermediate calculations is used in the correlation calculations of multiple second image blocks included in multiple first image block included in described first intermediate image block and described second intermediate image block, thus realize the multiplexing of computational resource, improve resource utilization.
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from instructions, or understand by implementing the present invention.Object of the present invention and other advantages realize by structure specifically noted in instructions, claims and accompanying drawing and obtain.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for instructions, together with embodiments of the present invention for explaining the present invention, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 shows for the first image block in the first image of correlation calculations and the second image block in the second image, and wherein, the first image block and the second image block are the image block of 9 × 9 pixels;
Fig. 2 shows the intermediate image block according to the present invention's design;
Fig. 3 A, 3B and 3C show the indicative flowchart of the image processing method according to the embodiment of the present invention; And
Fig. 4 shows the schematic block diagram of the image data processing system according to the embodiment of the present invention.
Embodiment
In order to make the object of the embodiment of the present invention, technical scheme and advantage more obvious, describe in detail below with reference to accompanying drawings according to each embodiment of the present invention.Obviously, described embodiment is only a part of embodiment of the present invention, instead of whole embodiment of the present invention.Based on the embodiment described in the present invention, other embodiments all that those skilled in the art obtain when not paying creative work all should fall within protection scope of the present invention.
Here it is to be noted that it in the accompanying drawings, identical Reference numeral is given there is identical or similar structures and function ingredient substantially, and the repeated description of will omit about them.
The first image block as shown in Figure 1 and the second image block are the image block of 9 × 9 pixels, in existing image processing method, during correlativity between calculating first image block and the second image block, the data of independent calculating first image block and the second image block, then, during correlativity between calculating first image block and next second image block, no matter whether the intermediate result about the second image block calculated before abandoning, have overlap between the second image block and next second image block.When the second image block and next second image block only differ a line at above-below direction and are positioned at same column, this image processing method especially causes the waste of resource.
Propose a kind of new image processing method in the present invention, improve resource utilization by the intermediate result of multiplexing image procossing, and and then the speed of raising image real time transfer.
As shown in Figure 2, according to the present invention's design, propose the concept of intermediate image block, described intermediate image block is greater than the image block for correlation calculations, that is, the first image block in the first image, the second image block in the second image and next second image block.Particularly, the pixel columns that described intermediate image block comprises is identical with the described pixel columns comprised for the image block of correlation calculations, and the number of lines of pixels that described intermediate image block comprises is greater than the described number of lines of pixels comprised for the image block of correlation calculations.Such as, as shown in Figure 2, intermediate image block can be the image block of 18 × 9 pixels, that is, it comprises 18 row 9 row pixels.
Conceive according to the present invention, in advance the data that the first intermediate image block in the first image is often gone are processed, the data that the second intermediate image block in second image is often gone are processed, combined treatment is carried out to the data of every a line of the first intermediate image block and the associated row of the second intermediate image block, and preserve these intermediate processing results, these intermediate processing results are repeatedly utilized in correlation calculations between second image block of the first image block then in the first intermediate image block and the second intermediate image block, thus realize resource multiplex, improve resource utilization, and and then improve image real time transfer speed.
As shown in Fig. 3 A, Fig. 3 B and Fig. 3 C, show the indicative flowchart of the image processing method 300 according to the embodiment of the present invention.Image processing method 300 according to the embodiment of the present invention is applied to the first electronic equipment, and described first electronic equipment can perform the image procossing of such as Image Coding, image decoding, movement image analysis and so on.Below to carry out correlation calculations between the first image and the second image, the image processing method 300 according to the embodiment of the present invention is described.
In step S310, extract the first intermediate image block in the first image, described first image comprises M capable N row pixel, and described first intermediate image block comprises I capable J row pixel, wherein, and M >=I, N >=J.
In step S320, calculate the pixel value sum of often row pixel in described first intermediate image block, and store I the first value Ai, wherein, I >=i >=1.
Ai = Σ j = 1 j = J aij
In step S330, utilize I the first value stored, calculate the pixel value mean value of each first image block in (I-m+1) individual first image block in described first intermediate image block successively, wherein said first image block comprises m capable J row pixel, wherein, I>m.
In embodiments of the present invention, m, I, J, M, N are natural number.
Thus, by step S310-S330, the data that first intermediate image block is often gone are processed, obtain the pixel value mean value of each image block in (I-m+1) individual first image block that the first intermediate image block often comprises in the pixel value sum (correspondingly, also can obtain the pixel value mean value of often row pixel) of row pixel and the first intermediate image block.
For 18 × 9 pixels in Fig. 2, by step S310-S330, the pixel value sum of often row pixel in 18 row pixels of the first intermediate image block can be obtained (namely, 18 first values), and the pixel value mean value of each first image block in 10 the first image blocks that the first intermediate image block comprises can be obtained, particularly, first the first image block comprises the 1st row-9 row pixel of the first intermediate image block, second the first image block comprises the 2nd row-10 row pixel of the first intermediate image block, the like, tenth the first image block comprises the 10th row pixel-18 row pixel of the first intermediate image block.
In the correlation calculations about 10 the first image block second image blocks corresponding to it, results of intermediate calculations as above can be reused, thus improve resource utilization.
In addition, similar operations can also be performed to the second image according to the image processing method 300 of the embodiment of the present invention.
In step S340, extract the second intermediate image block in the second image, described second image and described first image have same size, and described first intermediate image block and described second intermediate image block have same size.
In step S350, calculate the pixel value sum of often row pixel in described second intermediate image block, and store I the second value Bi, wherein, I >=i >=1.
Bi = Σ j = 1 j = J bij
In step S360, utilize I the second value stored, calculate the pixel value mean value of each second image block in (I-m+1) individual second image block in described second intermediate image block successively, wherein said first image block and described second image block have same size.More advantageously, the position of described first image block in the first intermediate image block is identical with the position of described second image block in the second intermediate image block.
Thus, by step S340-S360, the data that second intermediate image block is often gone are processed, obtain the pixel value mean value of each image block in (I-m+1) individual second image block that the second intermediate image block often comprises in the pixel value sum (correspondingly, also can obtain the pixel value mean value of often row pixel) of row pixel and the second intermediate image block.
Continue for 18 × 9 pixels in Fig. 2, by step S340-S360, the pixel value sum of often row pixel in 18 row pixels of the second intermediate image block can be obtained (namely, 18 second values), and the pixel value mean value of each second image block in 10 the second image blocks that the second intermediate image block comprises can be obtained.
In the correlation calculations about 10 the first image block second image blocks corresponding to it, results of intermediate calculations as above can be reused, thus further increase resource utilization.
In addition, combined treatment can also be carried out to the data of the associated row of every a line of the first intermediate image block and the second intermediate image block according to the image processing method 300 of the embodiment of the present invention.
In step S370, calculate the pixel value product of respective pixel in described first intermediate image block and described second intermediate image block, obtain I × J product, and calculate the sum of products of often row product in described I × J product, and store I the 3rd value MABi, and wherein, I >=i >=1
MABi = Σ j = 1 j = J ( aij · bij )
In step S380, utilize I the 3rd value stored, calculate the pixel value product mean value of the second image block that each first image block is corresponding with described second intermediate image block in (I-m+1) individual first image block in described first intermediate image block successively.
Continue for 18 × 9 pixels in Fig. 2, by step S370-S380,18 the 3rd values can be obtained, and 10 pixel value product mean values can be obtained, 1st pixel value product mean value corresponds to first the first image block and first the second image block, 2nd pixel value product mean value corresponds to second the first image block and second the second image block, the like, the 10th pixel value product mean value corresponds to the tenth the first image block and the tenth the second image block.
For the correlation calculations application scenario of the first image and the second image, according to the image processing method 300 of the embodiment of the present invention, in step S390, for each first image block in (I-m+1) individual first image block in described first intermediate image block, the related coefficient according between its second image block corresponding with described second intermediate image block of following formulae discovery:
Corr = 1 m · J Σ i = l i = l + m - 1 MABi - ( 1 m · J Σ i = l i = l + m - 1 Ai ) · ( 1 m · J Σ i = l i = l + m - 1 Bi ) Σ i = l i = l + m - 1 Σ j = 1 j = J ( aij - 1 m · J Σ i = l i = l + m - 1 Ai ) 2 · Σ i = l i = l + m - 1 Σ j = 1 j = J ( bij - 1 m · J Σ i = l i = l + m - 1 Bi ) 2 . . . ( 2 )
Wherein, Ai is i-th the first value and represents the i-th row pixel value sum in described first intermediate image block, Bi is i-th the second value and represents the i-th row pixel value sum in described second intermediate image block, MABi is i-th the 3rd value and represents the sum of products of the i-th row product in described I × J product, aij represents the i-th row jth row pixel value in the first intermediate image block, bij represents the i-th row jth row pixel value in the second intermediate image block, wherein, l is the line number of the first row in described first intermediate image block of described first image block.
Particularly, calculate I Ai in step s 320, in step S330, calculate the pixel value mean value of (I-m+1) individual first image block in step S350, calculate I Bi, in step S360, calculate the pixel value mean value of (I-m+1) individual first image block in step S370, calculate I MABi, in step S380, calculate the pixel value product mean value of (I-m+1) individual image block
Concrete example is illustrated the advantage of the image processing method according to the embodiment of the present invention below.In example below, using the image block of 9 × 9 original pixels as comparison basis.
According to existing correlation calculations method, concrete with reference to the formula (1) in background technology part, need the pixel value mean value of calculating first image block (comprising the operation of 9 × 9-1=80 sub-addition and 1 divide operations), the pixel value mean value (comprising the operation of 9 × 9-1=80 sub-addition and 1 divide operations) of the second image block, the pixel value product mean value of the first image block and the second image block respective pixel (comprises 9 × 9=81 time multiply operation, 80 sub-addition operations, and 1 divide operations), the variance of the pixel value of the first image block will be calculated in addition, the variance of the pixel value of the second image block, the product of the variance of the variance of the pixel value of the first image block and the pixel value of the second image block, the product of the pixel value mean value of the first image block and the pixel value mean value of the second image block.Due to according in the image processing method of the embodiment of the present invention, also need the product of the pixel value mean value of the product of variance of the variance of the pixel value of calculating first image block, the variance of the pixel value of the second image block, the variance of the pixel value of the first image block and the pixel value of the second image block, the pixel value mean value of the first image block and the second image block, therefore below relatively in will omit this part comparison.
Then, by the first image block and the second image block respectively to lower translation a line, calculate the correlativity between the first image block after translation and the second image block again, still need the pixel value product mean value (comprising 9 × 9=81 time multiply operation, 80 sub-addition operation and 1 divide operations) of the pixel value mean value (comprising 80 sub-addition operation and 1 divide operations) of the pixel value mean value of calculating first image block (comprising 80 sub-addition operation and 1 divide operations), the second image block, the first image block and the second image block respective pixel.
That is, according to existing correlation calculations method, for individual the first adjacent image block of x, in the process of correlativity calculating each first image block and the second corresponding image block, need to carry out: for the operation that the first image is independent: the operation of 80 × x sub-addition and 1 × x=x time divide operations; For the operation that the second image is independent: the operation of 80 × x sub-addition and 1 × x=x time divide operations; Combination operation for the first image and the second image: 81 × x time multiply operation, the operation of 80 × x sub-addition and 1 × x time divide operations.
First example
In this first example, choose intermediate image block and comprise 10 × 9 pixels, namely intermediate image block comprises 10 row 9 row pixels.First image block and the second image block include 9 × 9 pixels.
According to the embodiment of the present invention, in step S320, perform the operation of 10 × 8=80 sub-addition, in step S330, perform the operation of 8 × 2=16 sub-addition and 2 divide operations, in step S350, perform the operation of 10 × 8=80 sub-addition, in step S360, perform the operation of 8 × 2=16 sub-addition and 2 divide operations, then in step S370, perform 10 × 9=90 time multiply operation and the operation of 10 × 8=80 sub-addition, in step S380, perform the operation of 8 × 2=16 sub-addition and 2 divide operations.
In other words, in this first example, need to perform: for the operation that the first image is independent: 96 sub-addition operation and 2 divide operations; For the operation that the second image is independent: 96 sub-addition operation and 2 divide operations; Combination operation for the first image and the second image: 90 multiply operations, 96 sub-additions operation and 2 divide operations.
In this first example, compare with the operation of second image block with first image block, 16 sub-addition operation and 1 divide operations are only increased in the first image-side, only increase 16 sub-addition operation and 1 divide operations in the second image-side, the combination operation for the first image and the second image only increases 9 multiply operations, 16 sub-addition operation and 1 divide operations.
But, according to existing correlation calculations method, for the second image block that 2 adjacent the first image blocks are adjacent with 2, then need to carry out: for the operation that the first image is independent: 80 × 2 sub-additions operation and 2 divide operations; For the operation that the second image is independent: 80 × 2 sub-addition operation and 2 divide operations; Combination operation for the first image and the second image: 81 × 2 multiply operations, 80 × 2 sub-additions operation and 2 divide operations.
Therefore, in this first example, according to the image processing method of the embodiment of the present invention compared with existing correlation calculations method, for the second image block that 2 adjacent the first image blocks are adjacent with 2, can reduce by 192 sub-additions operation and 72 multiply operations.Obviously, due to multiplexing part intermediate data, therefore can improve the level of resources utilization according to the image processing method of the embodiment of the present invention, improve the speed of image real time transfer.
Second example
In this second example, choose intermediate image block and comprise 12 × 9 pixels, namely intermediate image block comprises 12 row 9 row pixels.First image block and the second image block include 9 × 9 pixels.
According to the embodiment of the present invention, in step S320, perform the operation of 12 × 8=96 sub-addition, in step S330, perform the operation of 8 × 4=32 sub-addition and 4 divide operations, in step S350, perform the operation of 12 × 8=96 sub-addition, in step S360, perform the operation of 8 × 4=32 sub-addition and 4 divide operations, then in step S370, perform 12 × 9=108 time multiply operation and the operation of 12 × 8=96 sub-addition, in step S380, perform the operation of 8 × 4=32 sub-addition and 4 divide operations.
In other words, in this second example, need to perform: for the operation that the first image is independent: 128 sub-addition operation and 4 divide operations; For the operation that the second image is independent: 128 sub-addition operation and 4 divide operations; Combination operation for the first image and the second image: 108 multiply operations, 128 sub-additions operation and 4 divide operations.
But, according to existing correlation calculations method, for the second image block that 4 adjacent successively the first image blocks are adjacent successively with 4, then need to carry out: for the operation that the first image is independent: 80 × 4 sub-additions operation and 4 divide operations; For the operation that the second image is independent: 80 × 4 sub-addition operation and 4 divide operations; Combination operation for the first image and the second image: 81 × 4 multiply operations, 80 × 4 sub-additions operation and 4 divide operations.
Therefore, in this second example, according to the image processing method of the embodiment of the present invention compared with existing correlation calculations method, for the second image block that 4 adjacent successively the first image blocks are adjacent successively with 4, can reduce by 576 sub-additions operation and 216 multiply operations.Obviously, due to multiplexing more intermediate data, therefore can improve the level of resources utilization according to the image processing method of the embodiment of the present invention, improve the speed of image real time transfer.
3rd example
In this second example, choose intermediate image block and comprise 15 × 9 pixels, namely intermediate image block comprises 15 row 9 row pixels.First image block and the second image block include 9 × 9 pixels.
According to the embodiment of the present invention, in step S320, perform the operation of 15 × 8=120 sub-addition, in step S330, perform the operation of 8 × 7=56 sub-addition and 7 divide operations, in step S350, perform the operation of 15 × 8=120 sub-addition, in step S360, perform the operation of 8 × 7=56 sub-addition and 7 divide operations, then in step S370, perform 15 × 9=135 time multiply operation and the operation of 15 × 8=120 sub-addition, in step S380, perform the operation of 8 × 7=56 sub-addition and 7 divide operations.
In other words, in this second example, need to perform: for the operation that the first image is independent: 176 sub-addition operation and 7 divide operations; For the operation that the second image is independent: 176 sub-addition operation and 7 divide operations; Combination operation for the first image and the second image: 135 multiply operations, 176 sub-additions operation and 7 divide operations.
But, according to existing correlation calculations method, for the second image block that 7 adjacent successively the first image blocks are adjacent successively with 7, then need to carry out: for the operation that the first image is independent: 80 × 7 sub-additions operation and 7 divide operations; For the operation that the second image is independent: 80 × 7 sub-addition operation and 7 divide operations; Combination operation for the first image and the second image: 81 × 7 multiply operations, 80 × 7 sub-additions operation and 7 divide operations.
Therefore, in the 3rd example, according to the image processing method of the embodiment of the present invention compared with existing correlation calculations method, for the second image block that 4 adjacent the first image blocks are adjacent with 4, can reduce by 1152 sub-additions operation and 432 multiply operations.Obviously, due to multiplexing more intermediate data, therefore can improve the level of resources utilization according to the image processing method of the embodiment of the present invention, improve the speed of image real time transfer.
Obviously can find out from example above, along with the number of lines of pixels of intermediate image block increases, greatly reduce the calculated amount in computation process.Certainly, this needs to store more intermediate data.Therefore, good trading off can be there is between intermediate data storage amount and image processing speed, according to the device storage capacity of reality and the processing speed requirement of reality, suitably can select the size of intermediate image block.Should be appreciated that, the embodiment of the present invention is not by the restriction of the size of intermediate image block, in other words, the embodiment of the present invention can contain any suitable intermediate image block, as long as the pixel columns of intermediate image block and number of lines of pixels of intermediate image block identical with the pixel columns of the image block for correlation calculations is greater than the number of lines of pixels of the image block for correlation calculations.
For the first image in the horizontal direction or vertical direction translation obtain for this limiting case of the second image, especially applicable according to the image processing method of the embodiment of the present invention.
In the case, the first intermediate image block extracted in the first image and the second intermediate image block extracted in the second image not only have same size, but also can lay respectively at the first image and going together mutually in the second image.In addition, in the case, the first image block in the first image not only has same size with corresponding second image block in the second image, but also lays respectively at the first image and going together mutually in the second image.
Describe the image data processing system 400 according to the embodiment of the present invention below with reference to Fig. 4, the image data processing system 400 according to the embodiment of the present invention is applied to the first electronic equipment.
As shown in Figure 4, comprise according to the image data processing system 400 of the embodiment of the present invention: intermediate image block extracting parts 410, pixel value summation component 420 and image block are averaged parts 430.
Intermediate image block extracting parts 410 extracts the first intermediate image block in the first image, and described first image comprises M capable N row pixel, and described first intermediate image block comprises I capable J row pixel, wherein, and M >=I, N >=J.
Pixel value summation component 420 calculates the pixel value sum of often row pixel in described first intermediate image block, and stores I the first value.
Image block parts 430 of averaging utilize the I that stores the first value, calculate the pixel value mean value of each first image block in (I-m+1) individual first image block in described first intermediate image block successively, wherein said first image block comprises m capable J row pixel, wherein, I>m.
After the calculating completing the first image-side, described image data processing system 400 can carry out the calculating of the second image-side.
Described intermediate image block extracting parts 410 also extracts the second intermediate image block in the second image, and described second image and described first image have same size, and described first intermediate image block and described second intermediate image block have same size.
Described pixel value summation component 420 also calculates the pixel value sum of often row pixel in described second intermediate image block, and stores I the second value.
Described image block parts 430 of averaging also utilize the I that stores the second value, calculate the pixel value mean value of each second image block in (I-m+1) individual second image block in described second intermediate image block successively, wherein said first image block and described second image block have same size.
In addition, image data processing system 400 can also comprise: pixel dot product parts 440, dot product summation component 450 and image block dot product are averaged parts 460.
Pixel dot product parts 440 calculate the pixel value product of respective pixel in described first intermediate image block and described second intermediate image block, obtain I × J product.
Dot product summation component 450 calculates the sum of products of often row product in described I × J product, and stores I the 3rd value.
Image block dot product parts 460 of averaging utilize the I that stores the 3rd value, calculate the pixel value product mean value of the second image block that each first image block is corresponding with described second intermediate image block in (I-m+1) individual first image block in described first intermediate image block successively.
In addition, described image data processing system 400 can also comprise: Calculation of correlation factor parts 470.
Calculation of correlation factor parts 470, for each first image block in (I-m+1) individual first image block in described first intermediate image block, calculate the related coefficient between its second image block corresponding with described second intermediate image block according to formula (2) above.
Advantageously, described first intermediate image block lays respectively at the first image and going together mutually in the second image with described second intermediate image block, and described first image block lays respectively at the first image and going together mutually in the second image with described second image block.
According to image processing method and the device of the embodiment of the present invention, by extracting the first intermediate image block and the second intermediate image block that are greater than for the image block of correlation calculations respectively in the first image and the second image, the first and second extracted intermediate image blocks are carried out to data analysis calculating and preserve results of intermediate calculations, then results of intermediate calculations is used in the correlation calculations of multiple second image blocks included in multiple first image block included in described first intermediate image block and described second intermediate image block, thus realize the multiplexing of computational resource, improve resource utilization.
According to image processing method and the device of the embodiment of the present invention, by realizing favourable trading off between the memory capacity and computational resource consumption of storage unit, the multiplexing of computational resource can be realized, and then improve the utilization factor of computational resource.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add required hardware platform by means of software and realize, and can certainly all be implemented by software or hardware.Based on such understanding, what technical scheme of the present invention contributed to background technology can embody with the form of software product in whole or in part, this computer software product can be stored in storage medium, as ROM/RAM, disk, CD etc., comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform the method described in some part of each embodiment of the present invention or embodiment.
Each embodiment of the present invention is described in detail above.But, it should be appreciated by those skilled in the art that without departing from the principles and spirit of the present invention, various amendment can be carried out to these embodiments, combination or sub-portfolio, and such amendment should fall within the scope of the present invention.

Claims (10)

1. an image processing method, is applied to the first electronic equipment, comprises:
In the first image, extract the first intermediate image block, described first image comprises M capable N row pixel, and described first intermediate image block comprises I capable J row pixel, wherein, and M >=I, N >=J;
Calculate the pixel value sum of often row pixel in described first intermediate image block, and store I the first value;
Utilize I the first value stored, calculate the pixel value mean value of each first image block in (I-m+1) individual first image block in described first intermediate image block successively, wherein said first image block comprises m capable J row pixel, wherein, and I>m.
2. image processing method as claimed in claim 1, also comprises:
In the second image, extract the second intermediate image block, described second image and described first image have same size, and described first intermediate image block and described second intermediate image block have same size;
Calculate the pixel value sum of often row pixel in described second intermediate image block, and store I the second value;
Utilize I the second value stored, calculate the pixel value mean value of each second image block in (I-m+1) individual second image block in described second intermediate image block successively, wherein said first image block and described second image block have same size.
3. image processing method as claimed in claim 1, also comprises:
Calculate the pixel value product of respective pixel in described first intermediate image block and described second intermediate image block, obtain I × J product;
Calculate the sum of products of often row product in described I × J product, and store I the 3rd value; And
Utilize I the 3rd value stored, calculate the pixel value product mean value of the second image block that each first image block is corresponding with described second intermediate image block in (I-m+1) individual first image block in described first intermediate image block successively.
4. image processing method as claimed in claim 1, also comprise: for each first image block in (I-m+1) individual first image block in described first intermediate image block, the related coefficient according between its second image block corresponding with described second intermediate image block of following formulae discovery:
Corr = 1 m · J Σ i = l i = l + m - 1 MABi - ( 1 m · J Σ i = l i = l + m - 1 Ai ) · ( 1 m · J Σ i = l i = l + m - 1 Bi ) Σ i = l i = l + m - 1 Σ j = 1 j = J ( aij - 1 m · J Σ i = l i = l + m - 1 Ai ) 2 · Σ i = l i = l + m - 1 Σ j = 1 j = J ( bij - 1 m · J Σ i = l i = l + m - 1 Bi ) 2
Wherein, Ai is i-th the first value and represents the i-th row pixel value sum in described first intermediate image block, Bi is i-th the second value and represents the i-th row pixel value sum in described second intermediate image block, MABi is i-th the 3rd value and represents the sum of products of the i-th row product in described I × J product, aij represents the i-th row jth row pixel value in the first intermediate image block, bij represents the i-th row jth row pixel value in the second intermediate image block, wherein, l is the line number of the first row in described first intermediate image block of described first image block.
5. image processing method as claimed in claim 2, wherein, described first intermediate image block lays respectively at the first image and going together mutually in the second image with described second intermediate image block,
Described first image block lays respectively at the first image and going together mutually in the second image with described second image block.
6. an image data processing system, is applied to the first electronic equipment, comprises:
Intermediate image block extracting parts, for extracting the first intermediate image block in the first image, described first image comprises M capable N row pixel, and described first intermediate image block comprises I capable J row pixel, wherein, M >=I, N >=J;
Pixel value summation component, for calculating the pixel value sum of often row pixel in described first intermediate image block, and stores I the first value;
Image block is averaged parts, for utilizing stored I the first value, calculate the pixel value mean value of each first image block in (I-m+1) individual first image block in described first intermediate image block successively, wherein said first image block comprises m capable J row pixel, wherein, I>m.
7. image data processing system as claimed in claim 6, wherein,
Described intermediate image block extracting parts also for extracting the second intermediate image block in the second image, and described second image and described first image have same size, and described first intermediate image block and described second intermediate image block have same size;
Described pixel value summation component also for calculating the pixel value sum of often row pixel in described second intermediate image block, and stores I the second value;
Described image block averages parts also for utilizing stored I the second value, calculate the pixel value mean value of each second image block in (I-m+1) individual second image block in described second intermediate image block successively, wherein said first image block and described second image block have same size.
8. image data processing system as claimed in claim 6, also comprises:
Pixel dot product parts, for calculating the pixel value product of respective pixel in described first intermediate image block and described second intermediate image block, obtain I × J product;
Dot product summation component, for calculating the sum of products of often row product in described I × J product, and stores I the 3rd value; And
Image block dot product is averaged parts, for utilizing stored I the 3rd value, calculate the pixel value product mean value of the second image block that each first image block is corresponding with described second intermediate image block in (I-m+1) individual first image block in described first intermediate image block successively.
9. image data processing system as claimed in claim 6, also comprises:
Calculation of correlation factor parts, for each first image block in (I-m+1) individual first image block in described first intermediate image block, the related coefficient according between its second image block corresponding with described second intermediate image block of following formulae discovery:
Corr = 1 m · J Σ i = l i = l + m - 1 MABi - ( 1 m · J Σ i = l i = l + m - 1 Ai ) · ( 1 m · J Σ i = l i = l + m - 1 Bi ) Σ i = l i = l + m - 1 Σ j = 1 j = J ( aij - 1 m · J Σ i = l i = l + m - 1 Ai ) 2 · Σ i = l i = l + m - 1 Σ j = 1 j = J ( bij - 1 m · J Σ i = l i = l + m - 1 Bi ) 2
Wherein, Ai is i-th the first value and represents the i-th row pixel value sum in described first intermediate image block, Bi is i-th the second value and represents the i-th row pixel value sum in described second intermediate image block, MABi is i-th the 3rd value and represents the sum of products of the i-th row product in described I × J product, aij represents the i-th row jth row pixel value in the first intermediate image block, bij represents the i-th row jth row pixel value in the second intermediate image block, wherein, l is the line number of the first row in described first intermediate image block of described first image block.
10. image data processing system as claimed in claim 6, wherein, described first intermediate image block lays respectively at the first image and going together mutually in the second image with described second intermediate image block,
Described first image block lays respectively at the first image and going together mutually in the second image with described second image block.
CN201410253811.2A 2014-06-09 2014-06-09 Image processing method and device Active CN105335987B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410253811.2A CN105335987B (en) 2014-06-09 2014-06-09 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410253811.2A CN105335987B (en) 2014-06-09 2014-06-09 Image processing method and device

Publications (2)

Publication Number Publication Date
CN105335987A true CN105335987A (en) 2016-02-17
CN105335987B CN105335987B (en) 2018-03-27

Family

ID=55286492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410253811.2A Active CN105335987B (en) 2014-06-09 2014-06-09 Image processing method and device

Country Status (1)

Country Link
CN (1) CN105335987B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106296614A (en) * 2016-08-17 2017-01-04 北京集创北方科技股份有限公司 Image processing apparatus and image processing method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6285711B1 (en) * 1998-05-20 2001-09-04 Sharp Laboratories Of America, Inc. Block matching-based method for estimating motion fields and global affine motion parameters in digital video sequences
JP2002300383A (en) * 2001-03-30 2002-10-11 Ricoh Co Ltd Image processing device, image processing method, program allowing computer to execute the image processing method, and computer-readable recording medium with the program recorded
CN101290747A (en) * 2008-06-18 2008-10-22 北京工业大学 Image displaying method of electronic paper screen
CN103150710A (en) * 2013-03-25 2013-06-12 郑州轻工业学院 Rapid mean filtering method for image
CN103295022A (en) * 2012-02-24 2013-09-11 富泰华工业(深圳)有限公司 Image similarity calculation system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6285711B1 (en) * 1998-05-20 2001-09-04 Sharp Laboratories Of America, Inc. Block matching-based method for estimating motion fields and global affine motion parameters in digital video sequences
JP2002300383A (en) * 2001-03-30 2002-10-11 Ricoh Co Ltd Image processing device, image processing method, program allowing computer to execute the image processing method, and computer-readable recording medium with the program recorded
CN101290747A (en) * 2008-06-18 2008-10-22 北京工业大学 Image displaying method of electronic paper screen
CN103295022A (en) * 2012-02-24 2013-09-11 富泰华工业(深圳)有限公司 Image similarity calculation system and method
CN103150710A (en) * 2013-03-25 2013-06-12 郑州轻工业学院 Rapid mean filtering method for image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106296614A (en) * 2016-08-17 2017-01-04 北京集创北方科技股份有限公司 Image processing apparatus and image processing method
CN106296614B (en) * 2016-08-17 2019-12-13 北京集创北方科技股份有限公司 Image processing apparatus and image processing method

Also Published As

Publication number Publication date
CN105335987B (en) 2018-03-27

Similar Documents

Publication Publication Date Title
US11620513B2 (en) Computing convolutions using a neural network processor
US11620508B2 (en) Vector computation unit in a neural network processor
CN111553484B (en) Federal learning method, device and system
MX2019011548A (en) Method and apparatus for processing transaction requests.
US10832034B2 (en) Facial image generating method, facial image generating apparatus, and facial image generating device
CN110580324B (en) Image matrix operation method and device, computer equipment and storage medium
CN102737237A (en) Face image dimension reducing method based on local correlation preserving
Mirzaee et al. Numerical solution for three-dimensional nonlinear mixed Volterra–Fredholm integral equations via three-dimensional block-pulse functions
CN102567950A (en) Image scaling method and system
Cheng et al. Improved delay-dependent stability criteria for continuous system with two additive time-varying delay components
CN103647973B (en) A kind of method and apparatus of frame per second up-sampling
CN114897711A (en) Method, device and equipment for processing images in video and storage medium
CN105335987A (en) Image data processing method and apparatus
KR101582578B1 (en) Apparatus and methdo for processing graphic
EP3232403A3 (en) Fast multi-spectral image registration by modeling platform motion
EP3096308A1 (en) Element replication device, element replication method, and program
CN104902260B (en) The acquisition methods and system of a kind of image parallactic
US8908986B1 (en) Systems and methods for selecting ink colors
Smirlis et al. Relaxing the impact of extreme units in data envelopment analysis
KR101428028B1 (en) Apparatus and method for steganography, apparatus and method for data restoration
JP7039171B2 (en) Image processing equipment, object detection method and object detection program
CN112712461B (en) Image deconvolution processing method and device and terminal equipment
CN107480102B (en) PSF inverse transformation method based on parallel L U decomposition
Höhnerbach et al. Optimization of the AIREBO Many-Body Potential on KNL
JP2011086148A (en) Calculation device, calculation method, and calculation program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant