Indoor image enhancement method and system

By calculating the isolation degree of the grayscale value of the indoor image to dynamically adjust the size of the filter window, the problem of difficulty in setting the filter window adaptively in the prior art is solved, and the effect of image enhancement and image quality are significantly improved.

CN119722499AActive Publication Date: 2025-03-28XIAN JIMUJIA INFORMATION TECH CO LTD

Patent Information

Application Number
CN202510221153.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-03-28
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

The prior art is difficult to adaptively set up a filter window in indoor image enhancement, resulting in loss of image details or noise interference, affecting image quality.

Method used

The filter window size is dynamically adjusted by calculating the degree of isolation of the grayscale value of the indoor image. For pixels with higher isolation, a smaller filter window is used to preserve details; for pixels with lower isolation, a larger filter window is used to remove noise.

Benefits of technology

It significantly improves the image enhancement effect, avoids excessive smoothing or loss of details, and significantly improves the overall quality and detail retention of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722499A_ABST
    Figure CN119722499A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image processing, in particular to an indoor image enhancement method and system. The method comprises the following steps: calculating the isolation degree of a gray value of an indoor image; and setting the side length of the filtering window according to the isolation degree so as to complete image enhancement. Whether the filtering windows of the pixel points corresponding to the gray values are the same or not is judged by analyzing the isolation degree of the gray values, and the effect that the side length of the filtering windows of the pixel points corresponding to the gray values with the small isolation degree needs to be calculated repeatedly is avoided. And meanwhile, the filtering accuracy of the pixel points corresponding to the gray values with relatively high isolation degree is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and in particular to an indoor image enhancement method and system. Background Art

[0002] With the continuous development and progress of the interior design industry, the demand for interior decoration has gradually increased. Indoor image acquisition technology is often used in the decoration process, especially in the production of modern home design and decoration renderings, the acquisition and processing of indoor images is crucial.

[0003] However, in actual applications, the collected indoor images often cannot fully display the real decoration effect, such as color distortion, uneven light and shadow, which affects the intuitive experience of designers and consumers.

[0004] Mean filtering can be used to enhance the image. For example, a patent application document with publication number CN105243647A discloses an image enhancement method based on linear spatial filtering, which includes the following steps: inputting an original image and performing Laplace sharpening processing; superimposing the original image with the Laplace sharpening processing result to obtain a superimposed image; performing Sobel filtering on the superimposed image to obtain a Sobel filtered image; performing windowed mean filtering on the Sobel filtered image to obtain a mean filtered image; superimposing the superimposed image with the mean filtered image to obtain a final result image.

[0005] When performing mean filtering, you need to set a window. The size of the filter window directly affects the image processing effect. If the filter window is too large, the details of the image will be lost, resulting in the image being too blurry and unable to clearly display the fine parts of the interior design, such as decorative lines and textures; if the filter window is too small, it will be easily disturbed by noise data, unable to effectively smooth the image, and affecting the overall quality of the image. Summary of the invention

[0006] In order to solve the above-mentioned technical problem of how to set an adaptive filtering window, the present application provides an indoor image enhancement method and system.

[0007] In a first aspect, the present application provides an indoor image enhancement method, which adopts the following technical solution: A method for indoor image enhancement comprises the steps of: Calculate the isolation degree of the gray value of the indoor image; set the side length of the filter window according to the isolation degree to complete image enhancement; In response to the isolation degree being greater than or equal to the preset threshold, the calculation formula for the filter window side length is: ; In the formula, Indicates The gray value corresponding to The side length of the filter window of pixels; Indicates the preset initial filter window side length; Indicates The total number of pixels in the neighborhood of a pixel; Indicates The gray value of each pixel; Indicates Gray value of pixels in the neighborhood of pixels; Indicates The gray value corresponds to The pixel in the neighborhood The gray value of each pixel; represents the standard normalization function; represents the rounding up function; in response to the isolation degree being less than the preset threshold, the side length expression of the filtering window is: ; In the formula, Indicates The side length of the filtering window for all pixels corresponding to the grayscale value whose isolation degree is less than the preset threshold; Indicates The isolation degree of the gray value whose isolation degree is less than the preset threshold.

[0008] By analyzing the isolation degree of the gray value, it is determined whether the filter windows of the pixels corresponding to the gray value are the same, which avoids the need to repeatedly calculate the side length of the filter window of the pixels corresponding to the gray value with a smaller degree of isolation, and also improves the filtering accuracy of the pixels corresponding to the gray value with a larger degree of isolation. By dynamically adjusting the size of the filter window according to the degree of isolation of the gray value corresponding to the pixel, it can better adapt to the characteristics of different areas in the image. For pixels with a higher degree of isolation (which may be noise or details), a smaller filter window is used to retain details; for pixels with a lower degree of isolation (which may be smooth areas), a larger filter window is used to better remove noise. This adaptive method can significantly improve the effect of image enhancement while avoiding the problem of over-smoothing or loss of details.

[0009] Optionally, the degree of isolation is calculated as: ; In the formula, Indicates The degree of isolation of the gray values; Indicates The total number of pixels corresponding to the gray value; Indicates The gray value corresponding to The anomaly score of each pixel; Represents the standard normalization function.

[0010] The simple average of the anomaly scores is used to calculate the degree of isolation, which can quickly evaluate the degree of abnormality of the pixel. This method is simple to calculate and is suitable for scenes that require fast processing. It can also effectively distinguish between normal and abnormal areas in the image, providing a reliable basis for subsequent filter window adjustments.

[0011] Optionally, the degree of isolation is calculated as: ; In the formula, Indicates The degree of isolation of the gray values; Indicates The total number of pixels corresponding to the gray value; Indicates The gray value corresponding to The anomaly score of each pixel; represents the standard normalization function; Indicates The abnormal scores of all pixels corresponding to the gray value The average value of .

[0012] The degree of isolation is measured by calculating the absolute value of the difference between the anomaly score and the average value, which can more accurately reflect the difference between the pixel and the surrounding pixels. This method is more sensitive to the detection of abnormal pixels and is especially suitable for areas with local anomalies or rich details in the image. It can better preserve the detailed features of the image while effectively suppressing noise.

[0013] Optionally, the degree of isolation is calculated as: ; In the formula, Indicates The degree of isolation of the gray values; Indicates The total number of pixels corresponding to the gray value; Indicates The gray value corresponding to The anomaly score of each pixel; represents the standard normalization function; Indicates The abnormal scores of all pixels corresponding to the gray value The average value of .

[0014] The square root of the difference between the anomaly score and the average value is used to calculate the degree of isolation, which further enhances the detection of abnormal pixels. The square root operation can amplify the difference between abnormal pixels and normal pixels, making the calculation of the degree of isolation more accurate. This method performs well when processing complex images and can effectively improve the overall quality of the image while maintaining the integrity of the details.

[0015] Optionally, the anomaly score is calculated by: performing grayscale processing on the collected indoor image; obtaining the grayscale value and the index position coordinates of all pixels in the indoor image, and obtaining the anomaly scores of all pixels corresponding to the grayscale value according to the isolation forest algorithm.

[0016] The isolation forest algorithm is used to calculate the anomaly score of pixels, which can automatically identify abnormal pixels in the image. The isolation forest algorithm is an efficient unsupervised anomaly detection method suitable for high-dimensional data. By using the grayscale value and pixel position of the image as feature input, the noise and abnormal areas in the image can be accurately detected. This method does not require pre-labeled data, which greatly improves the automation and adaptability of image enhancement.

[0017] Optionally, the step of obtaining the abnormal scores of all pixels corresponding to the grayscale values ​​according to the isolation forest algorithm is as follows: set any pixel as a sample , calculate the sample Anomaly score , , where Representation sample The average path length among all isolated trees; represents the total number of samples in the isolated tree; is a constant representing the expected value of the path length.

[0018] By calculating the average path length of the sample in the isolation tree to evaluate the anomaly score, it can effectively distinguish normal pixels from abnormal pixels. The shorter the path length, the more abnormal the pixel. This method is based on the theoretical basis of the isolation forest and can quickly and accurately evaluate the degree of abnormality of each pixel, providing a reliable basis for subsequent image enhancement. At the same time, it has fewer assumptions about data distribution and is applicable to various types of image data.

[0019] Optional, The calculation formula is: ; ; In the formula yes The harmonic number is the number from arrive The sum of the reciprocals of .

[0020] By accurately calculating the expected value of the path length, the anomaly score can be normalized more accurately. The introduction of the harmonic number makes the calculation of the expected value of the path length more scientific and reasonable, thereby improving the accuracy of the anomaly score. This method can effectively avoid the deviation of the anomaly score caused by the different number of samples, and further improve the performance of the isolation forest algorithm in image anomaly detection.

[0021] In a second aspect, the present application provides an indoor image enhancement system, which adopts the following technical solution: An indoor image enhancement system comprises: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the indoor image enhancement method described above is implemented.

[0022] The indoor image enhancement method is generated into a computer program and stored in a memory so as to be loaded and executed by a processor. Thus, a system is made based on the memory and the processor for easy use.

[0023] This application has the following technical effects: By analyzing the isolation degree of the gray value, it is determined whether the filter windows of the pixels corresponding to the gray value are the same, which avoids the need to repeatedly calculate the side length of the filter window of the pixels corresponding to the gray value with a smaller degree of isolation, and also improves the filtering accuracy of the pixels corresponding to the gray value with a larger degree of isolation. By dynamically adjusting the size of the filter window according to the degree of isolation of the gray value corresponding to the pixel, it can better adapt to the characteristics of different areas in the image. For pixels with a higher degree of isolation (which may be noise or details), a smaller filter window is used to retain details; for pixels with a lower degree of isolation (which may be smooth areas), a larger filter window is used to better remove noise. This adaptive method can significantly improve the effect of image enhancement while avoiding the problem of over-smoothing or loss of details. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-restrictive manner, and the same or corresponding numbers represent the same or corresponding parts.

[0025] Figure 1 This is a method flow chart of an indoor image enhancement method according to an embodiment of the present application.

[0026] Figure 2 This is a method flow chart of step S1 in an indoor image enhancement method according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0028] It should be understood that when the terms "first", "second", etc. are used in the claims, specification and drawings of the present application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0029] The present application embodiment discloses an indoor image enhancement method, referring to Figure 1 , including steps S1-S2, which are as follows: S1: Calculate the isolation degree of the gray value of the indoor image.

[0030] Indoor images refer to images taken in indoor environments, usually acquired through cameras or other image acquisition devices (such as digital cameras, 360° panoramic cameras, etc.). These images show the layout, decoration style, color matching, furniture and decoration of indoor spaces, and are often used in the fields of interior design and decoration renderings. The quality of indoor images directly affects the decoration effect and the customer's perception of the design plan.

[0031] Calculate the anomaly score, refer to Figure 2 , the calculation method includes steps S10 and S11, which are as follows: S10: grayscale processing is performed on the collected indoor image.

[0032] The camera is used to collect indoor RGB (Red Green Blue) images. In order to facilitate subsequent processing, the collected RGB images are converted into grayscale images.

[0033] S11: Obtain the grayscale value and the index position coordinates of all pixels in the indoor image, and obtain the abnormality scores of all pixels corresponding to the grayscale value according to the isolation forest algorithm.

[0034] In the captured images, there are areas with relatively uniform grayscale distribution (for example, the grayscale values ​​of walls, floors, ceilings, etc. in indoor images are usually evenly distributed), and there are also areas with large differences in grayscale distribution (for example, the corners of the room are darker and have a large difference in brightness from other areas). Therefore, this application analyzes the distribution of any grayscale value.

[0035] For any grayscale value, obtain the index position (horizontal and vertical coordinates) of all pixels of the grayscale value in the indoor image; use the isolation forest algorithm to obtain the anomaly score of all pixels of the grayscale value.

[0036] The steps to obtain the abnormal scores of all pixels corresponding to the grayscale values ​​according to the isolation forest algorithm are as follows: Set any pixel as a sample , calculate the sample Anomaly score , , where Representation sample The average path length among all isolated trees; represents the total number of samples in the isolated tree; is a constant representing the expected value of the path length. The calculation formula is: ; ; In the formula yes The harmonic number is the number from arrive The use of the isolation forest algorithm to obtain the abnormal scores of all pixels corresponding to the grayscale value is a prior art and will not be described in detail here.

[0037] When using the Isolation Forest algorithm to calculate the anomaly scores of all pixels of any grayscale value in an image, we focus on the distribution characteristics of the grayscale value of each pixel in the image. Isolation Forest is an unsupervised machine learning algorithm used to detect outliers or isolated points in data, usually used to process high-order data. In the context of image processing, the index position of the pixel of a grayscale image is used as a data point for anomaly detection.

[0038] The core of Isolation Forest is to gradually "isolate" data points by randomly selecting features (in this application, by randomly selecting horizontal and vertical coordinates) and randomly selecting split points. The fewer isolated points, the higher the score. Therefore, the higher the abnormal score of a pixel of the gray value, the more "isolated" it is in the entire image. Conversely, the smaller the abnormal score, the more concentrated the distribution of the pixel in the image.

[0039] For any gray value, if the abnormality score of all pixels corresponding to the gray value is higher, it means that the gray value is more isolated, and the greater the isolation, the more dispersed and uneven the distribution of the gray value. Therefore, the present application calculates the isolation degree of the gray value corresponding to the pixel according to the abnormality score of the pixel.

[0040] In one embodiment, the calculation expression of isolation degree is: ; In the formula, Indicates The degree of isolation of the gray values; Indicates The total number of pixels corresponding to the gray value; Indicates The gray value corresponding to The anomaly score of each pixel; Represents the standard normalization function.

[0041] in, It represents the abnormality score of all pixels corresponding to the gray value. If the abnormality score is smaller, it means that the pixels corresponding to the gray value are more concentrated. Otherwise, it means that the pixels corresponding to the gray value are more dispersed.

[0042] In one embodiment, the calculation expression of isolation degree is: ; In the formula, Indicates The degree of isolation of the gray values; Indicates The total number of pixels corresponding to the gray value; Indicates The gray value corresponding to The anomaly score of each pixel; represents the standard normalization function; Indicates The abnormal scores of all pixels corresponding to the gray value The average value of .

[0043] The degree of isolation is measured by calculating the absolute value of the difference between the anomaly score and the average value, which can more accurately reflect the difference between the pixel and the surrounding pixels. This method is more sensitive to the detection of abnormal pixels and is especially suitable for areas with local anomalies or rich details in the image. It can better preserve the detailed features of the image while effectively suppressing noise.

[0044] In one embodiment, the calculation expression of isolation degree is: ; In the formula, Indicates The degree of isolation of the gray values; Indicates The total number of pixels corresponding to the gray value; Indicates The gray value corresponding to The anomaly score of each pixel; represents the standard normalization function; Indicates The abnormal scores of all pixels corresponding to the gray value The average value of .

[0045] The square root of the difference between the anomaly score and the average value is used to calculate the degree of isolation, which further enhances the detection of abnormal pixels. The square root operation can amplify the difference between abnormal pixels and normal pixels, making the calculation of the degree of isolation more accurate. This method performs well when processing complex images and can effectively improve the overall quality of the image while maintaining the integrity of the details.

[0046] S2: Setting the side length of the filter window according to the degree of isolation to complete image enhancement; In response to the isolation degree being greater than or equal to the preset threshold, the calculation formula for the filter window side length is: ; In the formula, Indicates The gray value corresponding to The side length of the filter window of pixels; Indicates the preset initial filtering window side length; exemplarily, , Indicates The total number of pixels in the neighborhood of a pixel; Indicates The gray value of each pixel; Indicates The pixel in the neighborhood The gray value of each pixel; represents the standard normalization function; Represents the ceiling function.

[0047] For any pixel point whose grayscale value has an isolation degree greater than or equal to a preset threshold, all pixels within a 5×5 range centered on the pixel point are obtained as neighboring pixels of the pixel point, wherein the range is not specifically limited, but needs to be ensured to be an odd number; Indicates the difference between the pixel and its surrounding pixels. The larger the value, the greater the difference. If the difference is greater, it means that the pixel is more likely to be a noise pixel. For noise pixels, a larger filter window is needed to smooth them and reduce the difference between the pixel and its surrounding pixels. Therefore, if The larger the value, the larger the corresponding filter window; conversely, the smaller the corresponding filter window.

[0048] In response to the isolation degree being less than a preset threshold, the side length expression of the filtering window is: ; In the formula, Indicates The side length of the filtering window for all pixels corresponding to the grayscale value whose isolation degree is less than the preset threshold; Indicates The isolation degree of the gray value whose isolation degree is less than the preset threshold.

[0049] The gray value with isolation degree less than the preset isolation threshold is considered to have a relatively concentrated distribution of pixels. Therefore, all pixels of this gray value are filtered using a filter window of the same size. If the isolation degree is smaller, the gray value distribution is more concentrated, and a smaller filter window is used to retain image details.

[0050] An embodiment of the present application further discloses an indoor image enhancement system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the indoor image enhancement method according to the present application is implemented.

[0051] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0052] In the present application, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high bandwidth memory HBM (High Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.

[0053] Although this specification has shown and described a plurality of embodiments of the present application, it is obvious to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein may be adopted.

[0054] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for indoor image enhancement, characterized in that: Includes steps: Calculate the isolation degree of the gray value of the indoor image; set the side length of the filter window according to the isolation degree to complete image enhancement; In response to the isolation degree being greater than or equal to the preset threshold, the calculation formula for the filter window side length is: ; In the formula, Indicates The gray value corresponding to The side length of the filter window of pixels; Indicates the preset initial filter window side length; Indicates The total number of pixels in the neighborhood of a pixel; Indicates The gray value of each pixel; Indicates Gray value of pixels in the neighborhood of pixels; Indicates The gray value corresponds to The pixel in the neighborhood The gray value of each pixel; represents the standard normalization function; represents the ceiling function; In response to the isolation degree being less than a preset threshold, the side length expression of the filtering window is: ; In the formula, Indicates The side length of the filtering window for all pixels corresponding to the grayscale value whose isolation degree is less than the preset threshold; Indicates The isolation degree of the gray value whose isolation degree is less than the preset threshold.

2. The indoor image enhancement method according to claim 1, characterized in that: The calculation expression of isolation degree is: ; In the formula, Indicates The degree of isolation of the gray values; Indicates The total number of pixels corresponding to the gray value; Indicates The gray value corresponding to The anomaly score of each pixel; Represents the standard normalization function.

3. The indoor image enhancement method according to claim 1, characterized in that: The calculation expression of isolation degree is: ; In the formula, Indicates The degree of isolation of the gray values; Indicates The total number of pixels corresponding to the gray value; Indicates The gray value corresponding to The anomaly score of each pixel; represents the standard normalization function; Indicates The abnormal scores of all pixels corresponding to the gray value The average value of .

4. The indoor image enhancement method according to claim 1, characterized in that: The calculation expression of isolation degree is: ; In the formula, Indicates The degree of isolation of the gray values; Indicates The total number of pixels corresponding to the gray value; Indicates The gray value corresponding to The anomaly score of each pixel; represents the standard normalization function; Indicates The abnormal scores of all pixels corresponding to the gray value The average value of .

5. The indoor image enhancement method according to any one of claims 2 to 4, characterized in that: The calculation method of the anomaly score is as follows: grayscale processing is performed on the collected indoor images; the grayscale values ​​and the index position coordinates of all pixels in the indoor images are obtained, and the anomaly scores of all pixels corresponding to the grayscale values ​​are obtained according to the isolation forest algorithm.

6. The indoor image enhancement method according to claim 5, characterized in that: The steps to obtain the abnormal scores of all pixels corresponding to the grayscale values ​​according to the isolation forest algorithm are as follows: Set any pixel as a sample , calculate the sample Anomaly score , , where Representation sample The average path length among all isolated trees; represents the total number of samples in the isolated tree; is a constant representing the expected value of the path length.

7. The indoor image enhancement method according to claim 6, characterized in that: The calculation formula is: ; ; In the formula yes The harmonic number is the number from arrive The sum of the reciprocals of .

8. An indoor image enhancement system, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the indoor image enhancement method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Linear spatial filtering-based image enhancement method

    CN105243647A

  • Hyperspectral image anomaly detection method and device based on improved isolated forest algorithm

    CN112990314A

  • Intelligent image denoising method for 3D industrial camera

    CN116342433A

  • Hub quality detection method for skateboard wheel

    CN118446947A

  • Aluminum profile material precise cutting method and system based on machine vision

    CN118823407A

Cited By

  • Saliency detection method for computer digital image

    CN120833495A