Seamless image processing method and apparatus
A seamless image processing apparatus and method, the apparatus includes a first storage unit, storing original image data, the original image data including lines arranged in a vertical direction and pixels arranged in each of the lines in a horizontal direction, and a signal processing unit receiving blocks, in which the original image data stored in the first storage unit is divided, based on a digital memory access and performing image processing on each of the blocks of each of the lines using main data and first and second overlap data so that no seams are generated at a boundary between adjacent blocks. Accordingly, image processing is performed on a current block using data resulting from image processing performed on the previous block and image data included in the next block. Thus, seams between adjacent blocks do not appear.
Latest Samsung Electronics Patents:
- Multi-device integration with hearable for managing hearing disorders
- Display device
- Electronic device for performing conditional handover and method of operating the same
- Display device and method of manufacturing display device
- Device and method for supporting federated network slicing amongst PLMN operators in wireless communication system
This application claims the benefit of Korean Patent Application No. 2003-46319, filed on Jul. 9, 2003, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference.
BACKGROUND OF THE INVENTION1. Field of the Invention
The present invention relates to an image forming system, and more particularly, to an image processing method and apparatus in which large image data is divided into a predetermined number of blocks and image processing is performed on the divided blocks producing a visually contiguous image without seams between adjacent blocks.
2. Description of the Related Art
In image processing apparatuses, if an original image stored in an external memory has many pixels in a horizontal or vertical direction, it is impossible to store image data corresponding to a single horizontal or vertical line of the original image in a local memory having a restricted capacity. Hence, the original image is divided into blocks in the horizontal or vertical direction, and the divided blocks are stored in the local memory and undergo image processing. Examples of the image processing include image processing that uses only an interest pixel, such as, color transformation, enlargement/reduction, or noise removal, and image processing that uses a neighborhood around an interest pixel, such as, masking, error diffusion, or segmentation/enhancement. The image processing that uses only an interest pixel does not cause a problem relating to a seam between adjacent blocks. However, the image processing that uses a neighborhood around an interest pixel may cause a seam problem.
For example, when N×N masking is performed using blocks of N pixels in the horizontal direction by N pixels in the vertical direction that include an interest pixel, if the interest pixel is located near the boundary between adjacent blocks, an image obtained by the N×N masking includes a seam between the adjacent blocks. In other words, if the interest pixel is on a left side of the boundary between adjacent blocks, upper, lower, and right pixel values of the interest pixel can be obtained from a local memory, but a left pixel value cannot. If the interest pixel is on a right side of the boundary between adjacent blocks, upper, lower, and left pixel values can be obtained from the local memory, but a right pixel value cannot. Hence, an image resulting from the masking is not natural and appears unpleasant to the eye at the boundary between the adjacent blocks.
Also, in the case of error diffusion in which an output value of an interest pixel is calculated using an accumulated error value, an interest pixel included in a block and located near the boundary between the block and a neighboring block cannot refer to information regarding pixels included in the neighboring block. Thus, a seam is generated between adjacent blocks, and an image obtained by the result of error diffusion is not natural and appears unpleasant to the eye.
SUMMARY OF THE INVENTIONThe present invention provides an image processing method and an image processing apparatus, in which image data having many pixels in a horizontal or vertical direction is divided into a predetermined number of blocks and image processing is performed on the divided blocks using a local memory with a restricted capacity, producing a visually contiguous image without seams between adjacent blocks.
According to an aspect of the present invention, there is provided a seamless image processing apparatus including a first storage unit, storing original image data, having lines arranged in a vertical direction and blocks arranged in each of the lines in a horizontal direction; and a signal processing unit, receiving the blocks, into which the original image data stored in the first storage unit is divided, based on a digital memory access and performs image processing on each of the blocks of each of the lines using main data and first and second overlap data so that no seams are generated at a boundary between adjacent blocks.
According to another aspect of the present invention, the signal processing unit includes a second storage unit, storing the main data and the first and second overlap data of a current block; a digital memory access controller, which controls transmission of data between the first and second storage units; an image processor, which performs image processing using the original image data and the first and second overlap data stored in the second storage unit; a third storage unit, which stores data resulting from image processing performed on the current block by the image processor as the first overlap data for performing image processing on a next block; and an overlap controller, dividing the second storage unit into a plurality of areas and controlling the digital memory access controller and the image processor so that image data is transmitted from the first and third storage units to the areas of the second storage unit.
According to another aspect of the present invention, the signal processing unit includes a second storage unit, storing the main data, the first and second overlap data of a current block, and data resulting from image processing on the current block; a digital memory access controller, controlling transmission of data between the first and second storage units; an image processor using the original image data and the first and second overlap data stored in the second storage unit to generate first overlap data for performing image processing on a next block; and an overlap controller dividing the second storage unit into a plurality of areas and controlling the digital memory access controller and the image processor so that image data is transmitted from the first storage unit to the areas of the second storage unit.
According to another aspect of the present invention, there is provided a seamless image processing method including determining a transmission size based on a digital memory access and an overlap data size; dividing original image data into N blocks according to the transmission size and the overlap data size and storing main data, first and second overlap data, and data resulting from image processing on a block-by-block basis, wherein the main data, the first and second overlap data, and the data resulting from image processing correspond to each of the blocks of each of the lines; and performing image processing on a current block and generating first overlap data for a next block.
According to another aspect of the present invention, the operation of dividing the original image data into N blocks includes loading main data of the current block among the original image data and loading at least one of the first and second overlap data depending on the location of the current block in each of the lines.
According to another aspect of the present invention, the loading of the at least one of the first and second overlap data includes loading second overlap data located close to the current block from the next block if the current block is the first block; loading first overlap data located close to the current block among data resulting from image processing on the previous block and second overlap data located close to the current block among the data included in the next block, if the current block is one of second through (N−1)th blocks; and loading first overlap data located close to the current block among the data resulting from image processing on the previous block if the current block is the N-th block.
Additional aspects and/or advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
BRIEF DESCRIPTION OF THE DRAWINGSThe above and/or other features and advantages of the present invention will become more apparent and more readily appreciated by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:
Reference will now be made in detail to the embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. The embodiments are described below to explain the present invention by referring to the figures.
Referring to
The image processor 140, which is a DSP, performs image processing, such as masking, segmentation/enhancement, or error diffusion, on a pixel-by-pixel basis using main data and first and second overlap data stored in the second storage unit 120. Processed data resulting from the image processing performed on the main data of a current block by the image processor 140 is transmitted to a next stage (not shown). Data located in a predetermined region of the processed data of the current block is stored in the third storage unit 150 and used as the first overlap data when the next block is image-processed.
The overlap controller 160 determines a DMA-based transmission size and an overlap size and sets a plurality of addresses in the second storage unit 120 for storing the main data and the first and second overlap data based on the determined DMA-based transmission size and the determined overlap size. The DMA-based transmission size is determined according to the capacity of the second storage unit 120, and the overlap size is determined according to the type of image processing performed by the image processor 140. If the image processor 140 performs 5×5 masking, the overlap size corresponds to two pixels. If original image data is divided into N blocks based on the DMA-based transmission size, the overlap controller 160 controls the image processor 140 so that data resulting from image processing on a previous block, which is stored in the third storage unit 150, is stored as the first overlap data in the set addresses of the second storage unit 120. Also, the overlap controller 160 transmits a transmission start command to the DMA controller 130 so that the main data in the current block in each line and the second overlap data in a next block are transmitted from the first storage unit 110 to the second storage unit 120 on a block-by-block basis in a predetermined sequence. Transmission start commands for the N blocks in each line are sequentially transmitted, and each is transmitted at a moment when the image processor 140 finishes image processing of a previous block on a given line, with a first block of a line being transmitted when image processing on a last block of a previous line is finished.
Referring to
The second block B2 is processed using three types of data, namely, first overlap data 321, main data 320, and second overlap data 322. The first overlap data 321 resulting from image processing of the first block B1 is located near the boundary between the first and second blocks B1 and B2. The second overlap data 322 is included in the third block B3 and located near the boundary between the second and third blocks B2 and B3. In other words, pixels among main data of each of the second through (N−1)th blocks B2 through BN−1 that are adjacent to a previous block are processed using first overlap data and necessary temporary data. Pixels among main data of each of the second through (N−1)th blocks B2 through BN−1 that are adjacent to a subsequent block are processed using second overlap data and necessary temporary data.
The N-th block BN is processed using first overlap data 351 and main data 350. The first overlap data 351 is located at the boundary between the (N−1)th and N-th blocks BN−1 and BN among data resulting from image processing on the (N−1)th blocks BN−1. In other words, pixels adjacent to the (N−1)th block BN−1 among the main data 350 of the N-th block BN are processed using the first overlap data 351 and necessary temporary data.
First, second, and third areas 521, 522, and 523 are allocated for the second block B2. The first area 521 stores data B1
Also, first, second, and third areas 531, 532, and 533 are allocated for the N-th block BN. The first area 531 stores data B(N−1)
Referring to
The image processor 640 performs image processing on a pixel-by-pixel basis using the main data and first and second overlap data stored in the second storage unit 620. Processed data resulting from the image processing performed on the main data of the current block by the image processor 640 is transmitted to a next stage (not shown). Processed, data located adjacent to the next block is stored in a predetermined area of the second storage unit 620 and used as first overlap data when the next block is image-processed.
The overlap controller 650 determines a DMA-based transmission size and an overlap size. According to the determined DMA-based transmission size and the determined overlap size, the overlap controller 650 sets a plurality of addresses in the second storage unit 620 for storing main data, first and second overlap data, and data resulting from image processing. If original image data is divided into N blocks based on the DMA-based transmission size, the overlap controller 650 controls the image processor 640 so that the processed data resulting from image processing performed on a previous block, which is stored in the second storage unit 620, is stored as first overlap data in a predetermined area of the second storage unit 620. Also, the overlap controller 650 transmits a transmission start command to the DMA controller 630 so that the main data of the current block in each line and second overlap data in the next block are transmitted from the first storage unit 610 to the second storage unit 620 on a block-by-block basis in a predetermined sequence.
First, second, third, and fourth areas 821, 822, 823, and 824 are allocated to the second block B2. The first area 821 stores data B1
Also, first, second, third, and fourth areas 831, 832, 833, and 834 are allocated for the N-th block BN . The first area 831 stores data B(N−1)
In operation 913, it is determined whether the block loaded in operation 912 is the first block. If the loaded block is the first block, the method proceeds to operation 915. On the other hand, if the loaded block is not the first block, the method proceeds to operation 914, in which the first overlap data is loaded from the fourth area 714 of the second storage unit 620 or from the third storage unit 150 and stored in the first area 411 or 711 of the second storage unit 120 or 620. Thereafter, the method proceeds to operation 915.
In operation 915, it is determined whether the block loaded in operation 912 is the last block. If the loaded block is the last block, the method ends. On the other hand, if the loaded block is not the last block, the method proceeds to operation 916, in which the second overlap data is loaded from the first storage unit 110 or 610 and stored in the third area 413 or 713 of the second storage unit 120 or 620. Thereafter, the method ends.
The above-described exemplary embodiments of the present invention can also be embodied as computer readable codes written on a computer readable recording medium. The computer readable recording medium is any data storage device that can store data which can be read by a computer. Examples of the computer readable recording medium include read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, optical data storage devices, and so on. Also, the computer readable codes can be transmitted via a carrier wave, such as data transmission through the Internet. The computer readable recording medium can also be distributed over network coupled computers so that the computer readable code is stored and executed in a distributed fashion. Also, functional programs, codes, and code segments for accomplishing the present invention can be easily construed by programmers skilled in the art to which the present invention pertains.
According to the present invention, image processing is performed on a current block using data stored in a small-capacity, high-speed memory for example, data resulting from image processing performed on the previous block and image data included in the next block. Hence, when original image data is divided into blocks, and image processing is performed on the divided blocks, seams between adjacent blocks do not appear.
While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention as defined by the following claims.
Claims
1. A seamless image processing apparatus comprising:
- a first storage unit storing original image data, the original image data including lines arranged in a vertical direction and blocks arranged in each of the lines in a horizontal direction, the block including main data; and
- a signal processor processing the blocks, based on a digital memory access using the main data of a current block, first overlap data of a previous block and second overlap data of a next block so that no seams are generated at a boundary between adjacent blocks.
2. The seamless image processing apparatus of claim 1, wherein the signal processor comprises:
- a second storage unit storing the main data and the first and second overlap data;
- a digital memory access controller controlling transmission of the main data, and the first and second overlap data between the first and second storage units;
- an image processor processing the main data and the first and second overlap data stored in the second storage unit and outputting processed data;
- a third storage unit storing the processed data and using the processed data as the first overlap data for performing image processing on the next block; and
- an overlap controller dividing the second storage unit into a plurality of areas and controlling the digital memory access controller and the image processor so that the original image data and the processed data are transmitted from the first and third storage units to the plurality of areas of the second storage unit.
3. The seamless image processing apparatus of claim 1, wherein the signal processor comprises:
- a second storage unit storing the main data, the first and second overlap data, and processed data resulting from image processing of a current block;
- a digital memory access controller controlling a transmission of original image data between the first and second storage units;
- an image processor processing the main data of the current block and generating processed data and using the processed data as the first overlap data for performing image processing on the next block; and
- an overlap controller dividing the second storage unit into a plurality of areas and controlling the digital memory access controller and the image processor so that the original image data is transmitted from the first storage unit to the plurality of areas of the second storage unit.
4. The seamless image processing apparatus of claim 1, wherein image processing is performed on the lines of the original image data in a sequence in which the lines are arranged, and image processing is performed on the blocks of each of the lines in a sequence in which the blocks are arranged.
5. The seamless image processing apparatus of claim 2, wherein the overlap controller divides the original image data into N blocks, wherein N depends on a capacity of the second storage unit.
6. The seamless image processing apparatus of claim 2, wherein the overlap controller determines a size of the first and second overlap data in each of the blocks depending on a type of image processing performed by the image processor.
7. The seamless image processing apparatus of claim 2, wherein, when the main data corresponding to the current block is stored in the second storage unit, the first overlap data corresponds to the previous block, and the second overlap data corresponds to the next block.
8. The seamless image processing apparatus of claim 2, wherein the second storage unit comprises:
- a first area storing the first overlap data corresponding to the previous block;
- a second area storing the main data corresponding to the current block; and
- a third area storing the second overlap data corresponding to the next block.
9. The seamless image processing apparatus of claim 8, wherein if the current block is a first block, a first area is set with a default value.
10. The seamless image processing apparatus of claim 8, wherein if the current block is a last block, the third area and the third storage unit are set with default values.
11. The seamless image processing apparatus of claim 3, wherein the second storage unit comprises:
- a first area storing the first overlap data corresponding to the previous block;
- a second area storing the main data corresponding to the current block;
- a third area storing the second overlap data corresponding to the next block; and
- a fourth area storing processed data resulting from image processing of the current block and using the processed data as the first overlap for performing image processing on the next block.
12. The seamless image processing apparatus of claim 11, wherein if the current block is a first block, the first area is set with a default value.
13. The seamless image processing apparatus of claim 11, wherein if the current block is a last block, the third and fourth areas are set with default values.
14. A seamless image processing method comprising:
- determining a transmission size based on a digital memory access and an overlap data size;
- dividing original image data into N blocks according to the transmission size and the overlap data size and storing main data, first and second overlap data, and processed data resulting from image processing on a block-by-block basis, wherein the main data, the first and second overlap data, and the processed data correspond to each of the blocks; and
- performing image processing on a current block using the main data and generating the first overlap data for a next block from the image processing of the current block.
15. The seamless image processing method of claim 14, wherein dividing the original image data comprises:
- loading the main data of the current block among the original image data; and
- loading at least one of the first and second overlap data depending on a location of the current block in each of the lines.
16. The seamless image processing method of claim 15, wherein loading of the at least one of the first and second overlap data comprises:
- loading the second overlap data located close to the current block from the next block if the current block is the first block;
- loading the first overlap data located close to the current block among data resulting from image processing on the previous block and second overlap data located close to the current block among the data included in the next block, if the current block is one of second through (N−1)th blocks; and
- loading the first overlap data located close to the current block among the data resulting from image processing on the previous block if the current block is the N-th block.
17. The seamless image processing method of claim 14, wherein, image processing is performed on each of the lines of the original image data in a sequence in which the lines are arranged, and furthermore, image processing is performed on the individual blocks of each of the lines in a sequence in which the blocks are arranged.
18. The seamless image processing method of claim 14, wherein a size of the first and second overlap data in each of the blocks is determined according to a type of the image processing performed on the current block.
19. A computer-readable recording medium storing a program executing a seamless image processing method, the method comprising:
- determining a transmission size based on a digital memory access and an overlap data size;
- dividing original image data into N blocks according to the transmission size and the overlap data size and storing main data, first and second overlap data, and processed data resulting from image processing on a block-by-block basis, wherein the main data, the first and second overlap data, and the processed data correspond to each of the blocks; and
- performing image processing on a current block using the main data, and the first and second overlap data and generating the processed data, the processed data used as the first overlap data for a next block.
20. An image processing apparatus comprising:
- a first storage unit storing original image data, the original image data divided in blocks, including main data, arranged in a predetermined direction; and
- a signal processor processing the blocks, based on a digital memory access using the main data of a current block, first overlap data of a previous block and second overlap data of a subsequent block so that no seams are generated at a boundary between adjacent blocks.
21. The apparatus of claim 20, wherein the signal processor comprises:
- a second storage unit storing the main data and the first and second overlap data;
- a digital memory access controller controlling transmission of the main, first, and second overlap data between the first and second storage units;
- an image processor processing the main data and the first and second overlap data stored in the second storage unit and outputting processed data;
- a third storage unit storing the processed data and using the processed data as the first overlap data for performing image processing of another subsequent block; and
- an overlap controller dividing the second storage unit into a plurality of areas and controlling the digital memory access controller and the image processor so that the original image data and the processed data are transmitted from the first and third storage units to the plurality of areas of the second storage unit.
22. The apparatus of claim 20, wherein the signal processor comprises:
- a second storage unit storing the main data of the current block, the first overlap data of the previous block and the second overlap data of the subsequent block, and processed data resulting from image processing of the current block;
- a digital memory access controller controlling a transmission of the original image data, the main data, the first and second overlap data and the processed data between the first and second storage units;
- an image processor processing the main data and the first and second overlap data stored in the second storage unit and generating the processed data and using the processed data as the first overlap data for performing image processing on another subsequent block; and
- an overlap controller dividing the second storage unit into a plurality of areas and controlling the digital memory access controller and the image processor so that the original image data is transmitted from the first storage unit to the plurality of areas of the second storage unit.
23. The apparatus of claim 21, wherein the main data corresponds to the current block stored in the second storage unit, the first overlap data corresponds to the previous block, and the second overlap data corresponds to the subsequent block.
24. The apparatus of claim 22, wherein the main data corresponds to the current block stored in the second storage unit, the first overlap data corresponds to the previous block, and the second overlap data corresponds to the subsequent block.
Type: Application
Filed: Jul 1, 2004
Publication Date: Jan 13, 2005
Applicant: Samsung Electronics Co., Ltd (Suwon-si)
Inventor: Jong-hyon Yi (Yongin-si)
Application Number: 10/880,469