Using luminance distributions to detect best areas of an image for prediction of noise levels
An image processing apparatus and method are provided whereby one or more memories stores instructions which, when executed by one or more processors configures the one or more processors to perform operations including obtaining image data stored in memory of a processing device, defining one or more regions of the image to be processed based on luminance values of the region, providing, as input data, the one or more defined regions of the image to an classifier that has been trained to use image data to estimate noise in an image to output a prediction that the input data is in a first class or a second class, calculating an average by predicted class, and labeling the obtained image as the first class or second class based on the calculated average.
Latest Canon Patents:
This application is a National Phase Application of International Application No. PCT/US2021/058433, filed Nov. 8, 2021 which claims the benefit of priority from U.S. Provisional Patent Application Ser. No. 63/111,273 filed on Nov. 9, 2020, the entirety of both application are hereby incorporated by reference.
BACKGROUND FieldThe present disclosure describes an improved technique for predicting noise images using convolutional neural network from areas selected using luminance range map.
Description of Related ArtAfter photographs are taken photographers often examine images for various quality aspects. One common image quality metric is noise. By reviewing the noise that appears in an image it is decided whether the image is of good quality and is a candidate for printing or to be kept, or if that image needs additional post processing or should be deleted.
One manner in which noise is detected or determined centers around detection of noise in very noisy images where noise typically appears universally thought out the image. Various methods exist including median or mean sliding windows or differential gradient estimations. Other methods include detection and de-noising of images using convolutional neural networks Most of these methods perform relatively well on images with very high levels of noise where it also often appears universally thought out the image. Most methods listed above are also focused on detection of artificial type of noise that can be modelled artificially such as Gaussian, log-normal, uniform, exponential, Poisson, salt and pepper, Rayleigh, speckle and Erlang By experimenting with internal real world images it has been found that artificial noise does not represent noise that's typically embedded in the image at the time of capture and, often times, is not found universally throughout the image. Additionally, depending on the type of camera used, noise in images can follow different distribution patterns. Another drawback associated with some of the aforementioned noise detection techniques is that given processing speed requirements they are typically performed using resized images. However, the same experimentation using real world images have showed that resizing of images greatly reduces or completely destroys image noise making prediction less accurate or impossible. One viable solution which has shown to remedy above shortcomings is to use targeted crop or multiple crops where noise is most likely to be present from original non resized image. The present disclosure remedies the above drawbacks
SUMMARYAccording to an embodiment, an apparatus and method that is provided that includes one or more processors; and one or more memories storing instructions that, when executed, configures the one or more processors, to determine and identify one or more best segments within images for input to a trained classifier trained to estimate noise based on data collected from various mobile and DSLR camera devices and estimate and obtain an area within images for prediction of noise and predicts whether the image is noisy or non-noisy based on identified area.
An image processing apparatus and method are provided whereby one or more memories stores instructions which, when executed by one or more processors configures the one or more processors to perform operations including obtaining image data stored in memory of a processing device, defining one or more regions of the image to be processed based on luminance values of the region, providing, as input data, the one or more defined regions of the image to an classifier that has been trained to use image data to estimate noise in an image to output a prediction that the input data is in a first class or a second class, calculating an average by predicted class; and labeling the obtained image as the first class or second class based on the calculated average.
In other embodiments, the apparatus and method are further configured to perform operations including dividing the obtained image data into predetermined segments of image data, and wherein the defining of one or more regions of the image is performed within each of the predetermined segments.
In other embodiments, the apparatus and method are further configured to perform operations including providing, as the input data, one or more defined regions in each of the predetermined segments to the classifier to output predictions for each of the one or more defined regions in each of the segments, and calculating the average by predicted class across all of the predetermined segments to generate the label for the image.
In a further embodiment, the apparatus and method are further configured to perform operations including defining one or more regions of the image to be processed based on luminance values of the region by subtracting each value of a determined luminance array of the image from a central luminance value to identify a central point around which a respective one of the one or more regions is defined and generating a bounding box having a predetermined size having the identified central point at a center; and providing the image data within the generated bounding box to the classifier. In some instances, the central luminance value is a luminance value closest to a median luminance value of the image.
These and other objects, features, and advantages of the present disclosure will become apparent upon reading the following detailed description of exemplary embodiments of the present disclosure, when taken in conjunction with the appended drawings, and provided claims.
Throughout the figures, the same reference numerals and characters, unless otherwise stated, are used to denote like features, elements, components or portions of the illustrated embodiments. Moreover, while the subject disclosure will now be described in detail with reference to the figures, it is done so in connection with the illustrative exemplary embodiments. It is intended that changes and modifications can be made to the described exemplary embodiments without departing from the true scope and spirit of the subject disclosure as defined by the appended claims.
DETAILED DESCRIPTIONThroughout the figures, the same reference numerals and characters, unless otherwise stated, are used to denote like features, elements, components or portions of the illustrated embodiments. Moreover, while the subject disclosure will now be described in detail with reference to the figures, it is done so in connection with the illustrative exemplary embodiments. It is intended that changes and modifications can be made to the described exemplary embodiments without departing from the true scope and spirit of the subject disclosure as defined by the appended claims.
Exemplary embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It is to be noted that the following exemplary embodiment is merely one example for implementing the present disclosure and can be appropriately modified or changed depending on individual constructions and various conditions of apparatuses to which the present disclosure is applied. Thus, the present disclosure is in no way limited to the following exemplary embodiment and, according to the Figures and embodiments described below, embodiments described can be applied/performed in situations other than the situations described below as examples.
The present disclosure describes an improved technique for predicting noise images using convolutional neural network from areas selected using luminance range map. The present disclosure advantageously improves what is conventionally a manual process by providing a technique that takes into account specifics of spatial noise distribution in an image in order to estimate and obtain the best area for prediction of noise in an image and predict image as noisy or non noisy based on patch identified.
The estimation apparatus 104 in
-
- Total params: 4,104,066
- Trainable params: 20,354
- Non-trainable params: 4,083,712
As can be seen in
In order to improve the ability to classify an image as noisy or non-noisy, the algorithm advantageously segments the image to be processed to identify subsections of the image which are the best segments of that image to detect noise.
In step 306, calculation is performed to obtain a distribution of all pixel values from resulting array. This distribution produced with bins ranging from 1 to 255 representative of all pixel values. In step 308, normalization of the distribution is performed by dividing each pixel value bin count by the total count of all the values creating a probability density function distribution. An example of these steps can be seen below implemented using Python programming language:
-
- import scipy.ndimage as ndi
- import matplotlib.pyplot as plt
- img=plt.imread(“image.jpeg”)
- luminance=img.astype(float).dot([0.2126, 0.7152, 0.0722])
- hist=ndi.histogram(luminance, min=0, max=255, bins=256)
- pdf=hist/hist.sum( )
The results of the normalization of all patches (noisy and non-noisy) are saved in memory to a table and steps above are repeated for all samples in dataset. In step 310, an average of values in each resulting bin/row is calculated and in step 312, using cumulative sum calculation, a central point is estimated for all values resulting from step 306.
-
- Import numpy
- num=Z #pixel value to find
- x=numpy.where(abs(luminance-num)==abs (luminance-num).min( ))[0] [0] #X coordinate
- y=numpy.where(abs(luminance-num)==abs(luminance-num).min( ))[1] [0] #Y coordinate
In step 408, a bounding box of predetermined size having the above determined (x,y) coordinate at its center is generated and cropped for each quarter. This operation is illustrated in
Now that the luminance values have been obtained and segments of the image being analyzed are defined by the bounding boxes described in
The scope of the present invention includes a non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform one or more embodiments of the invention described herein. Examples of a computer-readable medium include a hard disk, a floppy disk, a magneto-optical disk (MO), a compact-disk read-only memory (CD-ROM), a compact disk recordable (CD-R), a CD-Rewritable (CD-RW), a digital versatile disk ROM (DVD-ROM), a DVD-RAM, a DVD-RW, a DVD+RW, magnetic tape, a nonvolatile memory card, and a ROM. Computer-executable instructions can also be supplied to the computer-readable storage medium by being downloaded via a network.
The use of the terms “a” and “an” and “the” and similar referents in the context of this disclosure describing one or more aspects of the invention (especially in the context of the following claims) are to be construed to cover both the singular and the plural, unless otherwise indicated herein or clearly contradicted by context. The terms “comprising,” “having,” “including,” and “containing” are to be construed as open-ended terms (i.e., meaning “including, but not limited to,”) unless otherwise noted. Recitation of ranges of values herein are merely intended to serve as a shorthand method of referring individually to each separate value falling within the range, unless otherwise indicated herein, and each separate value is incorporated into the specification as if it were individually recited herein. All methods described herein can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The use of any and all examples, or exemplary language (e.g., “such as”) provided herein, is intended merely to better illuminate the subject matter disclosed herein and does not pose a limitation on the scope of any invention derived from the disclosure unless otherwise claimed. No language in the specification should be construed as indicating any non-claimed element as essential.
It will be appreciated that the instant disclosure can be incorporated in the form of a variety of embodiments, only a few of which are disclosed herein. Variations of those embodiments may become apparent to those of ordinary skill in the art upon reading the foregoing description. Accordingly, this disclosure and any invention derived therefrom includes all modifications and equivalents of the subject matter recited in the claims appended hereto as permitted by applicable law. Moreover, any combination of the above-described elements in all possible variations thereof is encompassed by the disclosure unless otherwise indicated herein or otherwise clearly contradicted by context.
Claims
1. An image processing method comprising:
- obtaining image data stored in memory of a processing device;
- defining one or more regions of the image to be processed based on luminance values of the region by subtracting each value of a determined luminance array of the image from a central luminance value to identify a central point around which a respective one of the one or more regions is defined;
- providing, as input data, the one or more defined regions of the image to an classifier that has been trained to use image data to estimate noise in an image to output a prediction that the input data is in a first class or a second class;
- calculating an average by predicted class; and
- labeling the obtained image as the first class or second class based on the calculated average.
2. The image processing method of claim 1, further comprising
- dividing the obtained image data into predetermined segments of image data; and
- wherein the defining of one or more regions of the image is performed within each of the predetermined segments.
3. The image processing method of claim 2, further comprising
- providing, as the input data, one or more defined regions in each of the predetermined segments to the classifier to output predictions for each of the one or more defined regions in each of the segments; and
- calculating the average by predicted class across all of the predetermined segments to generate the label for the image.
4. The image processing method of claim 1, further comprising
- generating a bounding box having a predetermined size having the identified central point at a center; and
- providing the image data within the generated bounding box to the classifier.
5. The image processing method of claim 1, wherein
- the central luminance value is a luminance value closest to a median luminance value of the image.
6. The image processing method of claim 1, further comprising outputting, on a display, the obtained image including the label.
7. An image processing apparatus comprising:
- one or more memories having instructions stored therein; and
- one or more processors that, upon executing the stored instructions, configures the one or more processors to perform the following operations: obtaining image data stored in memory of a processing device; defining one or more regions of the image to be processed based on luminance values of the region by subtracting each value of a determined luminance array of the image from a central luminance value to identify a central point around which a respective one of the one or more regions is defined; providing, as input data, the one or more defined regions of the image to an classifier that has been trained to use image data to estimate noise in an image to output a prediction that the input data is in a first class or a second class; calculating an average by predicted class; and labeling the obtained image as the first class or second class based on the calculated average.
8. The image processing apparatus of claim 7, wherein execution of the stored instructions further configures the one or more processors to perform operations including
- dividing the obtained image data into predetermined segments of image data; and
- wherein the defining of one or more regions of the image is performed within each of the predetermined segments.
9. The image processing apparatus of claim 8, wherein execution of the stored instructions further configures the one or more processors to perform operations including
- providing, as the input data, one or more defined regions in each of the predetermined segments to the classifier to output predictions for each of the one or more defined regions in each of the segments; and
- calculating the average by predicted class across all of the predetermined segments to generate the label for the image.
10. The image processing apparatus of claim 7, wherein execution of the stored instructions further configures the one or more processors to perform operations including
- generating a bounding box having a predetermined size having the identified central point at a center; and
- providing the image data within the generated bounding box to the classifier.
11. The image processing apparatus of claim 8, wherein
- the central luminance value is a luminance value closest to a median luminance value of the image.
12. The image processing apparatus of claim 8, wherein execution of the stored instructions further configures the one or more processors to perform operations including
- outputting, on a display, the obtained image including the label.
| 7813583 | October 12, 2010 | Yoo et al. |
| 8908989 | December 9, 2014 | Geisler et al. |
| 10043243 | August 7, 2018 | Mativychuk et al. |
| 10664966 | May 26, 2020 | Guo et al. |
| 10810721 | October 20, 2020 | Mech et al. |
| 20070165112 | July 19, 2007 | Shinmei et al. |
| 20100182461 | July 22, 2010 | On |
| 20130128056 | May 23, 2013 | Chuang |
| 20200034615 | January 30, 2020 | Croxford |
| 20200226744 | July 16, 2020 | Cohen et al. |
| 20200234080 | July 23, 2020 | Ciller Ruiz et al. |
| 20200294201 | September 17, 2020 | Planche et al. |
| 20200327360 | October 15, 2020 | Samala |
| 20210104021 | April 8, 2021 | Sohn |
| 20210374968 | December 2, 2021 | Martinez |
| 20220222816 | July 14, 2022 | Carnell |
| 20230401821 | December 14, 2023 | Guyduy |
| 1309185 | May 2003 | EP |
| 4463341 | May 2010 | JP |
| 5594665 | September 2014 | JP |
| 101538353 | July 2015 | KR |
- Jli, J. et al., “Towards Noise-resistant Object Detection with Noisy Annotations”, Mar. 3, 2020, pp. 1-17.
- Xu, R. et al., “Ensemble with estimation: seeking for optimization in class noisy data”, International Journal of Machine Learning and Cybernetics (2020), Jun. 12, 2019, pp. 231-248, vol. 11.
Type: Grant
Filed: Nov 8, 2021
Date of Patent: Sep 8, 2026
Patent Publication Number: 20230410273
Assignee: Canon U.S.A., Inc. (Melville, NY)
Inventor: Yevgeniy Gennadiy Guyduy (Bellmore, NY)
Primary Examiner: Bobbak Safaipour
Application Number: 18/035,712
International Classification: G06T 7/00 (20170101); G06T 7/11 (20170101);