CN103578078A - Image rotation VLSI structure based on CORDIC algorithm - Google Patents
Image rotation VLSI structure based on CORDIC algorithm Download PDFInfo
- Publication number
- CN103578078A CN103578078A CN201210264488.XA CN201210264488A CN103578078A CN 103578078 A CN103578078 A CN 103578078A CN 201210264488 A CN201210264488 A CN 201210264488A CN 103578078 A CN103578078 A CN 103578078A
- Authority
- CN
- China
- Prior art keywords
- unit
- cordic
- coordinate
- image rotation
- algorithm
- 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
Images
Landscapes
- Image Processing (AREA)
Abstract
The invention belongs to the field of VLSI structure design and provides an image rotation VLSI structure based on the CORDIC algorithm. According to the image rotation VLSI structure based on the CORDIC algorithm, new coordinates generated after an original image is rotated by a certain angle are calculated through the CORDIC algorithm, and the pixel value of the image with the new coordinates is calculated through the bilinear interpolation algorithm. By the adoption of the image rotation VLSI structure based on the CORDIC algorithm, only shifting operation and addition and subtraction operation are applied, a hardware structure of the CORDIC algorithm is designed through a 13-level flow line, and the problem that a traditional CORDIC algorithm is too long in key time sequence and too low in speed due to the fact that multiply operation is applied is solved. According to the image rotation VLSI structure based on the CORDIC algorithm, a two-level flow line is used for achieving the hardware structure of the bilinear interpolation algorithm; a CORDIC unit, a storage unit and a bilinear interpolation unit are made to matched with one another through a control unit, so that rotation of the image is achieved. Compared with an existing image rotation hardware implementation method, the image rotation VLSI structure based on the CORDIC algorithm has the advantages of being small in area, high in speed, and effectively applicable to real-time image rotation operation.
Description
Affiliated technical field
The invention belongs to VLSI (very large scale integrated circuit) (VLSI) structural design field, be specifically related to a kind of image rotation VLSI structure based on cordic algorithm.
Background technology
Image rotation is a step very important in Digital Image Processing, and it is widely used in medical image identification, Robotics, the fields such as bar-code identification.In image rotation, speed and precision are two the most key factors of evaluate image rotary unit quality.
Present most widely used image rotating method is all realized based on software.Because software is order run time version, speed is slower, is difficult to adapt to the requirement of high-precision image processing and realtime graphic processing.So realize image rotation by hardware configuration, become a kind of demand.A plurality of unit of hardware parallel processing, can effectively improve image processing speed.
Mainly contain now three kinds of hardware and realize the method for image rotation.The look-up table (LUTs) that the image rotating method that the first is traditional is used multiplier and comprises trigonometric function is realized.Owing to having used more multiplier, adopt the image rotating system complex structure of realizing in this way, precision is low, and speed is slow, is difficult to adapt to the application of modern image handle.Second method is decomposed rotation matrix, by a series of mathematic(al) manipulation, realizes image rotation.The third method adopts CORDIC (the coordinate rotational digital computer, coordinate rotation digital computer) algorithm to realize image rotation.Cordic algorithm is for calculating the loop iteration algorithm of some conventional fundamental operation functions and arithmetical operation, and its basic thought is to approach with a series of special angle rotations the angle that vector needs rotation.
The earliest cordic algorithm being applied to image rotation hardware in realizing is Ghosh and Majumdar.They have designed a asic chip, and a two field picture is resolved into several windows, then by parallel and pipeline organization, rotate concurrently each window and realize image rotation.Suchitra has also proposed a kind of Rotation Algorithm based on window of novelty in his paper, and this algorithm has higher throughput.Image rotation algorithm based on window is understood introducing portion distortion in the image after rotating through unavoidablely, and this is intolerable for the electronic product of more and more focusing on user's experience.Bright and the Zheng Xueren of Li Jie has proposed a kind of hardware implementation structure of the image rotation based on cordic algorithm, but they still do not solve cordic algorithm finally need to carry out with multiplier the problem of mould correction.
Summary of the invention
The image rotation VLSI structure based on cordic algorithm that the present invention proposes a kind of novelty, this structure can reduce the area of chip when hardware is realized, and the operating rate of chip is provided, and gives full play to the speed advantage of the parallel and streamline of hardware.
Image rotation VLSI structure based on cordic algorithm provided by the invention, is characterized in that: it comprises frequency unit CORDIC unit, address-generation unit, data preparatory unit, bilinear interpolation unit and data storage cell.
Frequency unit carries out 6 frequency divisions by major clock.
CORDIC unit is for calculating the new coordinate after rotating through by the coordinate of input according to the angle gauge of input.
Address-generation unit is for generation of the address of new pixel and the coordinate that needs new images pixel.
Data preparatory unit receives the integral part of the new coordinate of CORDIC unit output, and according to the integral part of new coordinate, obtains the pixel value of its four adjacent pixels, exports to bilinear interpolation unit.
Bilinear interpolation unit receives the value of four pixels of data preparatory unit output and the fraction part of the new coordinate of CORDIC unit output, calculates thus the pixel value of the coordinate points that makes new advances.
Data storage cell is divided into two parts.First storage by camera collection to raw data, the pixel value of second portion stores processor pixel later.
The present invention generally coordinates and gathers the camera of use and can show that the LCD of image is used together.Camera collection is to after data, and system stores data in data storage cell.Then by one, use signal to tell image rotation circuit to start working.After address-generation unit receives enable signal, by counter, start to produce successively the coordinate of new images and the memory address of the pixel of new images in data storage cell.The coordinate of new images and the anglec of rotation are delivered in CORDIC unit, and CORDIC is used unit 8 level production lines to be rotated coordinate.Every one-level is rotated arctan2 clockwise or counterclockwise by coordinate
-(i-1)degree (i refers to i level production line).After using 8 level production lines to rotation of coordinate, running accuracy can reach 0.4476 degree, can meet actual requirement.After rotation of coordinate, the mould that has changed vector due to basic rotation is long, so need to be multiplied by a mould correction coefficient
revise mould long, k (n) is the function of a convergence.When n is tending towards infinity, k (n) levels off to a fixed value (0.60725).The one-piece construction that directly direct implementation of additional multiplier makes script be comprised of shift unit and totalizer pipeline organization after becomes irregular, and simultaneous processing takies large resource very and can reduce the throughput of whole streamline.In the present invention, by k (n) is carried out to factorization, changed into displacement and signed magnitude arithmetic(al), finally use 5 level production lines to substitute mould and proofread and correct multiplication, further reduced hardware complexity, make one-piece construction rule unified, be conducive to hardware and realize.
By being shifted and adding reducing, calculate new coordinate corresponding to the coordinate in original image, this coordinate includes integral part and fraction part.Data preparatory unit is exported to by integral part in CORDIC unit, data preparatory unit calculates the coordinate of four points that this coordinate is adjacent, and from data memory module, read the pixel value of these four coordinates, then these four pixel values are passed to bilinear interpolation unit.
Bilinear interpolation unit receives four pixel values of data preparatory unit output and the coordinate fraction part of CORDIC unit output, and calculates thus the pixel value of the coordinate that makes new advances, and deposits in data storage cell.
After the pixel value of all new coordinates has all calculated and has been stored in data storage cell, piece image completes rotation.The present invention's following advantage of having compared with other digital image rotation methods:
(1) adopt devices at full hardware to realize.Image rotation VLSI structure based on cordic algorithm can realize very easily and adopt ASIC (Application Specific Integrated Circuit) to realize on FPGA.
(2) introduce pipeline organization, improved the speed of whole system.In CORDIC unit, designed 8 level production lines and realized rotation of coordinate, then designed 5 level production lines and substituted mould correction multiplication.In bilinear interpolation unit, design two level production lines, saved multiplier, improved throughput.
(3) by address-generation unit, data preparatory unit and frequency unit, make systematic unity work, there will not be sequential mistake.
Accompanying drawing explanation
Fig. 1 is the image rotation VLSI general structure schematic diagram based on cordic algorithm
Fig. 2 is the pipeline organization of CORDIC unit
Fig. 3 is bilinear interpolation algorithm schematic diagram
Fig. 4 is the pipeline organization of bilinear interpolation unit
Embodiment
(1) address-generation unit
Address-generation unit has adopted counter to produce successively the coordinate rotating through in rear new images, is then sent to CORDIC unit and finds corresponding to the coordinate in original image.
(2) CORDIC unit
Need the angle of rotation will be sent to CORDIC unit with the coordinate that need to be rotated.In CORDIC unit, designed 8 level production lines and realized rotation of coordinate, then designed 5 level production lines and substituted mould correction multiplication, altogether 13 level production lines.The pipeline organization of CORDIC unit is as shown in accompanying drawing Fig. 2.In CORDIC unit, first the coordinate figure of input is moved to left to 4, by low 4 fraction parts that expand to coordinate.If the coordinate of input is (x, y), (x ', y ') be the respective coordinates in original image.(x, y) with the corresponding relation of (x ', y ') is so:
x′=cosθ(x+ytanθ) (1)
y′=cosθ(y-xtanθ)
Make θ equal arctan2-i (i is integer), tan θ=2
-i,
make k=cos θ, formula (1) becomes:
x′=k(x+y2
-i)
(2)
y′=k(y-x2
-i)
We can only calculate special angle (arctan2 through type (2)
-i) rotational coordinates.Want the arbitrarily angled coordinate position later of computed image rotation, we can decompose angle θ, allow it can be by the angle [alpha] of a series of decomposition
icarry out linear expression:
θ=δ
1α
1+δ
2α
2+...+δ
nα
n (3)
δ wherein
i=± 1, α
i=arctan2
-(i-1).
δ
ithe direction of the each rotation of representative.Another z
i=θ
i-θ
i-1, have: z
i=z
i-1-δ
iα
i
By several times iteration, rotate like this, can very accurately obtain the new coordinate after rotation of coordinate.
x
i=k
i(x
i-1+δ
i2
-iy
i-1)
y
i=k
i(y
i-1-δ
i2
-ix
i-1) (4)
z
i=z
i-1-δ
iα
i
Formula (4) is exactly the basic rotation formula of cordic algorithm.Can find out that cordic algorithm is comprised of a series of simple displacements and add operation.It is actually a kind of rotation of coordinate method of successively approaching, each rotation all make cumulative anglec of rotation sum and target rotation angle more approaching.Iterations n is larger, and the angle of rotation is just more approaching with angle really.
In CORDIC unit, we have introduced variable z
ijudge the direction of every level production line rotation.Every level production line is only shifted and adds reducing coordinate, in the end needs to be multiplied by mould correction factor
k (n) is the function of a convergence.When n is tending towards infinity, k (n) levels off to a fixed value (0.60725).In the present invention, k (n) has been carried out to factorization, obtained
Like this, mould is proofreaied and correct multiplication and is just changed displacement and signed magnitude arithmetic(al) into, finally uses 5 level production lines to substitute mould and proofreaies and correct multiplication, has further reduced hardware complexity, makes one-piece construction rule unified, is conducive to hardware and realizes.
(3) data preparatory unit
The coordinate that CORDIC unit obtains is a floating number.The coordinate of asking for after rotating through need to carry out bilinear interpolation corresponding to the pixel value in original image.Carry out bilinear interpolation and need to know the pixel value of coordinate the most contiguous 4 points in original image of trying to achieve CORDIC unit.Data preparatory unit is exactly that the coordinate figure that will produce according to CORDIC unit is tried to achieve this four pixel values.
First data preparatory unit extracts the integral part of input coordinate, is made as (x, y).The coordinate of the most contiguous four points of input coordinate is respectively (x, y), (x, y+1), (x+1, y), (x+1, y+1).Data preparatory unit is searched this four corresponding pixel values of point in data storage cell, is then passed to bilinear interpolation unit and carries out interpolation operation.
(4) bilinear interpolation unit
Being input as from the fraction part of four pixel values and the CORDIC unit output coordinate of data preparatory unit output of bilinear interpolation unit.As shown in accompanying drawing Fig. 3, P (x ', y ') is the coordinate of CORDIC output, four some A that are adjacent, and B, C, the pixel value of D is exported by data preparatory unit, and we can obtain by the pixel value of these four somes the pixel value of P (x ', y ') point.The formula of bilinear interpolation is suc as formula shown in (5):
f
x1=f
A(1-dx)+f
Bdx
f
x2=f
c(1-dx)+f
ddx (6)
f
p=f
x1(1-dy)+f
x2dy
Wherein, f
a, f
b, f
c, f
d, f
x1, f
x2and f
prespectively A, B, C, D, X1, the pixel value that X2 and P are ordered.For formula (6), we can realize by two level production lines, need through multiplication and a sub-addition on every level production line.Concrete structure is as shown in accompanying drawing Fig. 4.It should be noted that fraction part dx, dy integer representation.1-dx, 1-dy need to be to 1 alignment that moves to left accordingly to meet figure place.The pixel value finally obtaining need to carry out moving to right of corresponding figure place, finally obtains the pixel value that P is ordered, and is deposited in data storage cell.
Claims (4)
1. the image rotation VLSI structure based on cordic algorithm, it is characterized in that: it comprises frequency unit (1), CORDIC unit (2), address-generation unit (3), data preparatory unit (4), bilinear interpolation unit (5), data storage cell (6); Frequency unit (1) carries out six frequency divisions by input clock, and frequency division clock is later exported to CORDIC unit (2), address-generation unit (3) and bilinear interpolation unit (5); CORDIC unit (2) receives coordinate and the anglec of rotation, and the coordinate after rotating through is exported to data preparatory unit (4); Address-generation unit (3) produces the coordinate of the image after rotating through successively; Data preparatory unit (4), according to the coordinate of CORDIC unit (2) input, is found out that and is put the pixel value of adjacent four points and export to bilinear interpolation unit (5); Bilinear interpolation unit (5) is tried to achieve the pixel value of respective coordinates and deposits in data storage cell (6) according to the pixel value of four points of the coordinate of CORDIC unit (2) output and data preparatory unit (4) output.
2. according to the described image rotation VLSI structure based on cordic algorithm of claim 1, be further characterized in that CORDIC unit (2) adopts 8 grades of displacement addition streamlines to be rotated coordinate, and then with 5 grades of displacement addition streamlines, the value after rotating through is carried out to mould correction, altogether use the streamline of 13 grades of only guarantee replacement displacement and additions to complete cordic algorithm, can be by image rotation to arbitrarily angled, precision is 0.4476 degree.
3. according to the described image rotation VLSI structure based on cordic algorithm of claim 1, be further characterized in that data preparatory unit (4) adopts finite state machine to realize, adopt six states ask for the pixel value of four the most contiguous points of current coordinate and export to respectively bilinear interpolation unit (5).
4. according to the described image rotation VLSI structure based on cordic algorithm of claim 1, be further characterized in that bilinear interpolation unit (5) adopts two level production lines to realize, and improves the speed of system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210264488.XA CN103578078A (en) | 2012-07-30 | 2012-07-30 | Image rotation VLSI structure based on CORDIC algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210264488.XA CN103578078A (en) | 2012-07-30 | 2012-07-30 | Image rotation VLSI structure based on CORDIC algorithm |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103578078A true CN103578078A (en) | 2014-02-12 |
Family
ID=50049804
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210264488.XA Pending CN103578078A (en) | 2012-07-30 | 2012-07-30 | Image rotation VLSI structure based on CORDIC algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103578078A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107102841A (en) * | 2017-04-06 | 2017-08-29 | 上海晟矽微电子股份有限公司 | A kind of coordinate transform parallel calculating method and device |
-
2012
- 2012-07-30 CN CN201210264488.XA patent/CN103578078A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107102841A (en) * | 2017-04-06 | 2017-08-29 | 上海晟矽微电子股份有限公司 | A kind of coordinate transform parallel calculating method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109062540B (en) | Reconfigurable floating point operation device based on CORDIC algorithm | |
CN102662628B (en) | Instruction optimization processor for RSA encryption algorithm | |
KR20110015026A (en) | Sine/cosine generator | |
US20080208945A1 (en) | Method to compute an approximation to the reciprocal of the square root of a floating point number in ieee format | |
CN104375802A (en) | Multiplication and division device and operational method | |
CN108733349B (en) | Trigonometric function operation circuit based on fixed point number | |
CN111443893A (en) | N-time root calculation device and method based on CORDIC algorithm | |
Mopuri et al. | Low-complexity methodology for complex square-root computation | |
CN111813372B (en) | Method and device for realizing 32-bit integer division with high precision and low time delay | |
TWI420807B (en) | An arbitrary frequency shifter in communication systems | |
CN102799412A (en) | CORDIC (coordinate rotation digital computer) accelerator based on parallel pipeline design | |
JP2016062404A (en) | Arithmetic processing method and arithmetic processor | |
US20110004645A1 (en) | Apparatus and program for arctangent calculation | |
CN111666064B (en) | Trigonometric function loop iteration solving method and device based on CORDIC | |
CN103578078A (en) | Image rotation VLSI structure based on CORDIC algorithm | |
JP5733379B2 (en) | Processor and calculation method | |
Liu et al. | Implementation on FPGA for CORDIC-based Computation of Arcsine and Arccosine | |
CN107657078B (en) | Ultrasonic phased array floating point focusing transmission implementation method based on FPGA | |
CN208834289U (en) | A kind of trigonometric computing circuit | |
CN102789446A (en) | DDS (Direct Digital Synthesizer) signal spurious suppression method and system on basis of CORDIC (Coordinated Rotation Digital Computer) algorithm | |
CN103713878B (en) | A kind of method that sine and cosine cordic algorithm applying complement method realizes at FPGA | |
CN115659110A (en) | Trigonometric function calculation method, device, equipment and storage medium | |
CN107256140A (en) | Realize the method and apparatus based on hardware-accelerated non-standard floating number algorithm for reconstructing | |
CN204143432U (en) | A kind of multiplier-divider | |
Li et al. | Modified CORDIC algorithm and its implementation based on FPGA |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140212 |