The present disclosure relates to the imaging technology field, and more particularly to an image processing method, an image processing apparatus, an electronic device and a control method.
When an image is processed using a conventional image processing method, either the obtained image has a low resolution, or it takes a long time and too much resource to obtain an image with high resolution, both of which are inconvenient for users. On the other hand, in a practical application, the users usually pay attention to resolution of a main part of the image.
The present disclosure aims to solve at least one of existing problems in the related art to at least extent. Accordingly, the present disclosure provides an image processing method, an image processing apparatus and an electronic device.
Embodiments of the present disclosure provide an image processing method. The image processing method is configured to process a color-block image output by an image sensor. The image sensor includes an array of photosensitive pixel units, and each photosensitive pixel unit includes a plurality of photosensitive pixels. The color-block image includes image pixel units arranged in a preset array. Each image pixel unit includes a plurality of original pixels. Each photosensitive pixel unit corresponds to one image pixel unit, and each photosensitive pixel corresponds to one original pixel. The color-block image includes a fixed region. The image processing method includes: converting a part of the color-block image within the fixed region into a first image using a first interpolation algorithm, in which, the first image includes first simulation pixels arranged in an array, and each photosensitive pixel corresponds to one first simulation pixel; converting a part of the color-block image beyond the fixed region into a second image using a second interpolation algorithm, in which, the second image includes second simulation pixels arranged in an array, and each photosensitive pixel corresponds to one second simulation pixel, and a complexity of the second interpolation algorithm is less than that of the first interpolation algorithm; and merging the first image and the second image into a simulation image corresponding to the color-block image.
Embodiments of the present disclosure further provide an image processing apparatus. The image processing apparatus is configured to process a color-block image output by an image sensor. The image sensor includes an array of photosensitive pixel units, and each photosensitive pixel unit includes a plurality of photosensitive pixels. The color-block image includes image pixel units arranged in a preset array. Each image pixel unit includes a plurality of original pixels. Each photosensitive pixel unit corresponds to one image pixel unit, and each photosensitive pixel corresponds to one original pixel. The color-block image includes a fixed region. The image processing apparatus includes a non-transitory computer-readable medium comprising computer-readable instructions stored thereon, and an instruction execution system which is configured by the instructions to implement at least one of a first converting module, a second converting module, and a merging module. The first converting module is configured to convert a part of the color-block image within the fixed region into a first image using a first interpolation algorithm. The first image includes first simulation pixels arranged in an array, and each photosensitive pixel corresponds to one first simulation pixel. The second converting module is configured to convert a part of the color-block image beyond the fixed region into a second image using a second interpolation algorithm. The second image includes second simulation pixels arranged in an array, and each photosensitive pixel corresponds to one second simulation pixel. A complexity of the second interpolation algorithm is less than that of the first interpolation algorithm. The merging module is configured to merge the first image and the second image into a simulation image corresponding to the color-block image.
Embodiments of the present disclosure provide an electronic device. The electronic device includes a housing, a processor, a memory, a circuit board, a power supply circuit and an imaging apparatus. The circuit board is enclosed by the housing. The processor and the memory are positioned on the circuit board. The power supply circuit is configured to provide power for respective circuits or components of the electronic device. The imaging apparatus includes an image sensor configured to output a color-block image. The image sensor includes an array of photosensitive pixel units. Each photosensitive pixel unit comprises a plurality of photosensitive pixels. The color-block image includes image pixel units arranged in a preset array. Each image pixel unit includes a plurality of original pixels. The memory is configured to store executable program codes. The processor is configured to run a program corresponding to the executable program codes by reading the executable program codes stored in the memory, to perform the image processing method according to embodiments of the present disclosure.
Additional aspects and advantages of embodiments of the present disclosure will be given in part in the following descriptions, become apparent in part from the following descriptions, or be learned from the practice of the embodiments of the present disclosure.
These and other aspects and advantages of embodiments of the present disclosure will become apparent and more readily appreciated from the following descriptions made with reference to the drawings.
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings, in which the same or similar reference numbers throughout the drawings represent the same or similar elements or elements having same or similar functions. Embodiments described below with reference to drawings are merely exemplary and used for explaining the present disclosure, and should not be understood as limitation to the present disclosure.
In the related art, an image sensor includes an array of photosensitive pixel units and an array of filter units arranged on the array of photosensitive pixel unit. Each filter unit corresponds to and covers one photosensitive pixel unit, and each photosensitive pixel unit includes a plurality of photosensitive pixels. When working, the image sensor can be controlled to output a merged image, which can be converted into a merged true-color image by an image processing method and saved. The merged image includes an array of merged pixels, and a plurality of photosensitive pixels in a same photosensitive pixel unit are collectively outputted as one merged pixel. Thus, a signal-to-noise ratio of the merge image is increased. However, a resolution of the merged image is reduced.
Certainly, the image sensor also can be controlled to output a high pixel color-block image, which includes an array of original pixels, and each photosensitive pixel corresponds to one original pixel. However, since a plurality of original pixels corresponding to a same filter unit have the same color, the resolution of the color-block image still cannot be increased. Thus, the high pixel color-block image needs to be converted into a high pixel simulation image by an interpolation algorithm, in which the simulation image includes a Bayer array of simulation pixels. Then, the simulation image can be converted into a simulation true-color image by an image processing method and saved. However, the interpolation algorithm consumes resource and time, and the simulation true-color image is not required in all scenes.
Thus, embodiments of the present disclosure provide a novel image processing method.
Referring to
At block 10, a part of the color-block image within the fixed region is converted into a first image using a first interpolation algorithm.
The first image includes first simulation pixels arranged in an array, and each photosensitive pixel corresponds to one first simulation pixel.
At block 20, a part of the color-block image beyond the fixed region is converted into a second image using a second interpolation algorithm.
The second image includes second simulation pixels arranged in an array, and each photosensitive pixel corresponds to one second simulation pixel. A complexity of the second interpolation algorithm is less than that of the first interpolation algorithm.
At block 30, the first image and the second image are merged into a simulation image corresponding to the color-block image.
With the image processing method according to embodiments of the present disclosure, for different parts of the color-block image (i.e., a part within the fixed region and a part beyond the fixed region), different interpolation algorithms are adopted for image processing. The fixed region is an undraggable and size-fixed region displayed on a touch screen of an imaging apparatus in a preview mode. Specifically, when the user captures an image, the part of the image to be processed using the first interpolation algorithm may be placed in the fixed region by changing an image capturing position of the imaging apparatus. The first interpolation algorithm capable of improving distinguishability and resolution of the image is adopted for the part of the color-block image within the fixed region, and the second interpolation algorithm with complexity less than that of the first interpolation algorithm is adopted for the part of the color-block image beyond the fixed region, such that on one hand, SNR (signal to noise ratio), distinguishability and resolution of the image are improved, thereby improving user experience, on other hand, time required for image processing is reduced.
Referring to
At block 11, it is determined whether a color of a first simulation pixel is identical to that of an original pixel at a same position as the first simulation pixel, if yes, an act at block 12 is executed, otherwise, an act at block 13 is executed.
At block 12, a pixel value of the original pixel is determined as a pixel value of the first simulation pixel.
At block 13, the pixel value of the first simulation pixel is determined according to a pixel value of an association pixel.
The association pixel is selected from an image pixel unit with a same color as the first simulation pixel and adjacent to an image pixel unit including the original pixel.
Referring to
Further, the array 210 of photosensitive pixel units includes a plurality of photosensitive pixel units 210a. Each photosensitive pixel unit 210a includes a plurality of adjacent photosensitive pixels 212. Each photosensitive pixel 212 includes a photosensitive element 2121 and a transmission tube 2122. The photosensitive element 2121 may be a photodiode, and the transmission tube 2122 may be a MOS transistor.
The array 220 of filter units includes a plurality of filter units 220a. Each filter unit 220a corresponds to one photosensitive pixel unit 210a.
In detail, in some examples, the filter units are arranged in a Bayer array. In other words, four adjacent filter units 220a include one red filter unit, one blue filter unit and two green filter units.
Each photosensitive pixel unit 210a corresponds to a filter unit 220a with a same color. If a photosensitive pixel unit 210a includes n adjacent photosensitive elements 2121, one filter unit 220a covers n photosensitive elements 2121 in one photosensitive pixel unit 210a. The filter unit 220a may be formed integrally, or may be formed by assembling n separate sub filters.
In some implementations, each photosensitive pixel unit 210a includes four adjacent photosensitive pixels 212. Two adjacent photosensitive pixels 212 collectively form one photosensitive pixel subunit 2120. The photosensitive pixel subunit 2120 further includes a source follower 2123 and an analog-to-digital converter 2124. The photosensitive pixel unit 210a further includes an adder 213. A first electrode of each transmission tube 2122 in the photosensitive pixel subunit 2120 is coupled to a cathode electrode of a corresponding photosensitive element 2121. Second electrodes of all the transmission tubes 2122 are collectively coupled to a gate electrode of the source follower 2123 and coupled to an analog-to-digital converter 2124 via the source electrode of the source follower 2123. The source follower 2123 may be a MOS transistor. Two photosensitive pixel subunits 2120 are coupled to the adder 213 via respective source followers 2123 and respective analog-to-digital converters 2124.
In other words, four adjacent photosensitive elements 2121 in one photosensitive pixel unit 210a of the image sensor 200 according to an embodiment of the present disclosure collectively use one filter unit 220a with a same color as the photosensitive pixel unit. Each photosensitive element 2121 is coupled to a transmission tube 2122 correspondingly. Two adjacent photosensitive elements 2121 collectively use one source follower 2123 and one analog-digital converter 2124. Four adjacent photosensitive elements 2121 collectively use one adder 213.
Further, four adjacent photosensitive elements 2121 are arranged in a 2-by-2 array. Two photosensitive elements 2121 in one photosensitive pixel subunit 2120 can be in a same row.
During an imaging process, when two photosensitive pixel subunits 2120 or four photosensitive elements 2121 covered by a same filter unit 220a are exposed simultaneously, pixels can be merged, and the merged image can be outputted.
In detail, the photosensitive element 2121 is configured to convert light into charge, and the charge is proportional to an illumination intensity. The transmission tube 2122 is configured to control a circuit to turn on or off according to a control signal. When the circuit is turned on, the source follower 2123 is configured to convert the charge generated through light illumination into a voltage signal. The analog-to-digital converter 2124 is configured to convert the voltage signal into a digital signal. The adder 213 is configured to add two digital signals for outputting.
Referring to
However, when the size of the photosensitive pixel 212 is increased, the pixel value is decreased, and thus the resolution of the merged image is decreased.
During an imaging process, when four photosensitive elements 2121 covered by a same filter unit 220a are exposed in sequence, a color-block image is output after an image processing.
In detail, the photosensitive element 2121 is configured to convert light into charge, and the charge is proportional to an illumination intensity. The transmission tube 2122 is configured to control a circuit to turn on or off according to a control signal. When the circuit is turned on, the source follower 2123 is configured to convert the charge generated through light illumination into a voltage signal. The analog-to-digital converter 2124 is configured to convert the voltage signal into a digital signal for being processed.
Referring to
The image processing method according to an embodiment of the present disclosure is able to process the output color-block image to obtain a simulation image.
In some embodiments, when a merged image is output, four adjacent photosensitive pixels 212 with the same color can be output as one merged pixel. Accordingly, four adjacent merged pixels in the merged image can be considered as being arranged in a typical Bayer array, and can be processed directly to output a merged true-color image. When a color-block image is output, each photosensitive pixel 212 is output separately. Since four adjacent photosensitive pixels 212 have a same color, four adjacent original pixels in an image pixel unit have a same color, which form an untypical Bayer array. However, the untypical Bayer array cannot be directly processed. In other words, when the image sensor 200 adopts a same apparatus for processing the image, in order to realize a compatibility of the true-color image outputs under two modes (i.e., the merged true-color image under a merged mode and the simulation true-color image under a color-block mode), it is required to convert the color-block image into the simulation image, or to convert the image pixel unit in an untypical Bayer array into pixels arranged in the typical Bayer array.
The simulation image includes simulation pixels arranged in the Bayer array. Each photosensitive pixel corresponds to one simulation pixel. One simulation pixel in the simulation image corresponds to an original pixel located at the same position as the simulation pixel and in the color-block image. According to embodiments of the present disclosure, the simulation image is merged by the first image and the second image.
By using the first interpolation algorithm, the part of the color-block image within the fixed region can be converted into the first image. The first image includes first simulation pixels arranged in an array and each photosensitive pixel corresponds to one first simulation pixel.
Referring to
When the first simulation pixel R3′3′ is obtained, since the first simulation pixel R3′3′ has the same color as the corresponding original pixel R33, the pixel value of the original pixel R33 is directly determined as the pixel value of the first simulation pixel R3′3′ during conversion.
When the first simulation pixel R5′5′ is obtained, since the first simulation pixel R5′5′ has a color different from that of the corresponding original pixel B55, the pixel value of the original pixel B55 cannot be directly determined as the pixel value of the first simulation pixel R5′5′, and it is required to calculate the pixel value of the first simulation pixel R5′5′ according to an association pixel of the first simulation pixel R5′5′ by a first interpolation algorithm.
It should be noted that, a pixel value of a pixel mentioned in the context should be understood in a broad sense as a color attribute value of the pixel, such as a color value.
There may be more than one association pixel unit for each first simulation pixel, for example, there may be four association pixel units, in which the association pixel units have the same color as the first simulation pixel and are adjacent to the image pixel unit including the original pixel at the same position as the first simulation pixel.
It should be noted that, “adjacent” here should be understood in a broad sense. Take
In different cases, the original pixels can be converted into the first simulation pixels in different ways, thus converting the color-block image into the first image. Since the filters in the Bayer array are adopted when shooting the image, the SNR of the image is improved. During the image processing procedure, the interpolation processing is performed on the color-block image by the first interpolation algorithm, such that the distinguishability and resolution of the image can be improved.
Referring to
At block 131, a change of the color of the first simulation pixel in each direction of at least two directions is calculated according to the pixel value of the association pixel.
At block 132, a weight in each direction of the at least two directions is calculated according to the change.
At block 133, the pixel value of the first simulation pixel is calculated according to the weight and the pixel value of the association pixel.
In detail, the first interpolation algorithm is realized as follows: with reference to energy changes of the image in different directions and according to weights of the association pixels in different directions, the pixel value of the first simulation pixel is calculated by a linear interpolation. From the direction having a smaller energy change, it can get a higher reference value, i.e., the weight for this direction in the interpolation is high.
In some examples, for sake of convenience, only the horizontal direction and the vertical direction are considered.
The pixel value of the first simulation pixel R5′5′ is obtained by an interpolation based on the original pixels R44, R74, R47 and R77. Since there is no original pixel with a same color as the simulation pixel (i.e., R) in the horizontal direction and the vertical direction of the original pixel R55 corresponding the first simulation pixel R5′5′, a component of this color (i.e., R) in each of the horizontal direction and the vertical direction is calculated according to the association pixels. The components in the horizontal direction are R45 and R75, and the components in the vertical direction are R54 and R57. All the components can be calculated according to the original pixels R44, R74, R47 and R77.
In detail, R45=R44*⅔+R47*⅓, R75=⅔ *R74+⅓ *R77, R54=⅔ *R44+⅓ *R74, R57=⅔ *R47+⅓ *R77.
The change of color and the weight in each of the horizontal direction and the vertical direction are calculated respectively. In other words, according to the change of color in each direction, the reference weight in each direction used in the interpolation is determined. The weight in the direction with a small change is high, while the weight in the direction with a big change is low. The change in the horizontal direction is X1=|R45−R75|. The change in the vertical direction is X2=|R54−R57|, W1=X1/(X1+X2), W2=X2/(X1+X2).
After the above calculation, the pixel value of the first simulation pixel R5′5′ can be calculated as R5′5′=(⅔ *R45+⅓ *R75)*W2+(⅔ *R54+⅓ *R57)*W1. It can be understood that, if X1>X2, then W1>W2. The weight in the horizontal direction is W2, and the weight in the vertical direction is W1, vice versa.
Accordingly, the pixel value of the first simulation pixel can be calculated by the first interpolation algorithm. After the calculations on the association pixels, the original pixels can be converted into the first simulation pixels arranged in the typical Bayer array. In other words, four adjacent first simulation pixels arranged in the 2-by-2 array include one red first simulation pixel, two green first simulation pixels and one blue first simulation pixel.
It should be noted that, the first interpolation algorithm is not limited to the above-mentioned method, in which only the pixel values of pixels with a same color as the simulation pixel in the vertical direction and the horizontal direction are considered during calculating the pixel value of the first simulation pixel. In other embodiments, pixel values of pixels with other colors can also be considered.
Referring to
Accordingly, after the act at 13, the method further includes performing a reverse white-balance compensation on the first image, as illustrated at block 15.
In detail, in some examples, when converting the color-block image into the first image, in the first interpolation algorithm, the red and blue first simulation pixels not only refer to the color weights of original pixels having the same color as the first simulation pixels, but also refer to the color weights of original pixels with the green color. Thus, it is required to perform the white-balance compensation before the interpolation to exclude an effect of the white-balance in the first interpolation algorithm. In order to avoid the white-balance of the color-block image, it is required to perform the reverse white-balance compensation after the first interpolation algorithm according to gain values of the red, green and blue colors in the compensation.
Referring to
It can be understood that, limited by the manufacturing process, there may be bad points in the image sensor 200. The bad point presents a same color all the time without varying with the photosensibility, which affects quality of the image. In order to ensure an accuracy of the interpolation and prevent from the effect of the bad points, it is required to perform the bad-point compensation before the first interpolation algorithm is performed.
In detail, during the bad-point compensation, the original pixels are detected. When an original pixel is detected as the bad point, the bad-point compensation is performed according to pixel values of other original pixels in the image pixel unit where the original pixel is located.
In this way, the effect of the bad point on the interpolation can be avoided, thus improving the quality of the image.
Referring to
In detail, four photosensitive pixels 212 in one photosensitive pixel unit 210a cover the filters with the same color, and the photosensitive pixels 212 have differences in photosensibility, such that fixed spectrum noise may occur in pure-color areas in the first true-color image outputted after converting the first image and the quality of the image may be affected. Therefore, it is required to perform the crosstalk compensation.
Referring to
It can be understood that, after the color-block image is converted into the first image, the first simulation pixels are arranged in the typical Bayer array. The first image can be processed, during which, the mirror shape correction, the demosaicking processing, the denoising processing and the edge sharpening processing are included, such that the true-color image can be obtained and output to the user.
For the part of the color-block image beyond the fixed region, it is required to process this part using the second interpolation algorithm. By using the second interpolation algorithm, the part of the color-block image beyond the fixed region can be converted into the second image. The second image includes second simulation pixels arranged in an array, and each photosensitive pixel corresponds to one second simulation pixel.
Referring to
At block 21, an average pixel value of each image pixel unit of the color-block image is calculated.
At block 22, it is determined whether a color of a second simulation pixel is identical to that of an original pixel at a same position as the second simulation pixel, if yes, an act at block 33 is executed, otherwise, an act at block 34 is executed.
At block 23, an average pixel value of an image pixel unit including the original pixel is determined as a pixel value of the second simulation pixel.
At block 24, an average pixel value of an image pixel unit with a same color as the second simulation pixel and adjacent to an image pixel unit including the original pixel is determined as a pixel value of the second simulation pixel.
In detail, referring to
Since the second interpolation algorithm is simpler than the first interpolation algorithm, data to be processed by the second interpolation algorithm is less than that to be processed by the first interpolation algorithm, the complexity (for example, including time complexity and space complexity) of the second complexity is less than that of the first interpolation algorithm.
By using the second interpolation algorithm, the complexity of the process in which an untypical Bayer array is converted into a typical Bayer array is small. The distinguishability of the second image can also be improved by the second interpolation algorithm, but the effect of the second image is poorer than that of the first image generated using the first interpolation algorithm. Therefore, the first interpolation algorithm is used to process the part of the color-block image within the fixed region and the second interpolation algorithm is used to process the part of the color-block image beyond the fixed region, thus improving the distinguishability and effect of the main part of the image, improving the user experience and reducing the time for processing the image.
In some embodiments, when the image sensor is in an electronic device including a touch screen, the image processing method further includes the following to determine the fixed region of the color-block image can be determined as follows, as illustrated in
At block 41, the color-block image is converted into a preview image using a third interpolation algorithm.
A complexity of the third interpolation algorithm is less than that of the first interpolation algorithm.
At block 42, the touch screen is controlled to display the preview image.
At block 43, the touch screen is controlled to display a prompt pattern to indicate the fixed region.
In some embodiments, after the image sensor outputs the color-block image, it is required to convert the color-block image into a true-color image and display on the touch screen for previewing. The color-block image can be converted into the true-color image using the third interpolation algorithm as follows: the color-block image is converted into a simulation image in a typical Bayer array using the second interpolation algorithm, the simulation image is further interpolated, for example by using a bilinear interpolation method to obtain the true-color image, and the true-color image is displayed on the touch screen.
In detail, referring to
Although
The first converting module 410 is configured to convert a part of the color-block image within the fixed region into a first image using a first interpolation algorithm. The first image includes first simulation pixels arranged in an array, and each photosensitive pixel corresponds to one first simulation pixel. The second converting module 420 is configured to convert a part of the color-block image beyond the fixed region into a second image using a second interpolation algorithm. The second image includes second simulation pixels arranged in an array, and each photosensitive pixel corresponds to one second simulation pixel. A complexity of the second interpolation algorithm is less than that of the first interpolation algorithm. The merging module 430 is configured to merge the first image and the second image into a simulation image corresponding to the color-block image.
In other words, the act at block 10 can be implemented by the first converting module 410. The act at block 20 can be implemented by the second converting module 420. The act at block 30 can be implemented by the merging module 430.
With the image processing apparatus according to embodiments of the present disclosure, for different parts of the color-block image (i.e., a part within the fixed region and a part beyond the fixed region), different interpolation algorithms are adopted for image processing. The fixed region is an undraggable and size-fixed region displayed on a touch screen of an imaging apparatus in a preview mode. Specifically, when the user captures an image, the part of the image to be processed using the first interpolation algorithm may be placed in the fixed region by changing an image capturing position of the imaging apparatus. The first interpolation algorithm capable of improving distinguishability and resolution of the image is adopted for the part of the color-block image within the fixed region, and the second interpolation algorithm with complexity less than that of the first interpolation algorithm is adopted for the part of the color-block image beyond the fixed region, such that on one hand, SNR (signal to noise ratio), distinguishability and resolution of the image are improved, thereby improving user experience, on other hand, time required for image processing is reduced.
Referring to
Referring to
Referring to
In some implementations, the first converting module 410 further includes a second compensating unit 416. The act at block 16 can be implemented by the second compensating unit 416. In other words, the second compensating unit 416 is configured to perform a bad-point compensation on the color-block image.
In some implementations, the first converting module 410 further includes a third compensating unit 417. The act at block 17 can be implemented by the third compensating unit 417. In other words, the third compensating unit 417 is configured to perform a crosstalk compensation on the color-block image.
Referring to
The third converting module 441 is configured to convert the color-block image into a preview image using a third interpolation algorithm. A complexity of the third interpolation algorithm is less than that of the first interpolation algorithm. The first control module 442 is configured to control the touch screen to display the preview image. The second control module 443 is configured to control the touch screen to display a prompt pattern to indicate the fixed region.
In other words, the act at block 41 is implemented by the third converting module 441. The act at block 42 is implemented by the first control module 442. The act at block 43 is implemented by the second control module 443.
The present disclosure also provides an electronic device.
The processor 1002 is configured to run a program corresponding to the executable program codes by reading the executable program codes stored in the memory 1003, to perform following operations: converting a part of the color-block image within the fixed region into a first image using a first interpolation algorithm, in which, the first image includes first simulation pixels arranged in an array, and each photosensitive pixel corresponds to one first simulation pixel; converting a part of the color-block image beyond the fixed region into a second image using a second interpolation algorithm, in which, the second image includes second simulation pixels arranged in an array, and each photosensitive pixel corresponds to one second simulation pixel, and a complexity of the second interpolation algorithm is less than that of the first interpolation algorithm; and merging the first image and the second image into a simulation image corresponding to the color-block image.
In some implementations, the imaging apparatus includes a front camera or a real camera (not illustrated in
In some implementations, the processor 1002 is configured to run a program corresponding to the executable program codes by reading the executable program codes stored in the memory 1003, to convert a part of the color-block image within the fixed region into a first image using a first interpolation algorithm by acts of: determining whether a color of a first simulation pixel is identical to that of an original pixel at a same position as the first simulation pixel; when the color of the first simulation pixel is identical to that of the original pixel at the same position as the first simulation pixel, determining a pixel value of the original pixel as a pixel value of the first simulation pixel; and when the color of the first simulation pixel is different from that of the original pixel at the same position as the first simulation pixel, determining the pixel value of the first simulation pixel according to a pixel value of an association pixel, wherein the association pixel is selected from an image pixel unit with a same color as the first simulation pixel and adjacent to an image pixel unit comprising the original pixel.
In some implementations, the processor 1002 is configured to run a program corresponding to the executable program codes by reading the executable program codes stored in the memory 1003, to determine the pixel value of the first simulation pixel according to a pixel value of an association pixel by acts of: calculating a change of the color of the first simulation pixel in each direction of at least two directions according to the pixel value of the association pixel; calculating a weight in each direction of the at least two directions according to the change; and calculating the pixel value of the first simulation pixel according to the weight and the pixel value of the association pixel.
In some implementations, the processor 1002 is configured to run a program corresponding to the executable program codes by reading the executable program codes stored in the memory 1003, to convert a part of the color-block image beyond the fixed region into a second image using a second interpolation algorithm by acts of: calculating an average pixel value of each image pixel unit of the color-block image; determining whether a color of a second simulation pixel is identical to that of an original pixel at a same position as the second simulation pixel; when the color of the second simulation pixel is identical to that of the original pixel at the same position as the second simulation pixel, determining an average pixel value of an image pixel unit comprising the original pixel as a pixel value of the second simulation pixel; and when the color of the second simulation pixel is different from that of the original pixel at the same position as the second simulation pixel, determining an average pixel value of an image pixel unit with a same color as the second simulation pixel and adjacent to an image pixel unit comprising the original pixel as a pixel value of the second simulation pixel.
In some implementations, the processor 1002 is configured to run a program corresponding to the executable program codes by reading the executable program codes stored in the memory 1003, to perform following operations: performing a white-balance compensation on the color-block image; and performing a reverse white-balance compensation on the first image.
In some implementations, the processor 1002 is configured to run a program corresponding to the executable program codes by reading the executable program codes stored in the memory 1003, to perform following operations: performing at least one of a bad-point compensation and a crosstalk compensation on the color-block image.
In some implementations, the processor 1002 is configured to run a program corresponding to the executable program codes by reading the executable program codes stored in the memory 1003, to perform following operations: performing at least one of a mirror shape correction, a demosaicking processing, a denoising processing and an edge sharpening processing on the first image.
In some implementations, the electronic device may be an electronic equipment provided with an imaging apparatus, such as a mobile phone or a tablet computer, which is not limited herein.
The electronic device 1000 may further include an inputting component (not illustrated in
It should be understood that, the electronic device 1000 may further include one or more of the following components: an audio component, an input/output (I/O) interface, a sensor component and a communication component. The audio component is configured to output and/or input audio signals, for example, the audio component includes a microphone. The I/O interface is configured to provide an interface between the processor 1002 and peripheral interface modules. The sensor component includes one or more sensors to provide status assessments of various aspects of the electronic device 1000. The communication component is configured to facilitate communication, wired or wirelessly, between the electronic device 1000 and other devices.
It is to be understood that phraseology and terminology used herein with reference to device or element orientation (such as, terms like “center”, “longitudinal”, “lateral”, “length”, “width”, “height”, “up”, “down”, “front”, “rear”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “anticlockwise”, “axial”, “radial”, “circumferential”) are only used to simplify description of the present invention, and do not indicate or imply that the device or element referred to must have or operated in a particular orientation. They cannot be seen as limits to the present disclosure.
Moreover, terms of “first” and “second” are only used for description and cannot be seen as indicating or implying relative importance or indicating or implying the number of the indicated technical features. Thus, the features defined with “first” and “second” may comprise or imply at least one of these features. In the description of the present disclosure, “a plurality of” means two or more than two, unless specified otherwise.
In the present disclosure, unless specified or limited otherwise, the terms “mounted,” “connected,” “coupled,” “fixed” and the like are used broadly, and may be, for example, fixed connections, detachable connections, or integral connections; may also be mechanical or electrical connections; may also be direct connections or indirect connections via intervening structures; may also be inner communications of two elements or interactions of two elements, which can be understood by those skilled in the art according to specific situations.
In the present disclosure, unless specified or limited otherwise, a structure in which a first feature is “on” a second feature may include an embodiment in which the first feature directly contacts the second feature, and may also include an embodiment in which the first feature indirectly contacts the second feature via an intermediate medium. Moreover, a structure in which a first feature is “on”, “over” or “above” a second feature may indicate that the first feature is right above the second feature or obliquely above the second feature, or just indicate that a horizontal level of the first feature is higher than the second feature. A structure in which a first feature is “below”, or “under” a second feature may indicate that the first feature is right under the second feature or obliquely under the second feature, or just indicate that a horizontal level of the first feature is lower than the second feature.
Various embodiments and examples are provided in the following description to implement different structures of the present disclosure. In order to simplify the present disclosure, certain elements and settings will be described. However, these elements and settings are only examples and are not intended to limit the present disclosure. In addition, reference numerals may be repeated in different examples in the disclosure. This repeating is for the purpose of simplification and clarity and does not refer to relations between different embodiments and/or settings. Furthermore, examples of different processes and materials are provided in the present disclosure. However, it would be appreciated by those skilled in the art that other processes and/or materials may be also applied.
Reference throughout this specification to “an embodiment,” “some embodiments,” “an example,” “a specific example,” or “some examples,” means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, exemplary descriptions of aforesaid terms are not necessarily referring to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples. Moreover, those skilled in the art could combine different embodiments or different characteristics in embodiments or examples described in the present disclosure.
Any process or method described in a flow chart or described herein in other ways may be understood to include one or more modules, segments or portions of codes of executable instructions for achieving specific logical functions or steps in the process, and the scope of a preferred embodiment of the present disclosure includes other implementations, wherein the order of execution may differ from that which is depicted or discussed, including according to involved function, executing concurrently or with partial concurrence or in the contrary order to perform the function, which should be understood by those skilled in the art.
The logic and/or step described in other manners herein or shown in the flow chart, for example, a particular sequence table of executable instructions for realizing the logical function, may be specifically achieved in any computer readable medium to be used by the instruction execution system, device or equipment (such as the system based on computers, the system comprising processors or other systems capable of acquiring the instruction from the instruction execution system, device and equipment and executing the instruction), or to be used in combination with the instruction execution system, device and equipment. As to the specification, “the computer readable medium” may be any device adaptive for including, storing, communicating, propagating or transferring programs to be used by or in combination with the instruction execution system, device or equipment. More specific examples of the computer-readable medium comprise but are not limited to: an electronic connection (an electronic device) with one or more wires, a portable computer enclosure (a magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or a flash memory), an optical fiber device and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other appropriate medium capable of printing programs thereon, this is because, for example, the paper or other appropriate medium may be optically scanned and then edited, decrypted or processed with other appropriate methods when necessary to obtain the programs in an electric manner, and then the programs may be stored in the computer memories.
It should be understood that each part of the present disclosure may be realized by hardware, software, firmware or their combination. In the above embodiments, a plurality of steps or methods may be realized by the software or firmware stored in the memory and executed by the appropriate instruction execution system. For example, if it is realized by the hardware, likewise in another embodiment, the steps or methods may be realized by one or a combination of the following techniques known in the art: a discrete logic circuit having a logic gate circuit for realizing a logic function of a data signal, an application-specific integrated circuit having an appropriate combination logic gate circuit, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
Those skilled in the art shall understand that all or parts of the steps in the above exemplifying method for the present disclosure may be achieved by commanding the related hardware with programs, the programs may be stored in a computer-readable storage medium, and the programs comprise one or a combination of the steps in the method embodiments of the present disclosure when running on a computer.
In addition, each function cell of the embodiments of the present disclosure may be integrated in a processing module, or these cells may be separate physical existence, or two or more cells are integrated in a processing module. The integrated module may be realized in a form of hardware or in a form of software function modules. When the integrated module is realized in a form of software function module and is sold or used as a standalone product, the integrated module may be stored in a computer-readable storage medium.
The storage medium mentioned above may be read-only memories, magnetic disks, CD, etc.
Although embodiments of present disclosure have been shown and described above, it should be understood that above embodiments are just explanatory, and cannot be construed to limit the present disclosure, for those skilled in the art, changes, alternatives, and modifications can be made to the embodiments without departing from spirit, principles and scope of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201611079583.7 | Nov 2016 | CN | national |
This application is a continuation application of a U.S. patent application Ser. No. 15/728,241, filed Oct. 9, 2017, which claims priority to Chinese Patent Application No. 201611079583.7, filed Nov. 29, 2016, each of which is incorporated by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
Parent | 15728241 | Oct 2017 | US |
Child | 16195551 | US |