CN103024404A - Method and device for processing image rotation - Google Patents
Method and device for processing image rotation Download PDFInfo
- Publication number
- CN103024404A CN103024404A CN2011102855867A CN201110285586A CN103024404A CN 103024404 A CN103024404 A CN 103024404A CN 2011102855867 A CN2011102855867 A CN 2011102855867A CN 201110285586 A CN201110285586 A CN 201110285586A CN 103024404 A CN103024404 A CN 103024404A
- Authority
- CN
- China
- Prior art keywords
- image
- rotation
- data
- module
- images
- 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
Abstract
The invention relates to a method and a device for processing image rotation. The method is suitable for receiving a plurality of compressed images. The method comprises the following steps of: sequentially executing decompression on the plurality of blocks of each compressed image, so as to generate a plurality of first images corresponding to the blocks at first; and then separating each of the first images into brightness data, first chromaticity data and second chromaticity data; looking up a rotation angle corresponding table, and rotating the brightness data, the first chromaticity data and the second chromaticity data respectively, so as to generate the rotated brightness data, the rotated first chromaticity data and the rotated second chromaticity data; and combining the rotated brightness data, the rotated first chromaticity data and the rotated second chromaticity data into second images, and sequentially arraying the second images to generate the rotated images.
Description
Technical field
The present invention relates to a kind of method and apparatus of processing the image rotation, relate in particular to a kind of method and apparatus of in decompression process, processing the image rotation.
Background technology
General digital camera or digital code camera after taking pictures or making video recording, the processing that often need to be rotated image.Fig. 1 is a kind of method flow diagram that produces the rear image of rotation in carrying out decompression process, please refer to Fig. 1.At first as described in the step S110, beginning to carry out when decompressing, adopt the image compression standard respectively to each most blocks (band) of compressing image sequentially carry out decompression.Then, in step S120, each decompression image-zooming is become suitable size.At last, as described in step S130, with the image behind the convergent-divergent via CPU (Central Processing Unit, CPU) computing, be rotated the relative position of rear image in memory to find out, according to this relative position the data in the memory are moved again, to finish the action of image rotating.
Among the step S120 of above-mentioned flow process, normally image is dwindled, carry out computing via CPU again, but because the image computation reduction after dwindling.Yet, if the user wishes to watch complete image size, but not through the size behind the convergent-divergent, with present existing image size (for example being 14Mb), CPU is rotated computing to complete image size, needs quite huge operand and too consuming time.
In addition, if the decompression image is YCbCr 420 or YCbCr 422 format images, because Y component data and Cb, the special data array of Cr component data, if therefore directly be rotated with the YCbCr format image, its computational complexity is quite high, and the relative position of image in memory is too discrete after the rotation, causes the data-moving action in can't speeds up memory.Accordingly, reduced the usefulness that the image rotation is processed.
Summary of the invention
In view of this, the invention provides a kind of method and apparatus of processing image rotation, by image is separated into first brightness and chroma data, and the processing that utilizes lookup table mode to do to rotate, to promote the usefulness of image processing.
From a viewpoint, the present invention proposes a kind of method of processing the image rotation, is suitable for receiving most compressing images, and the method comprises the following steps.Adopt first the image compression standard respectively to each most blocks of compressing image sequentially carry out decompression, to produce most the first images of corresponding these blocks.And each first image is separated into brightness data, the first chroma data and the second chroma data.Table look-up according to the corresponding table of the anglec of rotation again, rotate respectively brightness data, the first chroma data and the second chroma data, to produce postrotational brightness, the first colourity and the second chroma data.And postrotational brightness, the first colourity and the second chroma data are merged into the second image, and each second image sequentially arranged to use produce image after the rotation.
In one embodiment of this invention, the corresponding relation of the corresponding table record anglec of rotation of the above-mentioned anglec of rotation and direct memory access (DMA) (Direct Memory Access, DMA) position.
In one embodiment of this invention, the method for above-mentioned processing image rotation also comprises image after the above-mentioned rotation is zoomed in or out, and adjusts rear image to produce.
In one embodiment of this invention, the first above-mentioned image and the second image are YCbCr 420 format images or YCbCr 422 format images.
In one embodiment of this invention, above-mentioned brightness data is the Y component data, and the first above-mentioned chroma data and the second chroma data are Cb component data and Cr component data.
In one embodiment of this invention, above-mentioned image compression standard adopts associating image expert group (Joint Photographic Experts Group, JPEG) compression standard.
From another viewpoint, the present invention proposes a kind of device of processing the image rotation, is suitable for receiving most compressing images, and this device comprises image compression module, separation module, rotating module and merges module.Wherein, the image compression module adopt the image compression standard respectively to each most blocks of compressing image sequentially carry out decompression, to produce most the first images of corresponding these blocks.Separate module and couple the image compression module, each first image is separated into brightness data, the first chroma data and the second chroma data.Rotating module couples the separation module, tables look-up according to the corresponding table of the anglec of rotation, rotates respectively brightness data, the first chroma data and the second chroma data, uses producing postrotational brightness, the first colourity and the second chroma data.Merge module and couple rotating module, postrotational brightness, the first colourity and the second chroma data are merged into the second image, merge module and each second image sequentially arranged to use and produce the rear image of rotation.
In one embodiment of this invention, above-mentioned rotating module is set up the corresponding table of the anglec of rotation, wherein the corresponding relation of the corresponding table record anglec of rotation of the anglec of rotation and direct memory access (DMA) position.
In one embodiment of this invention, the device of above-mentioned processing image rotation also comprises and couples the adjusted size module that merges module, and image zoomed in or out after the adjusted size module was combined the rotation that module produces, with produce adjust after image.
In one embodiment of this invention, the first above-mentioned image and those the second images are YCbCr420 format image or YCbCr 422 format images.
In one embodiment of this invention, above-mentioned brightness data is the Y component data, and the first chroma data and the second chroma data are Cb component data and Cr component data.
In one embodiment of this invention, the image compression standard that adopts of above-mentioned image compression module is associating image expert group compression standard.
Based on above-mentioned, the method and apparatus of processing image rotation provided by the present invention is by image being divided into most blocks, and sequentially the image with each block is separated into brightness and chroma data, the mode that utilization is tabled look-up is rotated respectively brightness and chroma data, more postrotational brightness and chroma data is merged to produce the rear image of rotation at last.Accordingly, can increase the usefulness that the image rotation is processed.
For above-mentioned feature and advantage of the present invention can be become apparent, embodiment cited below particularly, and cooperate institute's accompanying drawing to be described in detail below.
Description of drawings
Fig. 1 is a kind of method flow diagram that produces the rear image of rotation in carrying out decompression process.
Fig. 2 is the calcspar according to the device of the shown processing image rotation of one embodiment of the invention.
Fig. 3 is according to the shown a kind of method flow diagram of processing the image rotation of one embodiment of the invention.
Fig. 4 is the schematic diagram of carrying out rotation according to the shown image subarea of one embodiment of the invention.
Fig. 5 is the calcspar according to the device of the shown processing image rotation of another embodiment of the present invention.
Fig. 6 is according to the shown a kind of method flow diagram of processing the image rotation of another embodiment of the present invention.
The main element symbol description:
200,500: the device of processing the image rotation
210: the image compression module
220: separate module
230: rotating module
240: merge module
410_1~410_N: the first image
411,411 ': the Y component data
412,412 ': the Cb component data
413,413 ': the Cr component data
420_1~420_N: the second image
S110~S130: each step that produces the method for the rear image of rotation
S310~S340: each step of the method for the processing image rotation of one embodiment of the invention
S610~S650: each step of the method for the processing image rotation of another embodiment of the present invention
Embodiment
Fig. 2 is the calcspar according to the device of the shown processing image rotation of one embodiment of the invention.Please refer to Fig. 2, the device 200 of the processing image of the present embodiment rotation for example is intelligent mobile phone with IPF of digital camera, slr camera, video recorder or other, panel computer etc., is not limited to above-mentioned.The device 200 of processing image rotation is suitable for receiving most compressing images, comprises image compression module 210, separation module 220, rotating module 230 and merges module 240.Its function is described below:
Fig. 3 is according to the shown a kind of method flow diagram of processing the image rotation of one embodiment of the invention.Please refer to Fig. 3, the method for the present embodiment is applicable to the device 200 of the processing image rotation of Fig. 2, below namely arrange in pairs or groups each module explanation the present embodiment among Fig. 2 process the detailed step of the method for image rotation:
At first as described in the step S310, image compression module 210 adopt the image compression standards respectively to each most blocks of compressing image sequentially carry out decompression, to produce most the first images of corresponding these blocks.In the present embodiment, the image compression standard for example is associating image expert group compression standard.210 pairs of image compression modules are to adopt partitioned mode when compressing image has decompressed, for example per 256 are listed as and are divided into a block in the compressing image.Fig. 4 is the schematic diagram of carrying out rotation according to the shown image subarea of one embodiment of the invention.Below please cooperate simultaneously with reference to Fig. 2, Fig. 3 and Fig. 4, one compressing image can be divided into N block, 210 pairs of N blocks of image compression module rear generation N first image 410_1~410_N that decompresses respectively, N first image 410_1~410_N can be YCbCr 420 or YCbCr 422 format images.YCbCr 420 format images mean Cb chromatic component and Cr chromatic component and respectively only have the sampling rate of half in level and vertical direction; YCbCr 422 format images mean the Cb chromatic component and the Cr chromatic component has the same vertical sampling rate, but horizontal sampling rate only has half.
Then as described in the step S320, separate module 220 and sequentially N first image 410_1~410_N is separated into brightness data, the first chroma data and the second chroma data.As shown in Figure 4, the first image 410_1 is YCbCr 420 or YCbCr 422 format images, therefore in the present embodiment, the first image 410_1 can be divided into Y component data 411, Cb component data 412 and Cr component data 413.
Next, in step S330, rotating module 230 is set up the corresponding table of the anglec of rotation, wherein the corresponding relation of the corresponding table record anglec of rotation of the anglec of rotation and direct memory access (DMA) (Direct Memory Access, DMA) position.In the present embodiment, table look-up according to the corresponding table of the anglec of rotation, rotating module 230 can rotate respectively Y component data 411, Cb component data 412 and Cr component data 413, to produce postrotational Y component data 411 ', postrotational Cb component data 412 ' and postrotational Cr component data 413 '.
At last, in step S340, merge module 240 and postrotational Y component data 411 ', postrotational Cb component data 412 ' are merged into the second image 420_1 with postrotational Cr component data 413 ', and remaining second image 420_2~420_N is sequentially arranged to produce image after the complete rotation.Because second image 420_1~420_N after merging is subregion orderly, therefore, after the second image 420_1 is aligned to corresponding memory data position, remaining second image 420_2~420_N is as long as sequentially arrange in order, do not need to do computing more, so can avoid such as the too discrete problem of the relative position of image in memory after the rotation as described in the prior art.
Tool the above, the present invention is that the YCbCr format image is separated into first other brightness, chromatic component data carrying out image when rotation, is not directly to carry out computing and do rotation with the YCbCr format image as described in prior art.Therefore, the present invention utilizes other brightness, chromatic component data to be rotated, and can greatly reduce computational complexity.In addition, the present invention utilizes rotating module to set up in advance the corresponding table of the anglec of rotation, and the mode that foundation is tabled look-up is found out image through the relative position in memory after rotating, each pixel is through the relative position in memory after rotating in the image compared to calculating with software fully, and the method and apparatus arithmetic speed of processing image rotation provided by the present invention is very fast.
The example that below really can implement according to this as the present invention for an embodiment in addition.Fig. 5 is the calcspar according to the device of the shown processing image rotation of another embodiment of the present invention.In the present embodiment, process the device 500 of image rotation except comprising image compression module 210, separation module 220, rotating module 230 and merging the module 240, also comprise adjusted size module 550.Wherein, adjusted size module 550 is coupled to and merges module 240.Adjusted size module 550 also can be the functional module that hardware is realized, in order to image is zoomed in or out.Because each module in the device 200 of the device 500 of processing image rotation and processing image rotation shown in Figure 2 has same or analogous function, therefore remaining module does not repeat them here.
Fig. 6 is according to the shown a kind of method flow diagram of processing the image rotation of another embodiment of the present invention.Below the function mode of the device 500 of processing the image rotation will be described with Fig. 6.Please be simultaneously with reference to Fig. 5 and Fig. 6.
Should be noted that at this, because such as the described method of prior art, because excessive by the operand of software calculating image rotation, therefore must be before image be rotated, the micreikonic action of contracting is with computation reduction.But because the present invention adopts rotating module to set up the method for tabling look-up, therefore can save operand, not need that before image is rotated image is carried out convergent-divergent and process.Adjusted size module 550 is for additional function, in order to before image output, can be adjusted to suitable image size according to user's demand, in order to play and view and admire.
Tested the test of usefulness by Fig. 5 and embodiment shown in Figure 6, when the testing image size was 4288 * 3216, its test result was as follows:
The time of separating the required cost of module 220 its work of execution is about 148 milliseconds (ms); The time that rotating module 230 is carried out the required cost of its work is about 472ms; The time that merges the required cost of module 240 its work of execution is about 191ms; The time that adjusted size module 550 is carried out the required cost of its work is about 251ms; And the time that the flow process of finishing whole image rotation consumes is about 1067ms.
Relatively, utilize as described in Figure 1 method flow to test the test of usefulness, the testing image size is similarly at 4288 * 3216 o'clock, finishes the time that the flow process of whole image rotation consumes to be about 4034ms.Accordingly, the method and apparatus of processing image rotation provided by the present invention can promote the usefulness of image processing really.
In sum, the method and apparatus of processing image rotation provided by the present invention is by image being divided into most blocks, and sequentially the image with each block is separated into brightness and chroma data, utilize the mode of hardware consulting table that brightness and chroma data are rotated respectively, more postrotational brightness and chroma data are merged to produce the rear image of rotation at last.The present invention adopts software and hardware to merge the mode of using, increase the usefulness that the image rotation is processed, except can avoiding using the software computing to cause operand excessive fully, the problem that the processing time is excessively of a specified duration also can be avoided using the hardware computing fully and the problem that causes high cost.
Although the present invention discloses as above with embodiment; but it is not to limit the present invention; any the technical staff in the technical field; without departing from the spirit and scope of the present invention; when doing suitable change and equal the replacement, therefore protection scope of the present invention should be as the criterion with the scope that the application's claim is defined.
Claims (12)
1. a method of processing the image rotation is suitable for receiving most compressing images, it is characterized in that, comprising:
Adopt an image compression standard respectively to respectively this most blocks of compressing image sequentially carry out decompression, to produce most the first images of corresponding those blocks;
Respectively this first image is separated into a brightness data, one first chroma data and one second chroma data;
Table look-up according to the corresponding table of an anglec of rotation, rotate respectively this brightness data, this first chroma data and this second chroma data, to produce postrotational this brightness, this first colourity and this second chroma data; And
Postrotational this brightness, this first colourity and this second chroma data are merged into one second image, and will be respectively this second image sequentially arrange to use and produce image after the rotation.
2. the method for processing image according to claim 1 rotation, the wherein corresponding relation of the corresponding table record anglec of rotation of this anglec of rotation and direct memory access (DMA) position.
3. the method for processing image according to claim 1 rotation also comprises:
Image after this rotation is zoomed in or out, adjust rear image to produce one.
4. the method for processing image according to claim 1 rotation, wherein those first images and those the second images are YCbCr 420 format images or YCbCr 422 format images.
5. the method for processing image according to claim 4 rotation, wherein this brightness data is the Y component data, this first chroma data and this second chroma data are Cb component data and Cr component data.
6. the method for processing image according to claim 1 rotation, wherein this image compression standard adopts associating image expert group compression standard.
7. a device of processing the image rotation is suitable for receiving most compressing images, it is characterized in that, comprising:
One image compression module, adopt an image compression standard respectively to respectively this most blocks of compressing image sequentially carry out decompression, to produce most the first images of corresponding those blocks;
One separates module, couples this image compression module, and respectively this first image is separated into a brightness data, one first chroma data and one second chroma data;
One rotating module, couple this separation module, table look-up according to the corresponding table of an anglec of rotation, rotate respectively this brightness data, this first chroma data and this second chroma data and be rotated, to produce postrotational this brightness, this first colourity and this second chroma data; And
One merges module, couples this rotating module, and postrotational this brightness, this first colourity and this second chroma data are merged into one second image, merge module and respectively this second image sequentially arrange to use and produce one and rotate rear image.
8. the device of processing image according to claim 7 rotation, wherein:
This rotating module is set up the corresponding table of this anglec of rotation, wherein the corresponding relation of the corresponding table record anglec of rotation of this anglec of rotation and direct memory access (DMA) position.
9. the device of processing image according to claim 7 rotation also comprises:
One adjusted size module couples this merging module, and this adjusted size module zooms in or out the rear image of this rotation that this merging module produces, and adjusts rear image to produce one.
10. the device of processing image according to claim 7 rotation, wherein:
Those first images and those the second images are YCbCr 420 format images or YCbCr 422 format images.
11. the device of processing image rotation according to claim 10, wherein:
This brightness data is the Y component data, and this first chroma data and this second chroma data are Cb component data and Cr component data.
12. the device of processing image rotation according to claim 7, wherein:
This image compression standard that this image compression module adopts is associating image expert group compression standard.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102855867A CN103024404A (en) | 2011-09-23 | 2011-09-23 | Method and device for processing image rotation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102855867A CN103024404A (en) | 2011-09-23 | 2011-09-23 | Method and device for processing image rotation |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103024404A true CN103024404A (en) | 2013-04-03 |
Family
ID=47972476
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011102855867A Pending CN103024404A (en) | 2011-09-23 | 2011-09-23 | Method and device for processing image rotation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103024404A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000322566A (en) * | 1999-05-06 | 2000-11-24 | Canon Inc | Image display device and its controlling method |
US6407746B1 (en) * | 1997-08-18 | 2002-06-18 | Fuji Photo Film Co., Ltd. | Image processing method for high speed display based on rotation of different kinds of data including reduced data and apparatus for the same |
CN101056416A (en) * | 2006-04-12 | 2007-10-17 | 智易科技股份有限公司 | Image color space transforming method |
CN101080698A (en) * | 2004-12-20 | 2007-11-28 | 辉达公司 | Real-time display post-processing using programmable hardware |
US20080297532A1 (en) * | 2007-05-30 | 2008-12-04 | Microsoft Corporation | Rotation and scaling optimization for mobile devices |
CN101630403A (en) * | 2009-07-31 | 2010-01-20 | 卓望数码技术(深圳)有限公司 | Picture rotation implementation method and picture rotation implementation device |
US20100104221A1 (en) * | 2008-10-29 | 2010-04-29 | Clifford Yeung | Method and system for frame rotation within a jpeg compressed pipeline |
-
2011
- 2011-09-23 CN CN2011102855867A patent/CN103024404A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6407746B1 (en) * | 1997-08-18 | 2002-06-18 | Fuji Photo Film Co., Ltd. | Image processing method for high speed display based on rotation of different kinds of data including reduced data and apparatus for the same |
JP2000322566A (en) * | 1999-05-06 | 2000-11-24 | Canon Inc | Image display device and its controlling method |
CN101080698A (en) * | 2004-12-20 | 2007-11-28 | 辉达公司 | Real-time display post-processing using programmable hardware |
CN101056416A (en) * | 2006-04-12 | 2007-10-17 | 智易科技股份有限公司 | Image color space transforming method |
US20080297532A1 (en) * | 2007-05-30 | 2008-12-04 | Microsoft Corporation | Rotation and scaling optimization for mobile devices |
US20100104221A1 (en) * | 2008-10-29 | 2010-04-29 | Clifford Yeung | Method and system for frame rotation within a jpeg compressed pipeline |
CN101630403A (en) * | 2009-07-31 | 2010-01-20 | 卓望数码技术(深圳)有限公司 | Picture rotation implementation method and picture rotation implementation device |
Non-Patent Citations (1)
Title |
---|
常传文,茅文深: "DM642上利用DMA和CACHE优化内存存取实例", 《现代电子技术》, no. 22, 31 December 2007 (2007-12-31), pages 145 - 147 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI593275B (en) | Adaptive linear luma domain video pipeline architecture, system and machine readable medium | |
CN108848354B (en) | VR content camera system and working method thereof | |
CN111475675B (en) | Video processing system | |
CN103841326B (en) | Video recording method and device | |
CN103269416A (en) | Device and method for achieving video image tiled display by adoption of parallel processing mode | |
US8798386B2 (en) | Method and system for processing image data on a per tile basis in an image sensor pipeline | |
WO2017048427A1 (en) | Automatic perspective control using vanishing points | |
US7701466B2 (en) | Method and system for providing accelerated video processing in a communication device | |
JP2014179083A (en) | Electronic device for processing image and method for operating the same | |
US20110279702A1 (en) | Method and System for Providing a Programmable and Flexible Image Sensor Pipeline for Multiple Input Patterns | |
US20130308014A1 (en) | Moving-image capturing apparatus and electronic zoom method for moving image | |
US20080292216A1 (en) | Method and system for processing images using variable size tiles | |
WO2023010755A1 (en) | Hdr video conversion method and apparatus, and device and computer storage medium | |
CN105554375A (en) | Method and device of video preview in digital video recorder | |
US20110157465A1 (en) | Look up table update method | |
US11057587B2 (en) | Compositing video signals and stripping composite video signal | |
WO2014164618A1 (en) | Device and method for processing video content | |
CN103024404A (en) | Method and device for processing image rotation | |
US20100053326A1 (en) | Image sensor, the operating method and usage thereof | |
CN203243467U (en) | Apparatus of realizing tiled display of video images by using parallel processing | |
CN103200310B (en) | Mobile terminal interface adjusting method, mobile terminal interface adjusting device and mobile terminal | |
CN105427235A (en) | Image browsing method and system | |
TW202301266A (en) | Method and system of automatic content-dependent image processing algorithm selection | |
TWI493502B (en) | Processing method for image rotating and apparatus thereof | |
US8693774B2 (en) | Image accessing apparatus and image data transmission method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C05 | Deemed withdrawal (patent law before 1993) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20130403 |