Image processing method and system

Abstract

According to an example, an original image is divided into image blocks according to a preset size, at least one pixel is overlapped between adjacent image blocks, a target image block is obtained after performing reduction processing for each of the image blocks according to a reduction factor, coordinates of the target image block are obtained according to the reduction factor and coordinates of the image block; and the target image blocks are combined according to the coordinates of the target image blocks.

Claims

1 . An image processing method, comprising: dividing an original image into image blocks according to a preset size, at least one pixel being overlapped between adjacent image blocks; obtaining a target image block after performing reduction processing for each of the image blocks according to a reduction factor; obtaining coordinates of the target image block according to the reduction factor and coordinates of the image block; and combining the target image blocks according to the coordinates of the target image blocks. 2 . The image processing method of claim 1 , wherein obtaining a target image block after performing reduction processing for each of the image blocks according to a reduction factor comprises: calculating a size of the target image block according to a size of the image block and a reduction factor; performing the reduction process for the image block according to the size of the target image block; and obtaining the target image block. 3 . The image processing method of claim 1 , wherein obtaining coordinates of the target image block according to the reduction factor and coordinates of the image block comprises: obtaining coordinates of a reference point of the image block; calculating coordinates of a reference point of the target image block corresponding to the image block according to the coordinates of the reference point of the image block and the reduction factor. 4 . The image processing method of claim 3 , wherein combining the target image blocks according to the coordinates of the target image blocks comprises: combining the target image blocks according to the coordinates of the reference point of the target image block and a position of the reference point of the target image block in the target image block; the position of the reference point of the target image block in the target image block being consistent with a position of the reference point of the image block in the image block. 5 . The image processing method of claim 3 , wherein obtaining coordinates of the reference point of the image block comprises: configuring the position of the reference point of the image block in the image block; calculating the coordinates of the reference point of the image block according to coordinates of a vertex in the image block and the position of the reference point of the image block in the image block. 6 . An image processing system, comprising: a dividing module, to divide an original image into image blocks according to a preset size, and at least one pixel being overlapped between adjacent image blocks; a reduction processing module, to obtain a target image block after performing reduction processing for each of the image blocks according to a reduction factor; a coordinate calculating module, to obtain coordinates of the target image block according to the reduction factor and coordinates of the image block; and a combining module, to combine the target image blocks according to the coordinates of the target image blocks. 7 . The image processing system of claim 6 , wherein the reduction processing module is to calculate a size of the target image block according to a size of the image block and the reduction factor; perform the reduction process for the image block according to the size of the target image block; and obtain the target image block. 8 . The image processing system of claim 6 , wherein the coordinate calculating module comprises: an original reference point coordinate obtaining module, to obtain coordinates of a reference point of the image block; a target reference point coordinate obtaining module, to calculate coordinates of a reference point of the target image block corresponding to the image block according to the coordinates of the reference point of the image block and the reduction factor. 9 . The image processing system of claim 8 , wherein the combining module is to combine the target image blocks according to the coordinates of the reference point of the target image block and a position of the reference point of the target image block in the target image block; the position of the reference point of the target image block in the target image block being consistent with a position of the reference point of the image block in the image block. 10 . The image processing system of claim 8 , wherein the original reference point obtaining module is to configure the position of the reference point of the image block in the image block; and calculate the coordinates of the reference point of the image block according to coordinates of a vertex in the image block and the position of the reference point of the image block in the image block. 11 . An image processing method, comprising: dividing an original image into image blocks according to a preset size; obtaining a target image block after performing reduction processing for each of the image blocks according to a reduction factor; obtaining coordinates of the target image block according to the reduction factor and coordinates of the image block; combining the target image blocks according to the coordinates of the target image blocks; copying at least one column/row of pixels in an edge of a first target image block and adding the at least one column/row of pixel to an edge of a second target image block; the edge of the second target image block being against the edge of the first target image block, and the at least one column/row of pixels being connected with the second target image block; the first target image block and the second target image block referring to two adjacent target image blocks respectively. 12 . The image processing method of claim 11 , wherein obtaining a target image block after performing reduction processing for each of the image blocks according to a reduction factor comprises: calculating a size of the target image block according to a size of the image block and a reduction factor; performing the reduction process for the image block according to the size of the target image block; and obtaining the target image block. 13 . The image processing method of claim 11 , wherein obtaining coordinates of the target image block according to the reduction factor and coordinates of the image block comprises: obtaining coordinates of a reference point of the image block; calculating coordinates of a reference point of the target image block corresponding to the image block according to the coordinates of the reference point of the image block and the reduction factor. 14 . The image processing method of claim 13 , wherein combining the target image blocks according to the coordinates of the target image blocks comprises: combining the target image blocks according to the coordinates of the reference point of the target image block and a position of the reference point of the target image block in the target image block; the position of the reference point of the target image block in the target image block being consistent with a position of the reference point of the image block in the image block. 15 . The image processing method of claim 13 , wherein obtaining coordinates of a reference point of the image block comprises: configuring the position of the reference point of the image block in the image block; calculating the coordinates of the reference point of the image block according to coordinates of a vertex in the image block and the position of the reference point of the image block in the image block. 16 . An image processing system, comprising: a dividing module, to divide an original image into image blocks according to a preset size; a reduction processing module, to obtain a target image block after performing reduction processing for each of the image blocks according to a reduction factor; a coordinate calculating module, to obtain coordinates of the target image block according to the reduction factor and coordinates of the image block; and a combining module, to combine the target image blocks according to the coordinates of the target image blocks; copy at least one column/row of pixels in an edge of a first target image block and adding the at least one column/row of pixel to an edge of a second target image block; the edge of the second target image block being against the edge of the first target image block, and the at least one column/row of pixels being connected with the second target image block; the first target image block and the second target image block referring to two adjacent target image blocks respectively. 17 . The image processing system of claim 16 , wherein the reduction processing module is to calculate a size of the target image block according to a size of the image block and the reduction factor; perform the reduction process for the image block according to the size of the target image block; and obtain the target image block. 18 . The image processing system of claim 16 , wherein the coordinate calculating module comprises: an original reference point coordinate obtaining module, to obtain coordinates of a reference point of the image block; a target reference point coordinate obtaining module, to calculate coordinates of a reference point of the target image block corresponding to the image block according to the coordinates of the reference point of the image block and the reduction factor. 19 . The image processing system of claim 18 , wherein the combining module is to combine the target image blocks according to the coordinates of the reference point of the target image block and a position of the reference point of the target image block in the target image block; copying the at least one column/row of pixels in the edge of the first target image block and adding the at least one column/row of pixel to the edge of the second target image block; the position of the reference point of the target image block in the target image block is consistent with the position of the reference point of the image block in the image block. 20 . The image processing system of claim 18 , wherein the original reference point obtaining module is to configure the position of the reference point of the image block in the image block; and calculate the coordinates of the reference point of the image block according to coordinates of a vertex in the image block and the position of the reference point of the image block in the image block.
CROSS REFERENCE TO RELATED APPLICATIONS [0001] This application is a continuation of International Application No. PCT/CN2012/086012, filed on Dec. 6, 2012, which claims priority to Chinese Patent Application No. 201110409768.0, filed on Dec. 9, 2011, the entire contents of all of said applications are incorporated herein by reference in their entirety for all purposes. TECHNICAL FIELD [0002] The present disclosure relates to computer technologies, and more particularly, to an image processing method and system. BACKGROUND [0003] With the development of computer technologies, real-time interactive games are increasingly popular. In the real-time interactive game, scene pictures vary with movements of characters, at the same time, the scene pictures may be scaled according to operations of users. The visual range of the scene pictures displaying to the user also will be consequently expanded or reduced. [0004] Generally, in conventional processing for the pictures in real-time interactive scenes, a picture is divided into image blocks in accordance with a certain size, and then the image blocks are processed respectively. For example, the image blocks may be loaded, reduced or magnified. By processing the image blocks, processing speed is improved, and storage space required in the processing procedure is reduced. However, when performing reduction processing for the picture, since the size of the picture is in units of pixels, the size of the image block after the reduction is an integer, rather than a floating point number which is obtained according to a reduction factor, white “cracks” between two adjacent image blocks will occur after the reduction processing, which will affect the smoothness and aesthetic of the picture. SUMMARY [0005] Examples of the present disclosure provide an image processing method and system, so as to improve overall smoothness of an image when the image is reduced. [0006] An image processing method includes: [0007] dividing an original image into image blocks according to a preset size, at least one pixel being overlapped between adjacent image blocks; [0008] obtaining a target image block after performing reduction processing for each of the image blocks according to a reduction factor; [0009] obtaining coordinates of the target image block according to the reduction factor and coordinates of the image block; and [0010] combining the target image blocks according to the coordinates of the target image blocks. [0011] An image processing system includes: [0012] a dividing module, to divide an original image into image blocks according to a preset size, and at least one pixel being overlapped between adjacent image blocks; [0013] a reduction processing module, to obtain a target image block after performing reduction processing for each of the image blocks according to a reduction factor; [0014] a coordinate calculating module, to obtain coordinates of the target image block according to the reduction factor and coordinates of the image block; and [0015] a combining module, to combine the target image blocks according to the coordinates of the target image blocks. [0016] According to the above image processing method and system, the original image is divided according to the preset size, and at least one column/row of pixels are overlapped between the adjacent image blocks. Because of the at least one column/row of common pixels between the adjacent image blocks, when performing the reduction process for the image block, the white “cracks” between adjacent target image blocks will not occur, thereby improving the overall smoothness of the image after the reduction processing. [0017] An image processing method includes: [0018] dividing an original image into image blocks according to a preset size; [0019] obtaining a target image block after performing reduction processing for each of the image blocks according to a reduction factor; [0020] obtaining coordinates of the target image block according to the reduction factor and coordinates of the image block; [0021] combining the target image blocks according to the coordinates of the target image blocks; copying at least one column/row of pixels in an edge of a first target image block and adding the at least one column/row of pixel to an edge of a second target image block; the edge of the second target image block being against the edge of the first target image block, and the at least one column/row of pixels being connected with the second target image block; the first target image block and the second target image block referring to two adjacent target image blocks respectively. [0022] An image processing system includes: [0023] a dividing module, to divide an original image into image blocks according to a preset size; [0024] a reduction processing module, to obtain a target image block after performing reduction processing for each of the image blocks according to a reduction factor; [0025] a coordinate calculating module, to obtain coordinates of the target image block according to the reduction factor and coordinates of the image block; and [0026] a combining module, to combine the target image blocks according to the coordinates of the target image blocks; copy at least one column/row of pixels in an edge of a first target image block and adding the at least one column/row of pixel to an edge of a second target image block; the edge of the second target image block being against the edge of the first target image block, and the at least one column/row of pixels being connected with the second target image block; the first target image block and the second target image block referring to two adjacent target image blocks respectively. [0027] According to the example, the at least one column/row of pixels in the edge of the first target image block is copied and added to the edge of the second target image block, the edge of the second target image block is against the edge of the first target image block, and the at least one column/row of pixels are connected with the second target image block. In this way, the at least one column/row of pixels may cover possible white “cracks” between the adjacent target image blocks. Therefore, overall smoothness of the image is improved. BRIEF DESCRIPTION OF THE DRAWINGS [0028] FIG. 1 is a schematic flowchart illustrating an image processing method according to an example of the present disclosure. [0029] FIG. 2 is a schematic diagram illustrating segmented images according to an example of the present disclosure. [0030] FIG. 3 is a schematic diagram illustrating relative positions of pixels after reduction processing is performed according to an example of the present disclosure. [0031] FIG. 4 is a schematic diagram illustrating a structure of an image processing system according to an example of the present disclosure. [0032] FIG. 5 is a schematic flowchart illustrating an image processing method according to another example of the present disclosure. [0033] FIG. 6 is a schematic diagram illustrating segmented images according to another example of the present disclosure. [0034] FIG. 7 is a schematic diagram illustrating relative positions of pixels after reduction processing is performed according to another example of the present disclosure. [0035] FIG. 8 is a schematic diagram illustrating a structure of an image processing system according to another example of the present disclosure. DETAILED DESCRIPTION [0036] The following description is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses. The broad teachings of the disclosure can be implemented in a variety of forms. Therefore, while this disclosure includes particular examples, the true scope of the disclosure should not be so limited since other modifications will become apparent upon a study of the drawings, the specification, and the following claims. For purposes of clarity, the same reference numbers will be used in the drawings to identify similar elements. [0037] The terms used in this specification generally have their ordinary meanings in the art, within the context of the disclosure, and in the specific context where each term is used. Certain terms that are used to describe the disclosure are discussed below, or elsewhere in the specification, to provide additional guidance to the practitioner regarding the description of the disclosure. The use of examples anywhere in this specification, including examples of any terms discussed herein, is illustrative only, and in no way limits the scope and meaning of the disclosure or of any exemplified term. Likewise, the disclosure is not limited to various examples given in this specification. [0038] As used in the description herein and throughout the claims that follow, the meaning of “a”, “an”, and “the” includes plural reference unless the context clearly dictates otherwise. Also, as used in the description herein and throughout the claims that follow, the meaning of “in” includes “in” and “on” unless the context clearly dictates otherwise. [0039] As used herein, the terms “comprising,” “including,” “having,” “containing,” “involving,” and the like are to be understood to be open-ended, i.e., to mean including but not limited to. [0040] As used herein, the phrase “at least one of A, B, and C” should be construed as A only, B only, C only, or any combination of two or more items A, B and C. It should be understood that one or more steps within a method may be executed in different order (or concurrently) without altering the principles of the present disclosure. [0041] As used herein, the term “module” may refer to, be part of, or include an Application Specific Integrated Circuit (ASIC); an electronic circuit; a combinational logic circuit; a field programmable gate array (FPGA); a processor (shared, dedicated, or group) that executes code; other suitable hardware components that provide the described functionality; or a combination of some or all of the above, such as in a system-on-chip. The term module may include memory (shared, dedicated, or group) that stores code executed by the processor. [0042] The term “code”, as used herein, may include software, firmware, and/or microcode, and may refer to programs, routines, functions, classes, and/or objects. The term “shared”, as used herein, means that some or all code from multiple modules may be executed using a single (shared) processor. In addition, some or all code from multiple modules may be stored by a single (shared) memory. The term “group”, as used herein, means that some or all code from a single module may be executed using a group of processors. In addition, some or all code from a single module may be stored using a group of memories. [0043] The systems and methods described herein may be implemented by one or more computer programs executed by one or more processors. The computer programs include processor-executable instructions that are stored on a non-transitory tangible computer readable medium. The computer programs may also include stored data. Non-limiting examples of the non-transitory tangible computer readable medium are nonvolatile memory, magnetic storage, and optical storage. [0044] The description will be made as to the embodiments of the present invention in conjunction with the accompanying drawings in FIGS. 1-8 . It should be understood that specific embodiments described herein are merely intended to explain the present invention, but not intended to limit the present invention. In accordance with the purposes of this invention, as embodied and broadly described herein, this invention, in one aspect, relates to image processing method and system. [0045] Examples of mobile terminals that can be used in accordance with various embodiments include, but are not limited to, a tablet PC (including, but not limited to, Apple iPad and other touch-screen devices running Apple iOS, Microsoft Surface and other touch-screen devices running the Windows operating system, and tablet devices running the Android operating system), a mobile phone, a smartphone (including, but not limited to, an Apple iPhone, a Windows Phone and other smartphones running Windows Mobile or Pocket PC operating systems, and smartphones running the Android operating system, the Blackberry operating system, or the Symbian operating system), an e-reader (including, but not limited to, Amazon Kindle and Barnes & Noble Nook), a laptop computer (including, but not limited to, computers running Apple Mac operating system, Windows operating system, Android operating system and/or Google Chrome operating system), or an on-vehicle device running any of the above-mentioned operating systems or any other operating systems, all of which are well known to those skilled in the art. [0046] FIG. 1 is a schematic flowchart illustrating an image processing method according to an example of the present disclosure. As shown in FIG. 1 , the image processing method includes the following processing. [0047] At S 101 , an original image is divided into image blocks according to a preset size, at least one pixel is overlapped between adjacent image blocks. [0048] According to various examples of the present disclosure, the size of the image is in units of pixels. According to an example, the original image is divided into image blocks according to the preset size. As shown in FIG. 2 , an image block A 1 and an image block A 2 are adjacent image blocks in a horizontal direction, and one column of pixels are overlapped between the image block A 1 and the image block A 2 . The image block A 1 and an image block A 3 are adjacent image blocks in a vertical direction, and one row of pixels are overlapped between the image block A 1 and the image block A 3 . According to an example, the sizes of the image blocks are the same. [0049] At S 102 , a target image block is obtained after performing reduction processing for each of the image blocks according to a reduction factor. [0050] When the reduction processing needs to be performed for the original image, the reduction processing may be performed for each of the image blocks, and the target image block of each of the image blocks is obtained. By performing the reduction processing for the image blocks, processing speed is improved. [0051] According to an example, at S 102 , the size of the target image block is calculated according to the size of the image block and the reduction factor, and the reduction processing is performed for the image block according to the size of the target image block. [0052] Since the size of the image is in units of pixels and can only be an integer, the size of the target image block is obtained by rounding a product of the size of image block and the reduction factor. For example, the size of the image block is 11×22, the reduction factor is 0.75, and thus the size of the target image block is 8×16. [0053] According to an example, conventional image reduction processing methods may be used to reduce the image block, such as, a snapshot method, an average method, a bilinear method and etc. The snapshot method may be used to accelerate the processing speed. [0054] At S 103 , coordinates of the target image block is calculated according to the reduction factor and coordinates of the image block. [0055] The coordinates of the image block refer to coordinates of all pixels in the image block. The coordinates of the pixel refer to a column number and a row number of the pixel in the image block including the pixel, or a column number and a row number of the pixel in a screen displaying the pixel. For example, the pixel is located at the column 1024, row 800 of the screen, then the coordinates of the pixel with respect to the screen are (1024, 800). [0056] After the reduction processing is performed for the image block, the coordinates of the target image block may be calculated according to the reduction factor and the coordinates of the image block. [0057] According to an example, the coordinates of the image block may be identified by coordinates of 4 vertex pixels of the image block, since coordinates of each of the remaining pixels in the image block may be obtained according to the coordinates of the 4 vertex pixels and the relative position between the remaining pixel and the 4 vertices. According to an example, the coordinates of the image block may be identified by coordinates of a reference point in the image block, and coordinates of each of the remaining pixels in the image block may be obtained according to the coordinates of the reference point and the relative position between the remaining pixel and the reference point. [0058] According to an example, at S 103 , the coordinates of the reference point in the image block is obtained, coordinates of a reference point in the target image block corresponding to the image block is obtained according to the coordinates of the reference point in the image block and the reduction factor. [0059] According to an example, one pixel in the image block is be configured as a reference point, and coordinates of the reference point is obtained. A product of the coordinates of the reference point in the image block and the reduction factor is obtained, and the product after rounding is taken as coordinates of the reference point in the target image block corresponding to the image block. For example, the coordinates of the reference point in the image block are (10, 10), the reduction factor is 0.75, then the coordinates of the reference point in the target image block is calculated as: (10, 10)×0.75, and is (7, 7) after rounding. [0060] At S 104 , the target image blocks are combined according to the coordinates of the target image blocks. [0061] According to an example, the target image block may be combined according to the coordinates of the reference point in the target image block and a position of the reference point of the target image block in the target image block. [0062] According to an example, the position of the reference point of the target image block in the target image block is consistent with the position of the reference point of the image block in the image block. For example, when the reference point of the image block is the upper left vertex of the image block, the reference point of the target image block is also the upper left vertex of the target image block. [0063] According to an example, coordinates of other pixels in the target image block may be calculated according to the coordinates of the reference point in the target image block, and the position of the reference point of the target image block in the target image block. [0064] The relative position between the remaining pixel and the reference point may be obtained according to the position of the reference point of the target image block in the target image block, and the coordinates of the remaining pixel may be calculated according to the relative position between the remaining pixel and the reference point and the coordinates of the reference point. For example, the reference point of the target image block is the upper left vertex of the target image block, the coordinates of the reference point in the target image block are (7, 7), the size of the target image block is 8×16, then the coordinates of an upper right vertex of the target image block may be calculated as (7+8−1, 7), i.e. (14, 7); the coordinates of a lower left vertex of the target image block are (7, 7+16−1), i.e. (7, 22). [0065] Further, the target image blocks may be combined according to the coordinates of all pixels in the target image block. According to an example, the target image blocks may be combined according to a certain order, such as an order that from left to right or from top to bottom, or an order of the coordinates of the reference point in the target image block. If the adjacent target image blocks have overlapped pixels, the pixels spliced currently cover the pixels spliced last. [0066] According to the above solutions, the original image is divided, the coordinates of the target image block is obtained, and the target image blocks are combined according to the coordinates of the target image block. Therefore, the white “cracks” between adjacent target image blocks will not occur. [0067] FIG. 3 is a schematic diagram illustrating relative positions of pixels after reduction processing is performed according to an example of the present disclosure. [0068] As shown in FIG. 3 , B 1 , B 2 , B 3 are first rows of pixels in three target image blocks adjacent in the horizontal direction respectively. In order to facilitate annotation, the B 1 , B 2 , B 3 in FIG. 3 are staggered in the horizontal position, while the horizontal position of which in actual image is the same. [0069] In the example, the length of each of the B 1 , B 2 , B 3 is 11, the abscissa of the first pixel of B 1 is 10. According to the processing at S 101 , one pixel is overlapped between the adjacent image blocks when the original image is divided, the abscissas of the first pixel of B 2 , B 3 may be obtained. The abscissas of the first pixel of B 2 , B 3 are 20, 30 respectively, and the abscissas of the last pixel of B 1 , B 2 , B 3 are 20, 30, 40 respectively. [0070] C 1 , C 2 , C 3 are target image pixels obtained after the reduction processing is performed for the B 1 , B 2 , B 3 respectively, and the reduction factor is 0.75. [0071] In the example, the first pixels of B 1 , B 2 , B 3 are configured as the reference points of the above three adjacent image blocks respectively, then the first pixels of C 1 , C 2 , C 3 are the reference points of target image blocks corresponding to the above three adjacent image blocks respectively. The abscissa of the reference point (i.e. the first pixel) of C 1 is 10×0.75, and is 7 after rounding. Since the length of the C 1 is 11×0.75, and is 8 after rounding, then the abscissa of the last pixel of C 1 is 7+8−1=14. Similarly, the abscissa of the reference point (i.e. the first pixel) of C 2 is 20×0.75, i.e. 15, then the abscissa of the last pixel of C 2 is 15+8−1=22. Similarly, the abscissa of the reference point of C 3 is 22; the abscissa of the last pixel of C 3 is 29. [0072] As shown in FIG. 3 , the first and the last pixels respectively in the pixels adjacent in the horizontal direction are connected or overlapped, and thus one column of pixels are connected or overlapped between the target image blocks adjacent in the horizontal direction, without spaced one column of pixels, thus the white “cracks” between the target image blocks adjacent in the horizontal direction will not occur. [0073] Furthermore, the white “cracks” between the target image blocks adjacent in the vertical direction will also not occur, the implementation is the same as the that of the horizontal direction, and is not further described herein. [0074] FIG. 4 is a schematic diagram illustrating a structure of an image processing system according to an example of the present disclosure. [0075] As shown in FIG. 4 , the image processing system includes storage 40 and a processor 41 . According to an example, the storage 40 may be non-transitory computer readable storage medium. The storage 40 stores computer readable instructions for implementing a dividing module 401 , a reduction processing module 402 , a coordinate calculating module 403 , and a combining module 404 . The processor 41 may execute the computer readable instructions stored in the storage 40 . [0076] The dividing module 401 is to divide an original image into image blocks according to a preset size, and at least one pixel is overlapped between adjacent image blocks. [0077] According to various examples of the present disclosure, the size of the image is in units of pixels. According to an example, the dividing module 401 may divide the original image into the image blocks according to the preset size, as shown in FIG. 2 . An image block A 1 and an image block A 2 are adjacent image blocks in a horizontal direction, and one column of pixels are overlapped between the image block A 1 and the image block A 2 . The image block A 1 and an image block A 3 are adjacent image blocks in a vertical direction, and one row of pixels are overlapped between the image block A 1 and the image block A 3 . [0078] According to an example, the sizes of the image blocks divided by the diving module 401 are the same. [0079] The reduction processing module 402 is to obtain a target image block after performing reduction processing for each of the image blocks according to a reduction factor. [0080] When the reduction processing needs to be performed for the original image, the reduction processing may be performed for each of the image blocks by the reduction processing module 402 , and the target image block of each of the image blocks is obtained. By performing the reduction processing for the image blocks, processing speed is improved. [0081] According to an example, the reduction processing module 402 may calculate the size of the target image block according to the size of the image block and the reduction factor, and the reduction processing is performed for the image block according to the size of the target image block. [0082] Since the size of image is in units of pixels and can only be an integer, the size of the target image block is obtained by rounding a product of the size of image block and the reduction factor. For example, the size of the image block is 11×22, the reduction factor is 0.75, and thus the reduction processing module 402 may calculate the size of the target image block as 8×16. [0083] According to an example, conventional image reduction processing methods may be used to reduce the image block, such as, a snapshot method, an average method, a bilinear method and etc. The snapshot method may be used to accelerate the processing speed. [0084] The coordinate calculating module 403 is to calculate coordinates of the target image block according to the reduction factor and coordinates of the image block. [0085] The coordinates of the image block refer to coordinates of all pixels in the image block. The coordinates of the pixel refer to a column number and a row number of the pixel in the image block including the pixel, or a column number and a row number of the pixel in a screen displaying the pixel. For example, the pixel is located at the column 1024, row 800 of the screen, then the coordinates of the pixel with respect to the screen are (1024, 800). [0086] According to an example, after the reduction processing is performed for the image blocks, the coordinate calculating module 403 may calculate the coordinates of the target image block according to the reduction factor and the coordinates of the image block. [0087] According to an example, the coordinates of the image block may be identified by coordinates of 4 vertex pixels of the image block, since coordinates of each of the remaining pixels in the image block may be obtained according to the coordinates of the 4 vertex pixels and the relative position between remaining pixel and the 4 vertices. According to an example, the coordinates of the image block may be identified by coordinates of a reference point in the image block, and coordinates of each of the remaining pixels in the image block may be obtained according to the coordinates of the reference point and the relative position between the remaining pixel and the reference point. [0088] According to an example, the coordinate calculating module 403 is to obtain the coordinates of the reference point in the image block, and obtain coordinates of a reference point in the target image block corresponding to the image block according to the coordinates of the reference point in the image block and the reduction factor. [0089] According to an example, the coordinate calculating module 403 is to configure one pixel in the image block as a reference point, and obtain coordinates of the reference point. Further, the coordinate calculating module 403 is to obtain a product of the coordinates of the reference point in the image block and the reduction factor, and take the product after rounding as coordinates of the reference point in the target image block corresponding to the image block. For example, the coordinates of the reference point in the image block are (10, 10), the reduction factor is 0.75, then the coordinates of the reference point in the target image block is calculated as: (10, 10)×0.75, and is (7, 7) after rounding. [0090] The combining module 404 is to combine the target image blocks according to the coordinates of the target image blocks. [0091] According to an example, the combining module 404 is to combine the target image blocks according to the coordinates of the reference points in the target image blocks and the positions of the reference points in the target image block. [0092] According to an example, the position of the reference point of the target image block in the target image block is consistent with the position of the reference point of the image block in the image block. For example, when the reference point of the image block is the upper left vertex of the image block, the reference point of the target image block is also the upper left vertex of the target image block. [0093] According to an example, the combining module 404 is to calculate coordinates of other pixels in the target image block according to the coordinates of the reference point of the target image block, and the position of the reference point of the target image block in the target image block. [0094] The relative position between the remaining pixel and the reference point may be obtained according to the position of the reference point of the target image block in the target image block, and the combining module 404 may calculate the coordinates of the remaining pixel according to the relative position between the remaining pixel and the reference point and the coordinates of the reference point. For example, the reference point of the target image block is the upper left vertex of the target image block, the coordinates of the reference point in the target image block are (7, 7), the size of the target image block is 8×16, then the coordinates of an upper right vertex of the target image block may be calculated as (7+8−1, 7), i.e. (14, 7); the coordinates of a lower left vertex of the target image block are (7, 7+16−1), i.e. (7, 22). [0095] Further, the combining module 404 may combine the target image blocks according to the coordinates of all pixels in the target image block. [0096] According to an example, the combining module 404 may combine the target image blocks according to a certain order, such as an order that from left to right or from top to bottom, or an order of the coordinates of the reference point in the target image block. If the adjacent target image blocks have overlapped pixels, the pixels spliced currently cover the pixels spliced last. [0097] According to the above image processing method and system, the original image is divided, the coordinates of the target image block is obtained, and the target image blocks are combined according to the coordinates of the target image block. Therefore, when performing the reduction process for the image block, the white “cracks” between adjacent target image blocks will not occur, thereby improving the overall smoothness of the image after the reduction processing. [0098] FIG. 5 is a schematic flowchart illustrating an image processing method according to another example of the present disclosure. As shown in FIG. 5 , the image processing method includes the following processing. [0099] At S 501 , an original image is divided into image blocks according to a preset size. [0100] According to an example, as shown in FIG. 6 , the original image is divided into image blocks according to the preset size, and image blocks D 1 , D 2 , D 3 are obtained. [0101] According to an example, the sizes of the image blocks are the same. [0102] At S 502 , a target image block is obtained after performing reduction processing for each of the image blocks according to a reduction factor. [0103] According to an example, the size of the target image block is calculated according to the size of the image block and the reduction factor, and the reduction processing is performed for the image block according to the size of the target image block. [0104] According to an example, conventional image reduction processing methods may be used to reduce the image block, such as, a snapshot method, an average method, a bilinear method and etc. The snapshot method may be used to accelerate the processing speed. [0105] At S 503 , coordinates of the target image block is calculated according to the reduction factor and coordinates of the image block. [0106] According to an example, the coordinates of the target image block may be identified by coordinates of a reference point. According to an example, coordinates of a reference point in the image block may be obtained, and then coordinates of a reference point in the target image block corresponding to the image block is obtained according to the coordinates of the reference point in the image block and the reduction factor. [0107] According to an example, when obtaining the coordinates of the reference point in the image block, a position of the reference point of the image block in the image block is configured, the coordinates of the reference point in the image block is calculated according to coordinates of a vertex of the image block and the position of the reference point of the image block in the image block. [0108] At S 504 , the target image blocks are combined according to the coordinates of the target image blocks. At least one column/row of pixels in an edge of a first target image block is copied and is added to an edge of a second target image block. The edge of the second target image block is against the edge of the first target image block, and the at least one column/row of pixels are connected with the second target image block. The first target image block and the second target image block refer to two adjacent target image blocks respectively. [0109] According to an example, the target image blocks may be combined according to the coordinates of the reference point of the target image block and a position of the reference point of the target image block in the target image block. The position of the reference point of the target image block in the target image block is consistent with the position of the reference point of the image block in the image block. [0110] According to an example, one column of pixels in the rightmost of a target block may be copied and added to the left side of a target image block adjacent to the column of pixels, the column of pixels are connected with the target image block adjacent to the column of pixels. In addition, one row of pixels in the lowermost of the target block may be copied and added to the top of a target image block adjacent to the row of pixels, and the row of pixels are connected with the target image block adjacent to the row of pixels. [0111] According to another example, one column of pixels in the leftmost of a target block may be copied and added to the right side of a target image block adjacent to the column of pixels, and the column of pixel are connected with the target image block adjacent to the column of pixels. In addition, one row of pixels in the uppermost of the target block may be copied and added to the bottom of a target image block adjacent to the row of pixels, and the row of pixels are connected with the target image block adjacent to the row of pixel. [0112] According to the example, the at least one column/row of pixels in the edge of the first target image block is copied and added to the edge of the second target image block, the edge of the second target image block is against the edge of the first target image block, and the at least one column/row of pixels are connected with the second target image block. In this way, the at least one column/row of pixels may cover possible white “cracks” between the adjacent target image blocks. Therefore, overall smoothness of the image is improved. [0113] FIG. 7 is a schematic diagram illustrating relative positions of pixels after reduction processing is performed according to another example of the present disclosure. [0114] As shown in FIG. 7 , E 1 , E 2 , E 3 are first rows of pixels in three target image blocks adjacent in the horizontal direction respectively. In order to facilitate annotation, the E 1 , E 2 , E 3 in FIG. 7 are staggered in the horizontal position, while the horizontal position of which in actual image is the same. [0115] In the example, the length of each of the E 1 , E 2 , E 3 is 10, the abscissa of the first pixel of E 1 is 11. According to the processing at S 501 , the abscissas of the first pixel of E 2 , E 3 may be obtained. The abscissas of the first pixel of E 2 , E 3 are 21, 31 respectively, and the abscissas of the last pixel of E 1 , E 2 , E 3 are 20, 30, 40 respectively. [0116] F 1 , F 2 , F 3 are target image pixels obtained after the reduction processing is performed for the E 1 , E 2 , E 3 respectively, and the reduction factor is 0.75. [0117] In the example, the first pixels of E 1 , E 2 , E 3 are configured as the reference points of the above three adjacent image blocks respectively, the first pixels of F 1 , F 2 , F 3 are the reference points of target image block corresponding to the above three adjacent image blocks respectively. [0118] Accordingly, the abscissas of the first pixel of F 1 , F 2 , F 3 are 8, 15, 23 respectively, the abscissas of the last pixels of F 1 , F 2 , F 3 are 14, 21, 29 respectively. When the target image blocks are combined according to the coordinates, an interval of one pixel (i.e. white “cracks”) between the F 2 and F 3 will occur, and thus an interval of one column of pixels between target image blocks including F 2 and F 3 will occur. [0119] The ordinate of the pixel in the target image block may be calculated according to the same mode. Similarly, when combining the image blocks according to the coordinates, a row of white “cracks” between target image blocks adjacent in the vertical direction may also occur. [0120] In the example, the rightmost one pixel of F 1 and F 2 are copied and added to the left side of F 2 and F 3 respectively, and F 2 ′, F 3 ′ are obtained. The abscissas of the last pixel of F 1 and that of the first pixel of F 2 ′ are the same, and the abscissas of the last pixel of F 2 ′ and that of the first pixel of F 3 ′ are continuous. Therefore, the interval between the target image blocks adjacent in the horizontal direction will no longer occur. Similarly, the lowermost one row of pixels of F 1 , F 2 are copied and added to the top of the target image blocks adjacent to the row of pixels and connected to the target image blocks adjacent to the row of pixels respectively. Therefore, the interval between the target image blocks adjacent in the vertical direction will also no longer occur. [0121] FIG. 8 is a schematic diagram illustrating a structure of an image processing system according to an example of the present disclosure. [0122] As shown in FIG. 8 , the image processing system includes storage 80 and a processor 81 . According to an example, the storage 80 may be non-transitory computer readable storage medium. The storage 80 stores computer readable instructions for implementing a dividing module 801 , a reduction processing module 802 , a coordinate calculating module 803 , and a combining module 804 . The processor 81 may execute the computer readable instructions stored in the storage 80 . [0123] The dividing module 801 is to divide an original image into image blocks according to a preset size. [0124] As shown in FIG. 6 , according to an example, the dividing module 801 is to divide the original image according to the preset size, and image blocks D 1 , D 2 , D 3 are obtained. According to an example, the sizes of the image blocks are the same. [0125] The reduction processing module 802 is to obtain a target image block after performing reduction processing for each of the image blocks according to a reduction factor. [0126] According to an example, the reduction processing module 802 may calculate the size of the target image block according to the size of the image block and the reduction factor, and the reduction processing is performed for the image block according to the size of the target image block. According to an example, conventional image reduction processing methods may be used to reduce the image block, such as, a snapshot method, an average method, a bilinear method and etc. The snapshot method may be used to accelerate the processing speed. [0127] The coordinate calculating module 803 is to calculate coordinates of the target image block according to the reduction factor and coordinates of the image block. [0128] According to an example, the coordinates of the target image block may be identified by coordinates of a reference point. According to an example, the coordinate calculating module 803 includes an original reference point coordinate obtaining module, a target reference point coordinate obtaining module (not shown in the figure). [0129] The original reference point coordinate obtaining module is to obtain the coordinates of the reference point of the image block. According to an example, the original reference point coordinate obtaining module may configure a position of the reference point of the image block in the image block, and calculate the coordinates of the reference point the image block according to vertex coordinates of the image block and the position of the reference point of the image block in the image block [0130] The target reference point coordinate obtaining module is to calculate the coordinates of the reference point in the target image block corresponding to the image block according to the coordinates of the reference point in the image block and the reduction factor. [0131] The combining module 804 is to combine the target image blocks according to the coordinates of the target image block, copy at least one column/row of pixels in an edge of a first target image block and added the at least one column/row of pixels to an edge of a second target image block. The edge of the second target image block is against the edge of the first target image block. The at least one column/row of pixels are connected with the second target image block. The first target image block and the second target image block refer to two adjacent target image blocks respectively. [0132] According to an example, the combining module 804 may combine the target image blocks according to the coordinates of the reference point of the target image block and the position of the reference point of the target image block in the target image block. The position of the reference point of the target image block in the target image block is consistent with the position of the reference point of the image block in the image block. [0133] According to an example, the combining module 804 may copy at least one column of pixels in the rightmost of a target block and added the at least one column of pixels into the left side of a target image block adjacent to the at least one column of pixels and the at least one column of pixels are connected with the target image block adjacent to the at least one column of pixels. In addition, the combining module 804 may copy one column of pixels in the lowermost of the target block and add the one column of pixels into the top of a target image block adjacent to the row of pixels, and the row of pixels are connected with the target image block adjacent to the row of pixels. [0134] According to another example, the combining module 804 may copy one column of pixels in the leftmost of a target block and add the one column of pixels into the right side of a target image block adjacent to the column of pixels, and the column of pixel are connected to the adjacent target image block. In addition, the combining module 804 may copy one row of pixels in the uppermost of the target block and add the one row of pixels into the bottom of a target image block adjacent to the row of pixels, and the row of pixels are connected with the target image block adjacent to the row of pixel. [0135] According to the example, the at least one column/row of pixels in the edge of the first target image block is copied and added to the edge of the second target image block, the edge of the second target image block is against the edge of the first target image block, and the at least one column/row of pixels are connected with the second target image block. In this way, the at least one column/row of pixels may cover possible white “cracks” between the adjacent target image blocks. Therefore, overall smoothness of the image is improved. [0136] The methods, modules and devices described herein may be implemented by hardware, machine-readable instructions or a combination of hardware and machine-readable instructions. Machine-readable instructions used in the examples disclosed herein may be stored in storage medium readable by multiple processors, such as hard drive, CD-ROM, DVD, compact disk, floppy disk, magnetic tape drive, RAM, ROM or other proper storage device. Or, at least part of the machine-readable instructions may be substituted by specific-purpose hardware, such as custom integrated circuits, gate array, FPGA, PLD and specific-purpose computers and so on. [0137] A machine-readable storage medium is also provided, which is to store instructions to cause a machine to execute a method as described herein. Specifically, a system or apparatus having a storage medium that stores machine-readable program codes for implementing functions of any of the above examples and that may make the system or the apparatus (or CPU or MPU) read and execute the program codes stored in the storage medium. [0138] In this situation, the program codes read from the storage medium may implement any one of the above examples, thus the program codes and the storage medium storing the program codes are part of the technical scheme. [0139] The storage medium for providing the program codes may include floppy disk, hard drive, magneto-optical disk, compact disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tape drive, Flash card, ROM and so on. Optionally, the program code may be downloaded from a server computer via a communication network. [0140] It should be noted that, alternatively to the program codes being executed by a computer, at least part of the operations performed by the program codes may be implemented by an operation system running in a computer following instructions based on the program codes to realize a technical scheme of any of the above examples. [0141] In addition, the program codes implemented from a storage medium are written in a storage in an extension board inserted in the computer or in a storage in an extension unit connected to the computer. In this example, a CPU in the extension board or the extension unit executes at least part of the operations according to the instructions based on the program codes to realize a technical scheme of any of the above examples. [0142] It will be understood by those ordinary skilled in the art that the implementation of all or part of the process in the method of the foregoing embodiment can be done by controlling the related hardware by computer program, the program may be stored in a computer-readable storage medium, when the program is executing, it may include, such as the process of the embodiment of the method described above. Wherein, the storage medium may be a disk, CD, Read-Only Memory (ROM), Random Access Memory (RAM) et al. [0143] The foregoing is only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to this. Any improvement and replacement which can be made in the technical scope disclosed by the present invention by those skilled in the art should be covered in the protection scope of the invention. And thus, the protection scope of the present invention should be defined by the claims.

Description

Topics

Download Full PDF Version (Non-Commercial Use)

Patent Citations (10)

    Publication numberPublication dateAssigneeTitle
    US-2001017942-A1August 30, 2001Nokia Mobile Phones Ltd.Method for encoding images, and an image coder
    US-2003048951-A1March 13, 2003Hideyuki Rengakuji, Yuji Sakaegi, Masato KosugiImage processing apparatus and method, and computer readable storage medium
    US-2005053290-A1March 10, 2005Yoshiyuki Wada, Kosuke Yoshioka, Hideshi NishidaVideo decoding apparatus
    US-2006093036-A1May 04, 2006Park Seung W, Park Ji H, Jeon Byeong MMethod for encoding and decoding video signals
    US-2007154114-A1July 05, 2007Aten International Co., Ltd.Mixing 2-D gradient-difference and interpolation/decimation method and device for scaling a digital image
    US-2009122084-A1May 14, 2009Zhilong Yu, Ruohong ZhuMethod of Image Scaling
    US-2011243436-A1October 06, 2011Samsung Electronics Co., Ltd.Methods and apparatuses for encoding and decoding image based on segments
    US-5831872-ANovember 03, 1998Motorola, Inc.Method and system for compressing a video signal using dynamic frame recovery
    US-5901254-AMay 04, 1999Hitachi, Ltd.Apparatus and method for image reduction
    US-7839424-B1November 23, 2010Marvell International Ltd.Horizontal strip column-first two-dimensional scaling

NO-Patent Citations (1)

    Title
    Aho, Eero, et al. "Block-level parallel processing for scaling evenly divisible images." Circuits and Systems I: Regular Papers, IEEE Transactions on 52.12 (2005): 2717-2725.

Cited By (0)

    Publication numberPublication dateAssigneeTitle