1. Field of Invention
Aspects of the invention relate to a method for displaying a predetermined number of gray scales that are the same as those of obtained image data on an image display, such as a liquid-crystal-display panel provided in an image display apparatus, where the image display can display a limited number of gray scales.
2. Description of Related Art
A related art lightweight and low-profile display device, such as an LCD (liquid crystal display), can be mounted on a mobile terminal device, such as a mobile phone, a PDA (personal digital assistant), and so forth. Though full-color image data (eight bits for each of colors R, G, and B per each pixel (256 gray scales)) can be inputted for displaying an image on the above-described display device, the display often has to display gray scales of six bits for each of the colors R, G, and B (64 gray scales), for example, due to its limited performance. In this case, therefore, though the number of colors of the inputted image data is 16,777,216 in total (=256×256×256), the sum of displayed colors becomes 262,144 (=64×64×64).
In general, therefore, a method for interpolating the above-described shortage of colors simulatively by representing half-tone gray scales by a plurality of pixels through a dither process, an error-diffusion process, and so forth, is used frequently. For increasing the 64 gray scales to the 256 gray scales, for example, the dither process is performed, so as to interpolate three gray scales between steps of the 64 gray scales. However, since the number of gaps between the steps of the 64 gray scales (six bits) is 63, the number of gray scales obtained by the interpolation is only 253 (64+63×3). This gray-scale number does not agree with 256 perfectly and is three short of the required number. Subsequently, the number of colors becomes 16,194,277 (=253×253×253), which is 582,939 short of the total required number, when compared to that of the original data. Where the display apparatus can represent only five bits (32 gray scales) due to its performance, the gray-scale number becomes 249 (32+31×7), even though the above-described dither process is performed. Subsequently, the gray-scale number becomes seven short of the required number. Therefore, 1,338,967 colors are lost in total. Thus, where only one type of dither process is performed for the entire gray scales, so as to interpolate gray scales therebetween, the number of obtained colors does not perfectly agree with the number of colors of the original full-color image data.
Aspects of the invention can provide an image-display apparatus including an image display such as a liquid-crystal-display panel, where the image display can display a limited number of gray scales, an image display method, and an image-display program. The image-display apparatus can interpolate a predetermined number of colors for displaying a predetermined number of gray scales that are the same as those of obtained image data on the image display.
According to an aspect of the invention, an image-display apparatus having an image display can include an image display that can display n-bit gray scales, an image-data obtain device for obtaining m-bit image data to be displayed, bit-number decrease means for decreasing the number of bits of the image data from m to n, an interpolation device for interpolating a predetermined number of gray scales for the n-bit image data by performing a dither process and generating interpolation image data having a predetermined number of gray scales corresponding to the m bits, and display control device for displaying the interpolation image data on the image display.
The above-described image-display apparatus can be various types of terminal devices including a mobile phone, a mobile terminal, and so forth, which have a liquid-crystal-display panel, as the image display. The liquid-crystal-display panel is often not able to display inputted m-bit data such as full-color data of eight bits for each color due to its performance. Therefore, image data with reduced data amount is displayed on the image display. At this time, according to the invention, the dither process is performed for interpolating the half tone simulatively, so as to display a predetermined number of gray scales that are the same as those of the obtained image data. Subsequently, it becomes possible to display an image having a predetermined number of gray scales that are the same as those of a full-color image without deviating from an original image.
According to a mode of the above-described image-display apparatus, the interpolation device can perform the dither process by using a second dither matrix, where a gray-scale value of the m-bit image data corresponds to a predetermined area, and performs the dither process by using a first dither matrix, where the gray-scale value does not correspond to the predetermined area. It becomes possible to make the gray-scale number of a displayed image coincide with that of the inputted image data by switching between the dither process using the first dither matrix and the dither process using the second dither matrix according to the gray-scale number.
According to another mode of the above-described image-display apparatus, the first dither matrix is a 2×2-pixel matrix and the second dither matrix is a 3×3-pixel matrix. Where the gray-scale number does not correspond to the predetermined area, the dither process is performed by using the 2×2 dither matrix. Where the gray-scale number corresponds to the predetermined area, the dither process is performed by using the 3×3 dither matrix. Where the 2×2 dither matrix is used, the gray-scale number can be increased by as much as only three gray scales. However, where the 3×3 dither matrix is used, the gray-scale number can be increased by as much as eight gray scales at the maximum. Therefore, the 3×3 dither matrix is used for the gray-scale value corresponding to the predetermined area, so as to increase the gray-scale number. Subsequently, it becomes possible to make an inputted gray-scale number coincide with the gray-scale number of a displayed image.
According to another mode of the above-described image-display apparatus, the interpolation device can perform the dither process by using the second dither matrix only for image data having a predetermined gray-scale value of the m-bit image data. Therefore, as for image data other than the image data having the predetermined gray-scale value, it becomes possible to make the inputted gray-scale number coincide with that of a displayed image without changing the pixel size of the dither matrix used for the dither process. For example, for image data having a predetermined number of gray scales, the dither process can be performed by using a dither matrix including a predetermined number of gray scales corresponding to three steps. Subsequently, it becomes possible to make the gray-scale number of the displayed image coincide with that of the inputted image.
According to another mode of the above-described image-display apparatus, the bit-number decrease device can use high-order n bits of the m-bit image data, as the n-bit image data. The bit-number decrease means performs bit-slice for several low-order bits of an inputted image data, for example. Subsequently, the data amount is adjusted so that the data can be displayed on the image display.
According to an exemplary embodiment, the m bits are eight bits, the n bits are six bits, and the number of gray scales corresponding to the m bits is 256. The above-described process is performed for inputted full-color image data of eight bits for each color, so as to display image data of six bits for each color.
Further, according to another exemplary embodiment, the interpolation device increases the image data by as much as 186 gray scales by performing the dither process using the first dither matrix and increases the image data by as much as 6 gray scales by performing the dither process using the second dither matrix. Where an inputted image has the 256 gray scales, first, the bit-number decrease means decreases the gray-scale number to 64. Of the shortage of 192 (256−64) gray scales, 186 gray scales are interpolated by using the first dither matrix and the remaining six gray scales are interpolated by using the second dither matrix.
According to a similar aspect of the invention, there is provided an image-display method performed by an image-display apparatus comprising an image display that can display n-bit gray scales. The image-display method can include an image-data obtaining step for obtaining m-bit image data to be displayed, a bit-number decreasing step for decreasing the number of bits of the image data from m to n, an interpolation step for interpolating a predetermined number of gray scales for the n-bit image data by performing a dither process and generating interpolation image data having a predetermined number of gray scales corresponding to the m bits, and a display control step for displaying the interpolation image data on the image display.
According to another similar aspect of the invention, there can be provided an image-display program executed by an image-display apparatus comprising an image processing unit and an image display that can display n-bit gray scales. The executed image-display program makes the image-display apparatus function as an image-data obtain device for obtaining m-bit image data to be displayed, a bit-number decrease device for decreasing the number of bits of the image data from m to n, an interpolation device for interpolating a predetermined number of gray scales for the n-bit image data by performing a dither process and generating interpolation image data having a predetermined number of gray scales corresponding to the m bits, and a display control device for displaying the interpolation image data on the image display.
Accordingly, it becomes possible to perform interpolation for displaying a predetermined number of gray scales that are the same as those of obtained image data on an image display that can display a limited number of gray scales by using the above-described image-display method and image-display program, as is the case with the above-described image-display apparatus.
The invention will be described with reference to the accompanying drawings, wherein like elements reference like numerals, and wherein:
FIGS. 3(a) and 3(b) illustrate a dither process using a 2×2 dither matrix;
FIGS. 6(a) and 6(b) illustrate a dither process using a 3×3 dither matrix;
FIGS. 11(a) and 11(b) illustrate dither matrixes used for an exemplary embodiment 2b; and
Embodiments of the invention will now be described with reference to the attached drawings.
The transceiver 214 can receive contents, such as image data, from outside sources. Here, the details of a data process performed by the mobile terminal 210 will be described, mainly for the case where the mobile terminal 210 receives image data. The mobile terminal 210 receives image data, where a user has access to a server for rendering a contents-providing service by operating the mobile terminal 210 and inputs an instruction for downloading predetermined image data, for example. The image data received by the mobile terminal 210 includes moving-image data and static-image data. Here, the mobile terminal 210 receives RGB 24-bit image data (eight bits for each color) per one pixel. The image data received by the transceiver 214 is transmitted to the CPU 216 or the like. Further, the image data can be stored in the RAM 224.
Where the mobile terminal 210 is formed as the mobile phone, the input unit 218 can be formed as various types of operation buttons. Further, where the mobile terminal 210 is formed as the PDA, the input unit 218 can be formed as a tablet that can detect a touch of a touch pen or the like. Therefore, the user can provide various instructions and make selections by using the input unit 218. The instructions and selection instructions inputted to the input unit 218 are converted to electric signals and transmitted to the CPU 216.
The program ROM 220 stores various programs for performing various functions of the mobile terminal 210. Particularly, according to this embodiment, the program ROM 220 stores a bit-slice-process program for performing a bit-slice process for the image data transmitted from the transceiver 214 and a dither-process program for performing a dither process.
The RAM 224 can be used as a work memory for converting the image data according to a program such as the above-described bit-slice-process program, the dither-process program, and so forth. Further, the RAM 224 can store the image data transmitted from the outside sources to the transceiver 214 and image data obtained from a camera (not shown) mounted on the mobile terminal 210, as required.
The CPU 216 performs the various functions of the mobile terminal 210 by executing various programs stored in the program ROM 220. In this embodiment, the CPU 216 reads and executes the programs stored in the program ROM 220, thereby functioning as a bit-slice-processing unit 231 and a dither-processing unit 232.
First, the bit-slice-processing unit 231 performs a bit-slice process for reducing the image-data amount for image data or the like transmitted from the transceiver 214. For example, where data of eight bits for each of colors R, G, and B is inputted, low-order two bits of each color are reduced, so that data of six bits is obtained. That is to say, where the bit-slice processing unit 231 performs the bit-slice process, image data S1 is generated as the remainder of the data-amount reduction and image data S2 is generated as the data amount reduced from the eight-bit data. The image data S1 and the image data S2 are transmitted to the dither-processing unit 232, respectively. In the above-described example, high-order six-bit data corresponds to the image data S1 and low-order two-bit data corresponds to the image data S2.
Next, the dither-processing unit 232 performs a dither process for inputted image data. More specifically, the dither-processing unit 232 performs the dither process for the inputted image data S1 based on the image data S2 reduced from the eight-bit data. Otherwise, the dither-processing unit 232 combines the high-order-bit image data S1 and the low-order-bit image data S2, thereby generating image data before being subjected to the bit-slice process. Then, the dither-processing unit 232 performs the dither process for the image data S1 based on the generated image data. Since the display 212 formed as the liquid-crystal display or the like cannot display all colors of eight-bit full-color (256 gray scales) image data, the above-described dither process is performed for increasing the gray-scale number simulatively, so as to present the eight-bit full-color image data by using colors of six-bit gray scales, for example. Therefore, though the gray-scale number of element colors corresponds to six bits, it becomes possible to present the colors of the 256 gray scales by presenting the half-tone of the six-bit gray scales simulatively. This dither process is performed for each of colors R, G, and B. The details of the dither process will be described below.
Further, the CPU 216 performs the various functions of the mobile terminal 210 by executing various programs other than the bit-slice-process program and the dither-process program. However, since the other programs do not directly relate to the invention, the description thereof is omitted.
The display 212 is formed as a lightweight and low-profile display, such as an LCD (liquid crystal display), and can include a liquid-crystal display panel 227 and a driver 226 formed as a semiconductor device. The display 212 can function as a processing unit for processing image data transmitted from the CPU 216. Since this function does not directly relate to the invention, the description thereof is omitted.
In
A dither process according to this exemplary embodiment will now be described. As described above, the dither process is performed by the dither-processing unit 232 provided in the CPU 216. The image data S1 obtained as the remainder of the bit-slice process performed by the bit-slice processing unit 231 and the image data S2 bit-sliced off by the bit-slice-processing unit 231 are inputted to the dither-processing unit 232. In this embodiment, full-color image data of eight bits for each of colors R, G, and B is inputted to the bit-slice processing unit 231. Further, the high-order six bits of the data is inputted to the dither-processing unit 232, as the image data S1, and the low-order two bits of the data is inputted to the dither processing unit 232, as the image data S2.
Since the display 212 formed as the liquid-crystal display or the like cannot display all colors of eight-bit full-color (256 gray scales) image data, the dither process of this embodiment is performed for increasing the gray-scale number simulatively, so as to present the eight-bit full-color data by using colors of six-bit gray scale, for example. Therefore, though the gray-scale number of element colors corresponds to six bits, it becomes possible to present the colors of the 256 gray scales by presenting the half tone of the six-bit gray scales simulatively.
The dither processing will now be described in detail with reference to
A dither matrix is shown at the center of
Next, the dither process performed by using the above-described 2×2 dither matrix will be described. The dither process is performed for a set of pixels of the same size as that of the dither matrix (hereinafter referred to as block) as a unit. That is to say, the 2×2 dither matrix is used for each of blocks including length-to-width 2×2 pixels of image data subjected to the dither process as a unit. An example 2×2-pixel block is shown on the left of
For each pixel, the value of the low-order two bits (the image data S2) of image data corresponding to the pixel is compared to a threshold value corresponding to the pixel in the 2×2 dither matrix. For example, as for a pixel al at the upper left of the block a shown in
Where the 2×2 dither matrix is used for a 2×2-pixel block as a unit, the gray-scale value of each block after the dither process corresponds to any one of four patterns shown on the right side of
However, where the above-described dither process is performed evenly for every inputted data of the 256 gray scales, so as to interpolate three gray scales simulatively between the steps of the 64 gray scales, only 253 gray scales are represented, as described above. This is because the number of gaps between the 256 gray scales is smaller than the gray-scale number by as much as one.
A method according to a first exemplary embodiment will now be described. Where three gray scales are interpolated evenly between the gaps of the 64 gray scales in the above-described manner, the gray-scale number becomes 3 short of 256. Therefore, in this embodiment, interpolation is performed for the three gray-scale shortage. More specifically, the dither process is performed by using a dither matrix of a predetermined size larger than that of the other for a predetermined area of the 256 gray scales. Subsequently, it becomes possible to fully represent the colors of the 256 gray scales by using only the colors of the 64 gray scales. The process according to this embodiment can be performed by the CPU 216 including the above-described dither processing unit 232 or the like.
First, an exemplary embodiment 1a will be described with reference to
A specific processing method according to the embodiment 1a will now be described. In this embodiment, a predetermined process is performed by using a 3×3 dither matrix for each gap between a 0-level gray scale and a 1-level gray scale of the 64 gray scales. That is to say, six gray scales are interpolated between the 0-level gray scale and the 1-level gray scale.
As shown in
A specific example is shown in
However, pixels that represent the 64 gray scales and that have gray-scale values higher than one are represented by using the 2×2 dither matrix in the above-described manner. Subsequently, the final number of interpolated gray scales is shown as 62×3+6=192. Therefore, it becomes possible to represent the 256 gray scales by using the colors of the 64 gray scales.
Next, the above-described process performed by the dither processing unit 232 of the CPU 216 will be described with reference to a flowchart shown in
First, at step S101, the dither processing unit 232 of the CPU 216 obtains image data to be displayed from the bit-slice-processing unit 231. The obtained image data includes the image data S1 having six bits obtained by performing the bit-slice process for the full-color data of eight bits for each of colors R, G, and B, and the image data S2 including the low-order two bits. Next, at step S102, the dither processing unit 232 calculates the gray-scale values of the obtained image data for representing the 256 gray scales based on the image data S1 and the image data S2. Then, the dither processing unit 232 determines whether or not the gray-scale values are smaller than or equal to seven. Actually, this determination can be easily performed by comparing the value of (the gray-scale value+1) to “8”.
Here, where the gray-scale value is smaller than or equal to seven (for representing the 256 gray scales), (step S102; Yes), the process advances to step S103, so that the dither process is performed by using the 3×3 dither matrix in the above-described manner. However, where the gray-scale value of the inputted data is larger than seven (step S103; No), the process advances to step S104, so that the dither process is performed by using the 2×2 dither matrix. At step S104, the data with gray-scale values smaller than or equal to seven is represented by colors of from 0 to 1-level gray scales (for representing the 64 gray scales). (That is to say, three gray scales are added.) Since the gray scales larger than seven are allocated for the two-level gray scale or higher, three is subtracted from the inputted gray-scale value and the dither process shown in
Next, a processing method according to an exemplary embodiment 1b will be described. In the embodiment 1a, interpolation is performed for a lowest area (that is, the 0-level gray scale to the 1-level gray scale) by using the 3×3 dither matrix. However, in the embodiment 1b, the 3×3 dither process is performed for gray scales in a highest area.
In the process performed by the dither processing unit 232 of the CPU 216, it is determined whether or not the inputted gray-scale value is smaller than 247 or larger than 248. Where the gray-scale value is smaller than or equal to 247, the process is performed by using the 2×2 dither matrix. Where the gray-scale value is larger than 248, the process is performed by using the 3×3 dither matrix.
In an exemplary embodiment 1c, a process for interpolating the shortage of three gray scales is performed by using the 3×3 dither matrix, as in the above-described embodiments 1a and 1b. In the embodiment 1c, the process using the 3×3 dither matrix can be performed for a predetermined half-tone gray-scale area, without being limited to the lowest gray-scale area (0 to 1-level gray scales), of the highest gray-scale area (62 to 63-level gray scales). That is to say, the 3×3 dither process is performed for a predetermined intermediate area including seven gray scales. In the other areas, conversion is performed by using the 2×2 dither matrix.
In the process performed by the dither processing unit 232 of the CPU 216, it is determined whether or not an inputted gray-scale value is smaller than the value of a predetermined area, or larger than that. Further, it is determined whether or not the inputted gray-scale value corresponds to the value of the predetermined area. Where the inputted gray-scale value does not correspond to the value of the predetermined area, the CPU 216 performs the process by using the 2×2 dither matrix. Where the inputted gray-scale value corresponds to the value of the predetermined area, the CPU 216 performs the process by using the 3×3 dither matrix. Further, where the inputted gray-scale value corresponds to the value of an area higher than the predetermined area, three is subtracted from the inputted gray-scale value and the process is performed therefor by using the 2×2 dither matrix.
A process according to a second exemplary embodiment will now be described. In the above-described first embodiment, the 3×3 dither matrix is used for a predetermined gray-scale value, so as to interpolate the shortage of three gray scales. In this embodiment, however, the process is performed by using only the 2×2 dither matrix. According to a summary of this embodiment, half-tone gray scales are represented simulatively by using a three-value dither matrix (a matrix including gray-scale values corresponding to three steps) in the dither process.
This embodiment will be described more specifically with reference to
A process according to an exemplary embodiment 2for performing the above-described method will be described with reference to a flowchart shown in
First, at step S201, the dither processing unit 232 obtains the image data S1 corresponding to high-order six bits and the image data S2 corresponding to low-order two bits from the bit-slice-processing unit 231. Next, at step S202, the dither processing unit 232 determines whether or not a gray-scale value for representing the 256 gray scales indicated by the image data S1 and S2 is smaller than or equal to the value of a 11-level gray scale. Where the gray-scale value is smaller than or equal to eleven (step S202; Yes), the process advances to step S203.
At step S203, it is determined whether or not the gray-scale value is three. If the gray-scale value is three (step S203; Yes), the dither process is performed by using the dither matrix d1, at step S204. However, where the gray-scale value is not three (step S203; No), it is determined whether or not the gray-scale value is five, at step S205. Where the gray-scale value is five (step S205; Yes), the dither process is performed by using the dither matrix d2, at step S206. Where the gray-scale value is not five (step S205; No), it is determined whether or not the gray-scale value is eight, at step S207. Where the gray-scale value is eight (step S207; Yes), the dither process is performed by using the dither matrix d3, at step S208.
Where the gray-scale value is smaller than or equal to eleven and not any one of three, five, and eight, the ordinary dither process (that is, the dither process by using the two-value dither matrix) is performed, at step S209. Here, the ordinary dither process is performed for gray-scale values other than the gray-scale values three, five, and eight that are subjected to the special dither process. More specifically, the dither process is performed for gray-scale values smaller than or equal to two (zero, one, and two), as they are. However, where the gray-scale value is four, one is subtracted from the gray-scale value (that is, three), and the ordinary dither process is performed therefor. Where the gray-scale value is either six or seven, two is subtracted from the gray-scale value (that is, four or three), and the ordinary dither process is performed therefor. Further, where the gray-scale value is larger than or equal to nine, three is subtracted from the gray-scale value, and the ordinary dither process is performed therefor.
However, where the gray-scale value is larger than or equal to twelve (step S202; No), the process advances to step S210, so as to perform the ordinary dither process in the above-described manner. Since the special dither process is performed for data in an area where the gray-scale value is smaller than or equal to eleven, three is subtracted from the gray-scale value, and the ordinary dither process is performed therefor.
In the above-described embodiment, the process by using the dither matrix including three gray-scales is performed for a predetermined area corresponding to the gray-scale values zero to eleven. However, the process may be performed without being limited to the above-described embodiment. That is to say, the same process can be performed for any predetermined area, as described in the first embodiment.
Next, another exemplary embodiment different from the above-described embodiments will be described. In the embodiment 2a, the special process is performed only for the predetermined gray-scale value. However, according to a method of this embodiment, the dither process can be performed for the entire gray-scale values by using a new dither matrix. The dither process by using the new dither matrix is performed only for data in a predetermined area. A result of the dither process according to the embodiment 2a is the same as that of the dither process according to the embodiment 2b, as shown in
A process according to this embodiment will now be described with reference to
In this embodiment, numbers other than the threshold values are provided in the blocks of the tables. In
Next, the flow of a process according to this embodiment will now be described with reference to
First, the dither processing unit 232 receives the image data S1 corresponding to the high-order six bits and the image data S2 corresponding to the low-order two bits from the bit-slice processing unit 231, at step S301. Next, it is determined whether or not the gray-scale value of the inputted image data (for representing the 256 gray scales) is smaller than or equal to eleven, at step S302. Where the gray-scale value is smaller than or equal to eleven (step S302; Yes), the process advances to step S303.
It is determined whether or not the gray-scale value is smaller than or equal to six, at step S303. Where the gray-scale value is smaller than or equal to six (step S303; Yes), the process advances to step S304, so that the above-described dither process using Table 1 is performed. Where the gray-scale value is not smaller than or equal to six (step S303; No), the process advances to step S305, so that the dither process using Table 2 is performed.
On the other hand, where the gray-scale value is larger than or equal to twelve (step S302; No), the process advances to step S306, so that the ordinary dither process is performed. At this time, the special dither process is performed for data in an area where the gray-scale value is smaller than or equal to eleven. Therefore, three is subtracted from the gray-scale value and the ordinary dither process is performed therefor.
In the above-described exemplary embodiment, the process by using the dither matrix including three gray scales is performed for the predetermined area corresponding to the gray-scale values zero to eleven. However, the process may be performed without being limited to the above-described embodiment. That is to say, the same process can be performed for any predetermined area, as described in the first exemplary embodiment.
While this invention has been described in conjunction with the specific embodiments thereof, it is evident that many alternatives, modifications, and variations will be apparent to those skilled in the art. Accordingly, preferred embodiments of the invention as set forth herein are intended to be illustrative, not limiting. There are changes that may be made without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2003-318448 | Sep 2003 | JP | national |