CN109767390A - A kind of digital picture of block parallel disappears image rotation method - Google Patents
A kind of digital picture of block parallel disappears image rotation method Download PDFInfo
- Publication number
- CN109767390A CN109767390A CN201910035151.3A CN201910035151A CN109767390A CN 109767390 A CN109767390 A CN 109767390A CN 201910035151 A CN201910035151 A CN 201910035151A CN 109767390 A CN109767390 A CN 109767390A
- Authority
- CN
- China
- Prior art keywords
- image
- disappears
- digital picture
- rotation
- block parallel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Image Processing (AREA)
Abstract
Disappear image rotation method the invention discloses a kind of digital picture of block parallel, comprising the following steps: (1) obtain image rotation parameter and the image rotation parameter that disappears;(2) image data is read in;(3) piecemeal processing is carried out to image;(4) inverse transformation is carried out to image, calculates the color value of image;(5) target image is exported.Using method of the invention, the pixel color of the image after reverse rotation is calculated by using bilinear interpolation method, while running multiple tasks, block parallel processing is carried out to image, while obtaining preferable picture quality, the degree of parallelism of algorithm is improved, greatly reduces the execution time of algorithm.
Description
Technical field
The present invention relates to computer digital image processing technology fields more particularly to a kind of digital picture of block parallel to disappear
Image rotation method.
Background technique
In embedded display control program, it is sometimes desirable to show external video signal in terminal device, such as to ring
The observation, monitoring or tracking of target in border.The carries platforms such as vehicle, hull locating for the equipment are moved in non-at the uniform velocity non-directional
When, the roll motion of video capture device module will cause optical system and image device with respect to the movement of carry platform, thus
Cause the rotation of image.For the ease of image is preferably observed and handled, need to carry out collected original image
Reverse rotation transformation, restores the stable state of image.
Summary of the invention
In view of this, disappearing image rotation method the object of the present invention is to provide a kind of digital picture of block parallel, it can
Eliminate the rotates effe of image at a high speed under embedded system.
To achieve the above object, the technical solution adopted by the present invention are as follows:
A kind of digital picture of block parallel disappears image rotation method, comprising the following steps:
S1: obtaining the rotation parameter of described image, calculates the image rotation parameter that disappears, the rotation parameter includes rotation center point
Set P0(x0, y0) and the rotation angle, θ that calculates counterclockwise, the image rotation parameter that disappears includes rotary middle point position P0
(x0, y0) and reverse rotation angle [alpha];
S2: described image data are read in;
S3: start several image rotation processing tasks that disappear and piecemeal processing is carried out to described image, obtain image subblock;
S4: converting described image sub-block, and calculates the color value of described image;
S5: it obtains target image and exports the target image.
Preferably, in the step S1, α=- θ.
Preferably, described image data are read from video capture device, are stored in DRAM after video decodes.
Preferably, the step S3 method particularly includes:
Described image: being divided into N equal portions and M equal portions by S31 in the x-direction and the z-direction, obtains N × M image
Block;
S32: the starting N × M image rotations that disappear handle task, and each task handles an image subblock.
Preferably, an inverse transformation for rotation is transformed in the step S4.
Preferably, the step S4 method particularly includes:
S41: each of point-by-point processing image subblock pixel P (u, v), and point P (u, v) is calculated by reverse rotation α
The coordinate of corresponding point P ' (x, y) after angle;
S42: obtain point P ' (x, y) adjacent to four points pixel color value, the coordinate of four points be respectively as follows: (nx,
Ny), (nx+1, ny), (nx, ny+1), (nx+1, ny+1), wherein nx=(int) x, ny=(int) y;
S43: calculating the color value of point P ' (x, y), which is the color value of point P (u, v).
Preferably, the coordinate calculation formula of step S41 midpoint P ' (x, y) are as follows:
Preferably, the midpoint step S43 color value is calculated using bilinear interpolation.
Preferably, the calculation formula of the midpoint step S43 color value are as follows:
Color=(1-dx) * (1-dy) * GetColor (nx, ny)+dx* (1-dy) * GetColor (nx+1, ny)
+dy*(1-dx)*GetColr(nx,ny+1)+dx*dy*GetColor(nx+1,ny+1)
In formula, nx=(int) x, ny=(int) y, dx=x-nx, dy=y-ny, color is color value, GetColor
(x, y) is the function for extracting color.
Benefit of the invention is that: the pixel color of the image after reverse rotation is calculated using bilinear interpolation method,
And the characteristic of multiple tasks can be run simultaneously using processor in embedded display control program, image is subjected to block parallel
Processing, while obtaining preferable picture quality, improves the degree of parallelism of algorithm, greatly reduces the execution time of algorithm.
Detailed description of the invention
Fig. 1 is flow chart of the invention;
Fig. 2 is present invention pixel point reverse rotation schematic diagram;
Fig. 3 is bilinear interpolation schematic illustration of the present invention.
Specific embodiment
A kind of digital picture of block parallel disappears image rotation method, as shown in Figure 1, comprising the following steps:
S1: obtaining image rotation parameter, calculates the image rotation parameter that disappears
Firstly, obtaining the rotation parameter of video capture device, including rotary middle point position P0 by rotation detection device
(x0, y0), the rotation angle, θ calculated counterclockwise.
Disappear image rotation parameter, including rotary middle point position P secondly, image is calculated0With reverse rotation angle [alpha], wherein α
=-θ, rotary middle point position is constant or P0(x0, y0)。
S2: source image data is read in
Source image data is read from video capture device, is stored in DRAM after video decodes.
S3: the multiple image rotation processing tasks that disappear of starting carry out piecemeal processing to source images
(1) source images are divided into N equal portions and M equal portions, a total of N × M image in the x-direction and the z-direction
Block.Assuming that the size of target image is W × H, the then image-region that image subblock B (n, m) is covered are as follows:
(2) the starting N × M image rotation processing tasks that disappear, each task handle an image subblock.
S4: target image is obtained by carrying out inverse transformation to image subblock in the image rotation processing task that disappears
(1) each of image subblock pixel is handled point by point, it is assumed that pixel coordinate is P (u, v), then point P passes through derotation
The coordinate turned after α angle in source images is P ' (x, y), as shown in Fig. 2, its calculation method is as shown in Equation 1:
(2) pixel color value of source images midpoint P ' (x, y) neighbouring four points is obtained.The wherein coordinate difference of this four points
Are as follows: (nx, ny), (nx+1, ny), (nx, ny+1), (nx+1, ny+1), wherein nx is the integer part of x, and ny is the integer of y
Part.
(3) color value of source images midpoint P ' (x, y) is calculated using bilinear interpolation, which is exactly target image
The color value of midpoint P (u, v), as shown in figure 3, its calculation method is as shown in Equation 2:
F (x, y)=(1-dx)(1-dy) f (nx, ny)
+dx(1-dy) f (nx+1, ny)
+dy(1-dx) ∫ (nx, π y+1)
+dxdyf(nx+ 1, ny+1), (2)
In formula, nx=(int) x, ny=(int) y, dx=x-nx, dy=y-ny, f (x, y) represent color function
In this example, it is assumed that the color value obtained is color, GetColor (x, y) is the function for extracting color, then
Formula 2 can indicate shown in an accepted way of doing sth 3:
Color=(1-dx) * (1-dy) * GetColor (nx, ny)+dx* (1-dy) * GetColor (nx+1, ny)
+dy*(1-dx)*GetColr(nx,ny+1)+dx*dy*GetColor(nx+1,ny+1)(3)
S5: output target image
By the display address of the data of the target image being calculated write-in display device, for display device by target image
It shows.
The pixel color of the image after reverse rotation is calculated using bilinear interpolation method by the present invention, and utilizes embedded
Processor can run the characteristic of multiple tasks simultaneously in display control program, by image carry out block parallel processing, obtain compared with
While the picture quality got well, the degree of parallelism of algorithm is improved, the execution time of algorithm is greatly reduced.
Claims (9)
- A kind of image rotation method 1. digital picture of block parallel disappears, which comprises the following steps:S1: obtaining the rotation parameter of described image, calculates the image rotation parameter that disappears, the rotation parameter includes rotary middle point position P0 (x0, y0) and the rotation angle, θ that calculates counterclockwise, the image rotation parameter that disappears includes rotary middle point position P0(x0, y0) With reverse rotation angle [alpha];S2: described image data are read in;S3: start several image rotation processing tasks that disappear and piecemeal processing is carried out to described image, obtain image subblock;S4: converting described image sub-block, and calculates the color value of described image;S5: it obtains target image and exports the target image.
- The image rotation method 2. a kind of digital picture of block parallel according to claim 1 disappears, which is characterized in that the step In S1, α=- θ.
- The image rotation method 3. a kind of digital picture of block parallel according to claim 1 disappears, which is characterized in that described image Data are read from video capture device, are stored in DRAM after video decodes.
- The image rotation method 4. a kind of digital picture of block parallel according to claim 1 disappears, which is characterized in that the step S3's method particularly includes:Described image: being divided into N equal portions and M equal portions by S31 in the x-direction and the z-direction, obtains N × M image subblock;S32: the starting N × M image rotations that disappear handle task, and each task handles an image subblock.
- The image rotation method 5. a kind of digital picture of block parallel according to claim 1 disappears, which is characterized in that the step An inverse transformation for rotation is transformed in S4.
- The image rotation method 6. a kind of digital picture of block parallel according to claim 1 disappears, which is characterized in that the step S4's method particularly includes:S41: each of point-by-point processing image subblock pixel P (u, v), and point P (u, v) is calculated by reverse rotation α angle The coordinate of corresponding point P ' (x, y) afterwards;S42: obtain point P ' (x, y) adjacent to four points pixel color value, the coordinate of four points be respectively as follows: (nx, ny), (nx+1, ny), (nx, ny+1), (nx+1, ny+1), wherein nx=(int) x, ny=(int) y;S43: calculating the color value of point P ' (x, y), which is the color value of point P (u, v).
- The image rotation method 7. a kind of digital picture of block parallel according to claim 6 disappears, which is characterized in that the step The coordinate calculation formula of the midpoint S41 P ' (x, y) are as follows:
- The image rotation method 8. a kind of digital picture of block parallel according to claim 6 disappears, which is characterized in that the step The midpoint S43 P ' (x, y) color value is calculated using bilinear interpolation.
- The image rotation method 9. a kind of digital picture of block parallel according to claim 6 disappears, which is characterized in that the step The calculation formula of the midpoint S43 P ' (x, y) color value are as follows:Color=(1-dx) * (1-dy) * GetColor (nx, ny)+dx* (1-dy) * GetColor (nx+1, ny)+dy*(1-dx)*GetColr(nx,ny+1)+dx*dy*GetColor(nx+1,ny+1)In formula, nx=(int) x, ny=(int) y, dx=x-nx, dy=y-ny, color is color value, GetColor (x, y) For the function for extracting color.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910035151.3A CN109767390B (en) | 2019-01-15 | 2019-01-15 | Digital image racemization method for block parallel |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910035151.3A CN109767390B (en) | 2019-01-15 | 2019-01-15 | Digital image racemization method for block parallel |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109767390A true CN109767390A (en) | 2019-05-17 |
CN109767390B CN109767390B (en) | 2023-04-25 |
Family
ID=66454014
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910035151.3A Active CN109767390B (en) | 2019-01-15 | 2019-01-15 | Digital image racemization method for block parallel |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109767390B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112601030A (en) * | 2020-12-09 | 2021-04-02 | 航天科工火箭技术有限公司 | Electronic image rotation eliminating method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000011166A (en) * | 1998-06-24 | 2000-01-14 | Sony Corp | Device and method for processing image and providing medium |
CN1426022A (en) * | 2002-12-31 | 2003-06-25 | 中国科学院上海技术物理研究所 | Method for eliminating image rotation caused by 45 degree scanning lens |
CN1632829A (en) * | 2004-12-27 | 2005-06-29 | 北京中星微电子有限公司 | A method for implementing image zoom |
-
2019
- 2019-01-15 CN CN201910035151.3A patent/CN109767390B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000011166A (en) * | 1998-06-24 | 2000-01-14 | Sony Corp | Device and method for processing image and providing medium |
CN1426022A (en) * | 2002-12-31 | 2003-06-25 | 中国科学院上海技术物理研究所 | Method for eliminating image rotation caused by 45 degree scanning lens |
CN1632829A (en) * | 2004-12-27 | 2005-06-29 | 北京中星微电子有限公司 | A method for implementing image zoom |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112601030A (en) * | 2020-12-09 | 2021-04-02 | 航天科工火箭技术有限公司 | Electronic image rotation eliminating method and device |
Also Published As
Publication number | Publication date |
---|---|
CN109767390B (en) | 2023-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10887519B2 (en) | Method, system and apparatus for stabilising frames of a captured video sequence | |
CN111145238B (en) | Three-dimensional reconstruction method and device for monocular endoscopic image and terminal equipment | |
JP6330987B2 (en) | Image processing apparatus, image processing method, and storage medium | |
US10594941B2 (en) | Method and device of image processing and camera | |
WO2019105044A1 (en) | Method and system for lens distortion correction and feature extraction | |
JP2018125038A (en) | Signal processing devices and methods for estimating transformation between signals | |
TWI637355B (en) | Methods of compressing a texture image and image data processing system and methods of generating a 360-degree panoramic video thereof | |
US10121262B2 (en) | Method, system and apparatus for determining alignment data | |
US8368768B2 (en) | Image processing apparatus, image processing method, and program | |
JP2013009050A (en) | Image processing apparatus and image processing method | |
JP2007129709A (en) | Method for calibrating imaging device, method for calibrating imaging system including arrangement of imaging devices, and imaging system | |
US20200160560A1 (en) | Method, system and apparatus for stabilising frames of a captured video sequence | |
CN112396640A (en) | Image registration method and device, electronic equipment and storage medium | |
JP2008217526A (en) | Image processor, image processing program, and image processing method | |
CN112419372A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
US11196929B2 (en) | Signal processing device, imaging device, and signal processing method | |
CN108961182B (en) | Vertical direction vanishing point detection method and video correction method for video image | |
CN109767390A (en) | A kind of digital picture of block parallel disappears image rotation method | |
CN111583329B (en) | Augmented reality glasses display method and device, electronic equipment and storage medium | |
Arif et al. | Resampling air borne sensed data using bilinear interpolation algorithm | |
Vandewalle et al. | Double resolution from a set of aliased images | |
US11974042B2 (en) | Signal processing device and signal processing method | |
CN114549613A (en) | Structural displacement measuring method and device based on deep super-resolution network | |
JP2011182040A (en) | Method of compressing data for image processing, and compressor and imaging apparatus including the same | |
CN114049404B (en) | Method and device for calibrating internal phase and external phase of vehicle |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |