TWI831640B - Image processing system having dehazing mechanism - Google Patents

Image processing system having dehazing mechanism Download PDF

Info

Publication number
TWI831640B
TWI831640B TW112108840A TW112108840A TWI831640B TW I831640 B TWI831640 B TW I831640B TW 112108840 A TW112108840 A TW 112108840A TW 112108840 A TW112108840 A TW 112108840A TW I831640 B TWI831640 B TW I831640B
Authority
TW
Taiwan
Prior art keywords
depth
pixel block
calculation module
pixel
initial
Prior art date
Application number
TW112108840A
Other languages
Chinese (zh)
Inventor
李宇軒
吳奕帆
廖千惠
吳昌彥
梁晉豪
Original Assignee
元智大學
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 元智大學 filed Critical 元智大學
Priority to TW112108840A priority Critical patent/TWI831640B/en
Application granted granted Critical
Publication of TWI831640B publication Critical patent/TWI831640B/en

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

An image processing system having a dehazing mechanism is provided. An average depth calculating module calculates an average value of initial depths of a plurality of pixel points in each of a plurality of pixel units of an original image, as an average depth of each of the plurality of pixel units. When a depth correction calculating module determines that a relationship between the average depth of any one of the plurality of pixel units of the original image and its ideal depth does not meet a preset relationship, the depth correction calculating module corrects an initial color depth of the one of the plurality of pixel units of the original image. The depth correction calculating module finally generates a clear image based on the corrected original image.

Description

具有除霧機制的影像處理系統Image processing system with defogging mechanism

本發明涉及影像處理,特別是涉及一種具有除霧機制的影像處理系統。The present invention relates to image processing, and in particular to an image processing system with a defogging mechanism.

在車輛行駛上,為提高行車安全,需對車用照相機擷取到的含霧影像執行除霧演算法,以提供車輛附近的清晰影像給車用的人工智能(artificial intelligence, AI)自動駕駛輔助裝置學習,以分析出最佳的行經路線。When driving a vehicle, in order to improve driving safety, it is necessary to perform a defogging algorithm on the foggy images captured by the vehicle camera to provide clear images near the vehicle for the vehicle's artificial intelligence (AI) automatic driving assistance. The device learns to analyze the best route.

隨著近年來醫療技術的發展,醫用內視鏡廣泛使用於擷取人體內部的影像,例如胃部影像。在取得腸胃內視鏡時,患者在呼吸時可能會造成醫用內視鏡的鏡面起霧。或者,人類體溫可能造成放入體內部的醫用內視鏡的鏡面起霧,導致醫用內視鏡所擷取的影像模糊。因此,需進一步對擷取的含霧影像使用除霧演算法,才能獲取清晰的人體內部影像。With the development of medical technology in recent years, medical endoscopes are widely used to capture images of the inside of the human body, such as images of the stomach. When obtaining a gastrointestinal endoscope, the patient's breathing may cause the mirror surface of the medical endoscope to fog up. Alternatively, human body temperature may cause the mirror of a medical endoscope placed inside the body to fog up, resulting in blurry images captured by the medical endoscope. Therefore, it is necessary to further use a defogging algorithm on the captured foggy images to obtain clear internal images of the human body.

然而,現有影像除霧演算法,需使用大量硬體設備,佔用空間內大量面積,運算複雜度極高,需消耗大量電力,且除霧品質尚需提升。However, existing image defogging algorithms require the use of a large amount of hardware equipment, occupy a large area of space, are extremely computationally complex, consume a large amount of power, and the quality of defogging needs to be improved.

本發明所要解決的技術問題在於,針對現有技術的不足提供一種具有除霧機制的影像處理系統,包含影像讀取識別模組、初始深度計算模組、平均深度計算模組、理想深度計算模組以及深度校正計算模組。影像讀取識別模組配置以讀取原始影像的顏色深度。初始深度計算模組連接影像識別模組。初始深度計算模組配置以判斷原始影像劃分出的多個像素區塊中的各像素區塊內的多個像素點的每一者的初始深度。平均深度計算模組連接初始深度計算模組。平均深度計算模組配置以計算原始影像的各像素區塊內的多個像素點的初始深度的平均值作為平均深度。理想深度計算模組連接初始深度計算模組。理想深度計算模組配置以依據影像讀取識別模組讀取多個像素區塊的順序,以設定各像素區塊的理想深度。深度校正計算模組連接平均深度計算模組以及理想深度計算模組。深度校正計算模組配置以將各像素區塊的平均深度與其理想深度進行比較,以決定是否校正各像素區塊的顏色。當深度校正計算模組判斷原始影像中的哪一像素區塊的平均深度與其理想深度之間的關係不符合一預設關係時,深度校正計算模組對那一像素區塊的初始深度進行校正。The technical problem to be solved by the present invention is to provide an image processing system with a defogging mechanism in view of the shortcomings of the existing technology, including an image reading and recognition module, an initial depth calculation module, an average depth calculation module, and an ideal depth calculation module. and a depth correction calculation module. The image reading and recognition module is configured to read the color depth of the original image. The initial depth calculation module is connected to the image recognition module. The initial depth calculation module is configured to determine the initial depth of each of the plurality of pixels in each of the plurality of pixel blocks divided by the original image. The average depth calculation module is connected to the initial depth calculation module. The average depth calculation module is configured to calculate the average of the initial depths of multiple pixels in each pixel block of the original image as the average depth. The ideal depth calculation module is connected to the initial depth calculation module. The ideal depth calculation module is configured to set the ideal depth of each pixel block according to the order in which the image reading recognition module reads the plurality of pixel blocks. The depth correction calculation module is connected to the average depth calculation module and the ideal depth calculation module. The depth correction calculation module is configured to compare the average depth of each pixel block with its ideal depth to determine whether to correct the color of each pixel block. When the depth correction calculation module determines that the relationship between the average depth of a pixel block in the original image and its ideal depth does not meet a preset relationship, the depth correction calculation module corrects the initial depth of that pixel block. .

在實施例中,當深度校正計算模組判斷哪一像素區塊的平均深度大於理想深度或平均深度與理想深度之間的差值小於一理想深度差門檻值時,深度校正計算模組校正那一像素區塊的初始深度。In an embodiment, when the depth correction calculation module determines which pixel block has an average depth greater than the ideal depth or the difference between the average depth and the ideal depth is less than an ideal depth difference threshold, the depth correction calculation module corrects that pixel block. The initial depth of the one-pixel block.

在實施例中,當深度校正計算模組判斷哪一像素區塊的平均深度小於理想深度且平均深度與理想深度之間的差值大於理想深度差門檻值時,深度校正計算模組不校正那一像素區塊的初始深度。In an embodiment, when the depth correction calculation module determines which pixel block has an average depth less than the ideal depth and the difference between the average depth and the ideal depth is greater than the ideal depth difference threshold, the depth correction calculation module does not correct that pixel block. The initial depth of the one-pixel block.

在實施例中,深度校正計算模組將欲校正的那一像素區塊的初始深度、平均深度以及理想深度中的全部或數者分別乘上多個權重值後相加以計算出那一像素區塊的一參考校正深度。深度校正計算模組依據所述參考校正深度以對那一像素區塊的像素區塊的初始深度進行校正。In an embodiment, the depth correction calculation module multiplies all or some of the initial depth, average depth, and ideal depth of the pixel area to be corrected by multiple weight values, and then adds them together to calculate the pixel area. A reference correction depth for the block. The depth correction calculation module corrects the initial depth of the pixel block of that pixel block based on the reference correction depth.

在實施例中,所述的具有除霧機制的影像處理系統更包含目標深度決定模組。目標深度決定模組連接影像讀取識別模組以及平均深度計算模組。目標深度決定模組配置以設定原始影像的各像素區塊的目標深度。當目前的像素區塊的平均深度小於上一像素區塊的平均深度或與上一像素區塊之間的差值小於一平均深度差門檻值時,目標深度決定模組設定目前的像素區塊的目標深度,等於目前的像素區塊內出現次數最多的初始深度。當目前的像素區塊的平均深度大於上一像素區塊的平均深度且與上一像素區塊之間的差值大於平均深度差門檻值時,目標深度決定模組設定目前的像素區塊的目標深度等於上一像素區塊的平均深度。In an embodiment, the image processing system with a defogging mechanism further includes a target depth determination module. The target depth determination module is connected to the image reading and recognition module and the average depth calculation module. The target depth determination module is configured to set the target depth of each pixel block of the original image. When the average depth of the current pixel block is less than the average depth of the previous pixel block or the difference between the current pixel block and the previous pixel block is less than an average depth difference threshold, the target depth determination module sets the current pixel block The target depth is equal to the initial depth that occurs most frequently in the current pixel block. When the average depth of the current pixel block is greater than the average depth of the previous pixel block and the difference between the current pixel block and the previous pixel block is greater than the average depth difference threshold, the target depth determination module sets the current pixel block's average depth. The target depth is equal to the average depth of the previous pixel block.

在實施例中,深度校正計算模組將欲校正的那一像素區塊的目標深度、初始深度、平均深度以及理想深度中的全部或數者分別乘上多個權重值後相加以計算出那一像素區塊的一參考校正深度。深度校正計算模組依據所述參考校正深度以對那一像素區塊的像素區塊的初始深度進行校正。In an embodiment, the depth correction calculation module multiplies all or some of the target depth, initial depth, average depth, and ideal depth of the pixel block to be corrected by multiple weight values, and then calculates the sum. A reference correction depth for a pixel block. The depth correction calculation module corrects the initial depth of the pixel block of that pixel block based on the reference correction depth.

在實施例中,當初始深度計算模組判斷原始影像中的哪一像素點的多種顏色的顏色深度皆為零值時,初始深度計算模組設定那一像素點的飽和度為零值。當初始深度計算模組判斷原始影像中的哪一像素點的多種顏色的顏色深度皆非為零值時,初始深度計算模組計算那一像素點的多種顏色中的最小顏色深度與最大顏色深度的比例,並依據所述比例以判斷那一像素點的飽和度。In an embodiment, when the initial depth calculation module determines which pixel in the original image has a color depth of multiple colors that are all zero, the initial depth calculation module sets the saturation of that pixel to zero. When the initial depth calculation module determines which pixel in the original image has a non-zero color depth of multiple colors, the initial depth calculation module calculates the minimum color depth and maximum color depth among the multiple colors of that pixel. ratio, and determine the saturation of that pixel based on the ratio.

在實施例中,初始深度計算模組定義各像素點的多種顏色中的最大顏色深度為各像素點的明度。初始深度計算模組依據每一像素點的飽和度和明度以計算每一像素點的初始深度。In an embodiment, the initial depth calculation module defines the maximum color depth among multiple colors of each pixel as the brightness of each pixel. The initial depth calculation module calculates the initial depth of each pixel based on the saturation and brightness of each pixel.

在實施例中,所述的具有除霧機制的影像處理系統更包含最大深度比對模組。最大深度比對模組連接深度校正計算模組。最大深度比對模組配置以將從深度校正計算模組將校正後的原始影像的多個像素點的顏色深度相互比對,以比對出各像素區塊中的最大顏色深度,作為一影像還原參數。In an embodiment, the image processing system with a defogging mechanism further includes a maximum depth comparison module. The maximum depth comparison module is connected to the depth correction calculation module. The maximum depth comparison module is configured to compare the color depths of multiple pixels of the corrected original image with each other from the depth correction calculation module to compare the maximum color depth in each pixel block as an image. Restore parameters.

在實施例中,所述的具有除霧機制的影像處理系統更包含清晰影像還原模組。清晰影像還原模組連接深度校正計算模組。深度校正計算模組依據原始影像的顏色深度與清楚影像的顏色深度的比例以計算出透射率。影像還原模組將原始影像的多個像素區塊的初始深度與透射率以及校正後的所述原始影像的所述多個像素點的顏色深度進行運算,以計算出原始影像還原成清楚影像時的顏色深度,並據以還原出清楚影像顯示。In an embodiment, the image processing system with a defogging mechanism further includes a clear image restoration module. The clear image restoration module is connected to the depth correction calculation module. The depth correction calculation module calculates the transmittance based on the ratio of the color depth of the original image to the color depth of the clear image. The image restoration module calculates the initial depth and transmittance of the multiple pixel blocks of the original image and the color depth of the multiple pixels of the corrected original image to calculate the time required to restore the original image to a clear image. the color depth and restore a clear image display accordingly.

請參閱圖1和圖2,其中圖1為本發明第一實施例的具有除霧機制的影像處理系統的方塊圖,圖2為本發明第一實施例的具有除霧機制的影像處理系統計算出原始影像校正後的顏色深度的步驟流程圖。Please refer to Figures 1 and 2. Figure 1 is a block diagram of an image processing system with a defogging mechanism according to the first embodiment of the present invention. Figure 2 is a calculation diagram of an image processing system with a defogging mechanism according to the first embodiment of the present invention. Step-by-step flow chart to obtain the corrected color depth of the original image.

如圖1所示,本發明第一實施例的影像處理系統可包含影像讀取識別模組10、初始深度計算模組20、平均深度計算模組30、理想深度計算模組40以及深度校正計算模組50。As shown in FIG. 1 , the image processing system according to the first embodiment of the present invention may include an image reading and recognition module 10 , an initial depth calculation module 20 , an average depth calculation module 30 , an ideal depth calculation module 40 and a depth correction calculation. Mod 50.

影像讀取識別模組10可連接初始深度計算模組20以及理想深度計算模組40。理想深度計算模組40可連接深度校正計算模組50。平均深度計算模組30可連接初始深度計算模組20以及深度校正計算模組50。The image reading and recognition module 10 can be connected to the initial depth calculation module 20 and the ideal depth calculation module 40 . The ideal depth calculation module 40 can be connected to the depth correction calculation module 50 . The average depth calculation module 30 can be connected to the initial depth calculation module 20 and the depth correction calculation module 50 .

如圖1所示的影像處理系統可執行如圖2所示的步驟S11~S33,如下詳細說明,但本發明不以此為限。實務上,可依據實際需求,適當地調整步驟S11~S33的執行順序和內容。The image processing system shown in Figure 1 can perform steps S11 to S33 shown in Figure 2, as described in detail below, but the invention is not limited thereto. In practice, the execution order and content of steps S11 to S33 can be appropriately adjusted according to actual needs.

在步驟S11,利用影像讀取識別模組10讀取影像,作為原始影像。在本文中,利用影像讀取識別模組10所讀取的原始影像為空氣中含有霧霾時所擷取的模糊影像。In step S11, the image is read using the image reading and recognition module 10 as the original image. In this article, the original image read by the image reading and recognition module 10 is a blurred image captured when there is haze in the air.

在步驟S13,利用影像讀取識別模組10識別原始影像劃分出的多個像素區塊的各像素區塊內的多個像素點的顏色深度。In step S13, the image reading and recognition module 10 is used to identify the color depths of multiple pixels in each of the multiple pixel blocks divided into the original image.

在步驟S15,利用初始深度計算模組20判斷原始影像劃分出的多個像素區塊中的各像素區塊內的多個像素點的每一者的初始深度。In step S15 , the initial depth calculation module 20 is used to determine the initial depth of each of the plurality of pixels in each of the plurality of pixel blocks divided by the original image.

應理解,本文所述從所述原始影像劃分出的多個像素區塊的數量以及各像素區塊的面積可取決於實際需求,本發明不以此為限。It should be understood that the number of multiple pixel blocks divided from the original image and the area of each pixel block described herein may depend on actual requirements, and the present invention is not limited thereto.

在步驟S17,利用平均深度計算模組30計算原始影像的多個像素區塊內的每一像素區塊內的多個像素點分別的多個初始深度的平均值,作為每一像素區塊的一平均深度。In step S17, the average depth calculation module 30 is used to calculate the average value of the multiple initial depths of the multiple pixels in each of the multiple pixel blocks of the original image, as the average of the multiple initial depths of each pixel block. an average depth.

在步驟S19,利用理想深度計算模組40依據影像讀取識別模組10讀取原始影像的多個像素區塊的順序,以設定原始影像的多個像素區塊內的每一像素區塊的理想深度(或稱預設深度)。In step S19, the ideal depth calculation module 40 is used to set the depth of each pixel block in the plurality of pixel blocks of the original image according to the order in which the image reading and recognition module 10 reads the plurality of pixel blocks of the original image. Ideal depth (or default depth).

舉例而言,理想深度計算模組40可依據影像讀取識別模組10所讀取的上一張影像的最大深度,作為目前原始影像的最大深度d0。若原始影像的總高度為 H,n 為目前讀取到這行中的第幾個像素區塊。若影像讀取識別模組10為沿縱向方向由上往下讀取,n 即為由上至下數來第幾個像素區塊。當 n小於H/2 時,也就是目前讀取還在原始影像的上半部時,理想深度為d0。相反地,當 n大於或等於H/2 時,也就是到達原始影像的下半部時,理想深度會隨讀取時間或讀取高度(平均地)遞減,直到沿縱向方向由上往下讀取的最後一個像素區塊。For example, the ideal depth calculation module 40 can use the maximum depth of the previous image read by the image reading and recognition module 10 as the maximum depth d0 of the current original image. If the total height of the original image is H, n is the pixel block in this row currently read. If the image reading and recognition module 10 reads from top to bottom along the longitudinal direction, n is the number of pixel blocks counted from top to bottom. When n is less than H/2, that is, when the current reading is still in the upper half of the original image, the ideal depth is d0. On the contrary, when n is greater than or equal to H/2, that is, when it reaches the lower half of the original image, the ideal depth will decrease (on average) with the reading time or reading height until it is read from top to bottom in the longitudinal direction. The last pixel block taken.

在步驟S21,利用深度校正計算模組50將原始影像劃分出的多個像素區塊中的各像素區塊的平均深度與其理想深度進行比較。In step S21, the depth correction calculation module 50 is used to compare the average depth of each pixel block in the plurality of pixel blocks divided by the original image with its ideal depth.

在步驟S23,利用深度校正計算模組50判斷原始影像中的各像素區塊的平均深度與其理想深度之間的關係是否符合預設關係。In step S23, the depth correction calculation module 50 is used to determine whether the relationship between the average depth of each pixel block in the original image and its ideal depth meets the preset relationship.

若深度校正計算模組50判斷原始影像中的哪一像素區塊的平均深度與其理想深度之間的關係符合預設關係時,執行步驟S25。If the depth correction calculation module 50 determines which pixel block in the original image has a relationship between the average depth and its ideal depth that meets the preset relationship, step S25 is executed.

舉例而言,若深度校正計算模組50判斷原始影像中的哪一像素區塊的平均深度小於理想深度且此像素區塊與理想深度的差值大於一理想深度差值門檻值(即符合預設關係)時,深度校正計算模組50評估可能有近物,執行步驟S25。在步驟S25,深度校正計算模組50保留那一像素區塊的原始顏色深度,不對那一像素區塊執行校正。For example, if the depth correction calculation module 50 determines which pixel block in the original image has an average depth less than the ideal depth and the difference between this pixel block and the ideal depth is greater than an ideal depth difference threshold (that is, it meets the predetermined depth When the relationship is assumed), the depth correction calculation module 50 evaluates that there may be a nearby object, and executes step S25. In step S25, the depth correction calculation module 50 retains the original color depth of that pixel block and does not perform correction on that pixel block.

相反地,若深度校正計算模組50判斷原始影像中的哪一像素區塊的平均深度與其理想深度之間的關係不符合預設關係時,深度校正計算模組50則對原始影像中的那一像素區塊的初始深度進行校正,以將所述原始影像的顏色深度校正為清楚影像的顏色深度。On the contrary, if the depth correction calculation module 50 determines which pixel block in the original image has a relationship between the average depth and its ideal depth that does not meet the preset relationship, the depth correction calculation module 50 determines that pixel block in the original image. The initial depth of a pixel block is corrected to correct the color depth of the original image to the color depth of the clear image.

舉例而言,若深度校正計算模組50判斷原始影像中的像素區塊的平均深度大於理想深度或是此像素區塊與理想深度的差值小於所述理想深度差值門檻值(即不符合預設關係)時,深度校正計算模組50對原始影像中的那一像素區塊的初始深度進行校正。For example, if the depth correction calculation module 50 determines that the average depth of the pixel block in the original image is greater than the ideal depth or the difference between the pixel block and the ideal depth is less than the ideal depth difference threshold (that is, it does not meet the ideal depth difference threshold) (default relationship), the depth correction calculation module 50 corrects the initial depth of that pixel block in the original image.

本發明實施例的影像處理系統可依序執行步驟S27~S33,來將原始影像的顏色深度校正,但本發明不以此為限。實務上,可依據實際需求,適當地調整步驟S27~S33的執行順序和內容。The image processing system of the embodiment of the present invention can sequentially execute steps S27 to S33 to correct the color depth of the original image, but the present invention is not limited thereto. In practice, the execution order and content of steps S27 to S33 can be appropriately adjusted according to actual needs.

在步驟S27,利用深度校正計算模組50設定欲校正的那一像素區塊的初始深度的權重值,將原始影像中欲校正的那一像素區塊的初始深度乘上其權重值,以取得第一運算值。In step S27, the depth correction calculation module 50 is used to set the weight value of the initial depth of the pixel block to be corrected, and the initial depth of the pixel block to be corrected in the original image is multiplied by its weight value to obtain The first operation value.

在步驟S29,利用深度校正計算模組50設定欲校正的那一像素區塊的平均深度的權重值,將原始影像中欲校正的那一像素區塊的平均深度乘上其權重值,以取得第二運算值。In step S29, the depth correction calculation module 50 is used to set the weight value of the average depth of the pixel block to be corrected, and the average depth of the pixel block to be corrected in the original image is multiplied by its weight value to obtain The second operation value.

在步驟S31,利用深度校正計算模組50設定欲校正的那一像素區塊的理想深度的權重值,將原始影像中欲校正的那一像素區塊的理想深度乘上其權重值,以取得第三運算值。In step S31, the depth correction calculation module 50 is used to set the weight value of the ideal depth of the pixel block to be corrected, and the ideal depth of the pixel block to be corrected in the original image is multiplied by its weight value to obtain The third operation value.

在步驟S33,利用深度校正計算模組50將原始影像中欲校正的那一像素區塊的第一運算值、第二運算值與第三運算值進行(相加)運算,以計算那一所述像素區塊的一參考校正深度,依據所述參考校正深度以對那一像素區塊的像素區塊的初始深度進行校正。In step S33, the depth correction calculation module 50 is used to perform (add) the first operation value, the second operation value and the third operation value of the pixel block to be corrected in the original image to calculate which pixel block is to be corrected. A reference correction depth of the pixel block is used to correct the initial depth of the pixel block of that pixel block based on the reference correction depth.

請參閱圖1至圖3,其中圖3為本發明第一實施例的具有除霧機制的影像處理系統計算出原始影像的初始深度的步驟流程圖。Please refer to FIGS. 1 to 3 . FIG. 3 is a flowchart of steps for calculating the initial depth of an original image by the image processing system with a defogging mechanism according to the first embodiment of the present invention.

本發明實施例的影像處理系統可對原始影像的各像素區塊執行如圖3所示的步驟S151~S158,以實現計算原始影像的各像素點的初始深度。The image processing system of the embodiment of the present invention can perform steps S151 to S158 as shown in FIG. 3 for each pixel block of the original image to calculate the initial depth of each pixel point of the original image.

在步驟S151,利用影像讀取識別模組10分析原始影像的各像素點的多種顏色分別的多個顏色深度。In step S151, the image reading and recognition module 10 is used to analyze multiple color depths of multiple colors of each pixel of the original image.

在步驟S152,利用初始深度計算模組20將原始影像的各像素點的多種顏色分別的多個顏色深度相互進行比對,以找出每一像素點的多種顏色分別的多個顏色深度中的最大值,作為此一像素點的最大顏色深度。In step S152, the initial depth calculation module 20 is used to compare the multiple color depths of each pixel of the original image with each other to find out the multiple color depths of each pixel. The maximum value is the maximum color depth of this pixel.

在步驟S153, 利用初始深度計算模組20依據原始影像的每一像素點的多種顏色中的最大顏色深度,來評估此像素點的明度。In step S153, the initial depth calculation module 20 is used to evaluate the brightness of each pixel of the original image based on the maximum color depth among multiple colors of the pixel.

在本實施例中,利用初始深度計算模組20將原始影像的每一像素點的多種顏色中的最大顏色深度,直接作為此像素點的明度。In this embodiment, the initial depth calculation module 20 is used to directly determine the maximum color depth among the multiple colors of each pixel of the original image as the brightness of the pixel.

舉例而言,利用初始深度計算模組20將原始影像的各像素點的紅色(R)深度、綠色(G)深度以及藍色(B)深度中的最大深度,取深度最大的那一顏色的深度作為此像素點的明度。For example, the initial depth calculation module 20 is used to calculate the maximum depth among the red (R) depth, green (G) depth, and blue (B) depth of each pixel of the original image, and select the color with the largest depth. Depth is the brightness of this pixel.

在步驟S154,利用初始深度計算模組20判斷原始影像的每一像素點的多種顏色中的最大顏色深度是否為零值。In step S154, the initial depth calculation module 20 is used to determine whether the maximum color depth among the multiple colors of each pixel of the original image is zero.

若初始深度計算模組20判斷原始影像的哪一像素點的多種顏色中的最大顏色深度是為零值時,對那一像素點依序執行步驟S155、S158,以判定那一像素點的飽和度為零值,最後依據那一像素點的明度和飽和度以計算那一像素點的初始深度。If the initial depth calculation module 20 determines which pixel of the original image has the maximum color depth among the multiple colors of zero, steps S155 and S158 are sequentially executed for that pixel to determine the saturation of that pixel. The degree is zero, and finally the initial depth of that pixel is calculated based on the brightness and saturation of that pixel.

相反地,若初始深度計算模組20判斷原始影像的哪一像素點的最大顏色深度不是為零值時,依序執行步驟S156~S158。On the contrary, if the initial depth calculation module 20 determines which pixel of the original image has a maximum color depth that is not zero, steps S156 to S158 are executed in sequence.

在步驟S156,利用初始深度計算模組20將原始影像的各像素點的多種顏色分別的多個顏色深度相互進行比對,以找出每一像素點的多種顏色分別的多個顏色深度中的最小值,作為此一像素點的最小顏色深度。In step S156, the initial depth calculation module 20 is used to compare the multiple color depths of each pixel of the original image with each other to find out the multiple color depths of each pixel. The minimum value is the minimum color depth of this pixel.

在步驟S157,利用初始深度計算模組20計算各像素點的最小顏色深度與最大顏色深度的比例,並依據所述比例以判斷那一像素點的飽和度,例如但不限於以下列公式計算: S(x) , 其中,S(x)代表原始影像的多個像素點中的第x個像素點的飽和度,Dmin代表第x個像素點的最小顏色深度,Dmax代表第x個像素點的最大顏色深度。 In step S157, the initial depth calculation module 20 is used to calculate the ratio of the minimum color depth and the maximum color depth of each pixel, and the saturation of that pixel is determined based on the ratio, for example but not limited to the following formula: S(x) , where S(x) represents the saturation of the x-th pixel among the multiple pixels of the original image, Dmin represents the minimum color depth of the x-th pixel, and Dmax represents the maximum color depth of the x-th pixel.

在步驟S158,利用初始深度計算模組20依據原始影像的多個像素點的每一像素點的飽和度和明度,以計算出每一像素點的初始深度。In step S158, the initial depth calculation module 20 is used to calculate the initial depth of each pixel based on the saturation and brightness of each pixel of the plurality of pixels in the original image.

舉例而言,利用初始深度計算模組20將原始影像每一像素點的飽和度和明度代入下列公式,以計算出原始影像每一像素點的初始深度: , 其中, 代表原始影像的多個像素點中的第x個像素點的初始深度,a1、a2、a3為比重值, 代表原始影像的明度, 代表原始影像的飽和度。舉例而言,a1為0.12,a2為0.96,a3為-0.78,在此僅舉例說明,本發明不此為限。 For example, the initial depth calculation module 20 is used to substitute the saturation and brightness of each pixel of the original image into the following formula to calculate the initial depth of each pixel of the original image: , in, Represents the initial depth of the x-th pixel among the multiple pixels of the original image, a1, a2, a3 are the specific gravity values, Represents the brightness of the original image, Represents the saturation of the original image. For example, a1 is 0.12, a2 is 0.96, and a3 is -0.78. These are only examples and the invention is not limited thereto.

請參閱圖4和圖5,其中圖4為本發明第二實施例的具有除霧機制的影像處理系統的方塊圖,圖5為本發明第二實施例的具有除霧機制的影像處理系統將原始影像還原為清晰影像的步驟流程圖。Please refer to Figures 4 and 5. Figure 4 is a block diagram of an image processing system with a defogging mechanism according to a second embodiment of the present invention. Figure 5 is a block diagram of an image processing system with a defogging mechanism according to a second embodiment of the present invention. Flowchart of steps to restore original images to clear images.

第二實施例與第一實施例相同之處,不在下文中贅述。The similarities between the second embodiment and the first embodiment will not be described again below.

本發明的影像處理系統更可包含如圖4所示的清晰影像還原模組60以及最大深度比對模組70以及目標深度決定模組80。清晰影像還原模組60、最大深度比對模組70以及目標深度決定模組80可連接深度校正計算模組50。目標深度決定模組80更可連接平均深度計算模組30。The image processing system of the present invention may further include a clear image restoration module 60, a maximum depth comparison module 70, and a target depth determination module 80 as shown in FIG. 4 . The clear image restoration module 60 , the maximum depth comparison module 70 and the target depth determination module 80 can be connected to the depth correction calculation module 50 . The target depth determination module 80 can further be connected to the average depth calculation module 30 .

本發明的影像處理系統可例如執行在圖形處理器、中央處理器或其他電子裝置上。The image processing system of the present invention may, for example, be executed on a graphics processor, a central processing unit, or other electronic devices.

本發明的影像處理系統可執行如圖5所示的步驟S41~S44。相比第一實施例,本發明第二實施例的影像處理系統在計算校正後的原始影像(即清晰影像)的顏色深度時,除了初始深度、平均深度以及理想深度外,更加入目標深度,作為加權運算參數,詳細說明如下。The image processing system of the present invention can perform steps S41 to S44 as shown in FIG. 5 . Compared with the first embodiment, the image processing system of the second embodiment of the present invention adds the target depth in addition to the initial depth, average depth and ideal depth when calculating the color depth of the corrected original image (ie, the clear image). The weighting operation parameters are explained in detail below.

在步驟S41,利用目標深度決定模組80依據原始影像的各像素區塊的平均深度與其前一(讀取的)像素區塊的平均深度之間的關係,來設定原始影像的多個像素區塊中的各像素區塊的目標深度。In step S41, the target depth determination module 80 is used to set multiple pixel areas of the original image based on the relationship between the average depth of each pixel block of the original image and the average depth of the previous (read) pixel block. The target depth for each block of pixels in the block.

在步驟S42,利用深度校正計算模組50設定欲校正的那一像素區塊的目標深度的權重值,將原始影像中欲校正的那一像素區塊的目標深度乘上其權重值,以取得第四運算值。In step S42, the depth correction calculation module 50 is used to set the weight value of the target depth of the pixel block to be corrected, and the target depth of the pixel block to be corrected in the original image is multiplied by its weight value to obtain The fourth operation value.

在步驟S43,利用深度校正計算模組50將原始影像中欲校正的那一像素區塊的第一運算值(初始深度與其權重值的乘積值)、第二運算值(平均深度與其權重值的乘積值)、第三運算值(理想深度與其權重值的乘積值)與第四運算值(目標深度與其權重值的乘積值)進行(相加)運算,以計算出那一所述像素區塊的一參考校正深度。利用深度校正計算模組50依據所述參考校正深度,以對那一像素區塊的像素區塊的初始深度進行校正(至與所述參考校正深度相同)。In step S43, the depth correction calculation module 50 is used to calculate the first operation value (the product value of the initial depth and its weight value) and the second operation value (the product value of the average depth and its weight value) of the pixel block to be corrected in the original image. Product value), the third operation value (the product value of the ideal depth and its weight value) and the fourth operation value (the product value of the target depth and its weight value) are (added) to calculate the pixel block a reference correction depth. The depth correction calculation module 50 is used to correct the initial depth of the pixel block of that pixel block according to the reference correction depth (to be the same as the reference correction depth).

上述步驟S41~S43的運算以下列方程式表示: dc(x, n) = W1 × di(x, n) + W2 × davg + W3× def + W4 × dtar, 其中dc(x, n)代表原始影像中的多個像素區塊內被影像讀取識別模組10讀取的第n個像素區塊/原始影像切分出的多個像素區塊內的第x個像素區塊校正後的顏色深度,W1代表像素區塊的初始深度的權重值,di代表像素區塊的初始深度,W2代表像素區塊的平均深度的權重值,davg代表像素區塊的平均深度,W3代表像素區塊的理想深度(或稱預設深度)的權重值,def代表像素區塊的理想深度,W4代表像素區塊的目標深度的權重值,dtar代表第n個像素區塊的目標深度。 The operations of the above steps S41~S43 are expressed by the following equation: dc(x, n) = W1 × di(x, n) + W2 × davg + W3× def + W4 × dtar, where dc(x, n) represents the n-th pixel block in the multiple pixel blocks in the original image read by the image reading and recognition module 10/the n-th pixel block in the multiple pixel blocks segmented from the original image. The corrected color depth of x pixel blocks, W1 represents the weight value of the initial depth of the pixel block, di represents the initial depth of the pixel block, W2 represents the weight value of the average depth of the pixel block, davg represents the weight value of the pixel block Average depth, W3 represents the weight value of the ideal depth (or default depth) of the pixel block, def represents the ideal depth of the pixel block, W4 represents the weight value of the target depth of the pixel block, and dtar represents the nth pixel area The target depth of the block.

舉例而言,W1為0.125,W2為0.125,W3為0.125,W4為0.625,在此僅舉例說明,本發明不以此為限。實務上,可依據實際需求,決定初始深度、平均深度、理想深度以及目標深度用於計算原始影像校正後的顏色深度的比重,以分別設定權重值W1、W2、W3、W4。For example, W1 is 0.125, W2 is 0.125, W3 is 0.125, and W4 is 0.625. This is only an example, and the invention is not limited thereto. In practice, the proportions of the initial depth, average depth, ideal depth, and target depth used to calculate the corrected color depth of the original image can be determined based on actual needs to set the weight values W1, W2, W3, and W4 respectively.

在計算出原始影像的所有需校正的多個像素區塊分別的多個參考校正深度之後,深度校正計算模組50將最後校正後的原始影像的每一像素區塊的初始深度代入下列方程式,以計算出那一像素區塊的透射率: t(x) = e βd(x), 其中,t(x)代表透射率,β代表散射係數,d(x)為第x個像素區塊的初始深度。 After calculating the multiple reference correction depths of all the pixel blocks of the original image that need to be corrected, the depth correction calculation module 50 substitutes the initial depth of each pixel block of the final corrected original image into the following equation, To calculate the transmittance of that pixel block: t(x) = e βd(x) , where t(x) represents the transmittance, β represents the scattering coefficient, and d(x) is the x-th pixel block the initial depth.

最大深度比對模組70可將最後校正後的原始影像的所有顏色深度相互比對,以找出原始影像中的最大顏色深度,作為一影像還原參數。The maximum depth comparison module 70 can compare all color depths of the final corrected original image with each other to find the maximum color depth in the original image as an image restoration parameter.

影像還原模組60可執行下方程式,以計算出清楚影像的各像素區塊的初始深度: J(x) = + A, 其中,J(x)代表未經散射的清楚影像的第x個像素區塊的初始深度,I(x)代表含有霧霾的原始影像的第x個像素區塊的初始深度,A代表影像還原參數,t(x)代表第x個像素區塊的透射率。 The image restoration module 60 can execute the following equation to calculate the initial depth of each pixel block of the clear image: J(x) = + A, where J(x) represents the initial depth of the x-th pixel block of the clear image without scattering, I(x) represents the initial depth of the x-th pixel block of the original image containing haze, A represents the image restoration parameter, and t(x) represents the transmittance of the x-th pixel block.

在步驟S44,利用影像還原模組60依據清楚影像的各像素區塊的初始深度,以將原始影像還原成清楚影像顯示。In step S44, the image restoration module 60 is used to restore the original image to a clear image display according to the initial depth of each pixel block of the clear image.

請參閱圖4至圖6,其中圖6為本發明第二實施例的具有除霧機制的影像處理系統決定目標深度的步驟流程圖。Please refer to FIGS. 4 to 6 , wherein FIG. 6 is a flow chart of steps for determining a target depth in an image processing system with a defogging mechanism according to a second embodiment of the present invention.

本發明第二實施例的影像處理系統可執行步驟S411~S417,來設定原始影像的多個像素區塊的每一像素區塊的目標深度。The image processing system according to the second embodiment of the present invention can execute steps S411 to S417 to set the target depth of each pixel block of the plurality of pixel blocks of the original image.

在步驟S411,利用目標深度決定模組80取得原始影像的多個像素區塊內的其中一像素區塊的平均深度,即目前像素區塊的平均深度。In step S411, the target depth determination module 80 is used to obtain the average depth of one of the pixel blocks among the plurality of pixel blocks of the original image, that is, the average depth of the current pixel block.

在步驟S412,利用目標深度決定模組80取得原始影像的多個像素區塊內,在目前像素區塊前被影像讀取識別模組10讀取的上一像素區塊的平均深度。In step S412, the target depth determination module 80 is used to obtain the average depth of the previous pixel block read by the image reading and recognition module 10 before the current pixel block in the multiple pixel blocks of the original image.

在步驟S413,利用目標深度決定模組80判斷目前像素區塊的平均深度是否小於上一像素區塊的平均深度,或目前像素區塊的平均深度與上一像素區塊之間的差值是否小於一平均深度差門檻值。In step S413, the target depth determination module 80 is used to determine whether the average depth of the current pixel block is less than the average depth of the previous pixel block, or whether the difference between the average depth of the current pixel block and the previous pixel block is Less than an average depth difference threshold.

若目標深度決定模組80判斷目前像素區塊的平均深度不小於上一像素區塊的平均深度,且目前像素區塊的平均深度與上一像素區塊之間的差值不小於所述平均深度差門檻值時,依序執行步驟S414、S415。If the target depth determination module 80 determines that the average depth of the current pixel block is not less than the average depth of the previous pixel block, and the difference between the average depth of the current pixel block and the previous pixel block is not less than the average When the depth difference reaches the threshold, steps S414 and S415 are executed in sequence.

在步驟S414,利用目標深度決定模組80保留上一像素區塊的平均深度。In step S414, the target depth determination module 80 is used to retain the average depth of the previous pixel block.

在步驟S415,利用目標深度決定模組80將目標深度設定為,等於上一像素區塊的平均深度。In step S415, the target depth determination module 80 is used to set the target depth equal to the average depth of the previous pixel block.

相反地,若目標深度決定模組80判斷目前像素區塊的平均深度小於上一像素區塊的平均深度,或目前像素區塊的平均深度與上一像素區塊之間的差值小於所述平均深度差門檻值時,依序執行步驟S416、S417。On the contrary, if the target depth determination module 80 determines that the average depth of the current pixel block is less than the average depth of the previous pixel block, or the difference between the average depth of the current pixel block and the previous pixel block is less than the When the average depth difference threshold is reached, steps S416 and S417 are executed in sequence.

在步驟S416,利用目標深度決定模組80將目前像素區塊的多個像素點分別的多個顏色深度相比進行比對,以從目前像素區塊的多個像素點分別的多個顏色深度中取得出現次數最多的顏色深度。In step S416, the target depth determination module 80 is used to compare the multiple color depths of the multiple pixels of the current pixel block to obtain the multiple color depths of the multiple pixels of the current pixel block. Get the most frequently occurring color depth.

在步驟S417,利用目標深度決定模組80將目標深度設定為等於,目前像素區塊的多個像素點分別的多個顏色深度中取得出現次數最多的顏色深度。In step S417, the target depth determination module 80 is used to set the target depth to be equal to the color depth with the most occurrences among the multiple color depths of the multiple pixel points in the current pixel block.

綜上所述,本發明提供一種具有除霧機制的影像處理系統,其在可在低硬體成本的條件下,有效地將含霧的模糊影像進行除霧,以產生無霧的清晰影像,作為人工智能(artificial intelligence, AI)系統學習(learning)和訓練(traning)的數據,如此可降低人工智能系統訓練出模型的複雜度,同時提高訓練模型的準確度。To sum up, the present invention provides an image processing system with a defogging mechanism, which can effectively defogging a hazy image containing fog to produce a clear image without fog at a low hardware cost. As data for learning and training of artificial intelligence (AI) systems, this can reduce the complexity of the model trained by the artificial intelligence system and improve the accuracy of the training model.

以上所公開的內容僅為本發明的優選可行實施例,並非因此侷限本發明的申請專利範圍,所以凡是運用本發明說明書及圖式內容所做的等效技術變化,均包含於本發明的申請專利範圍內。The contents disclosed above are only preferred and feasible embodiments of the present invention, and do not limit the scope of the patent application of the present invention. Therefore, all equivalent technical changes made by using the description and drawings of the present invention are included in the application of the present invention. within the scope of the patent.

10:影像讀取識別模組 20:初始深度計算模組 30:平均深度計算模組 40:理想深度計算模組 50:深度校正計算模組 60:清晰影像還原模組 70:最大深度比對模組 80:目標深度決定模組 S11~S33、S151~S158、S41~S44、S411~S417:步驟10:Image reading and recognition module 20:Initial depth calculation module 30: Average depth calculation module 40:Ideal depth calculation module 50: Depth correction calculation module 60:Clear image restoration module 70: Maximum depth comparison module 80:Target depth determination module S11~S33, S151~S158, S41~S44, S411~S417: steps

圖1為本發明第一實施例的具有除霧機制的影像處理系統的方塊圖。FIG. 1 is a block diagram of an image processing system with a defogging mechanism according to the first embodiment of the present invention.

圖2為本發明第一實施例的具有除霧機制的影像處理系統計算出原始影像校正後的顏色深度的步驟流程圖。FIG. 2 is a flowchart of steps for calculating the corrected color depth of an original image by the image processing system with a defogging mechanism according to the first embodiment of the present invention.

圖3為本發明第一實施例的具有除霧機制的影像處理系統計算出原始影像的初始深度的步驟流程圖。FIG. 3 is a flowchart of steps for calculating the initial depth of an original image by the image processing system with a defogging mechanism according to the first embodiment of the present invention.

圖4為本發明第二實施例的具有除霧機制的影像處理系統的方塊圖。FIG. 4 is a block diagram of an image processing system with a defogging mechanism according to a second embodiment of the present invention.

圖5為本發明第二實施例的具有除霧機制的影像處理系統將原始影像還原為清晰影像的步驟流程圖。FIG. 5 is a flow chart of steps for restoring an original image to a clear image by the image processing system with a defogging mechanism according to the second embodiment of the present invention.

圖6為本發明第二實施例的具有除霧機制的影像處理系統決定目標深度的步驟流程圖。FIG. 6 is a flowchart of the steps for determining the target depth of the image processing system with a defogging mechanism according to the second embodiment of the present invention.

10:影像讀取識別模組 10:Image reading and recognition module

20:初始深度計算模組 20:Initial depth calculation module

30:平均深度計算模組 30: Average depth calculation module

40:理想深度計算模組 40:Ideal depth calculation module

50:深度校正計算模組 50: Depth correction calculation module

Claims (10)

一種具有除霧機制的影像處理系統,包含: 一影像讀取識別模組,配置以讀取一原始影像的顏色深度; 一初始深度計算模組,連接所述影像識別模組,配置以判斷所述原始影像劃分出的多個像素區塊中的各所述像素區塊內的多個像素點的每一者的初始深度; 一平均深度計算模組,連接所述初始深度計算模組,配置以計算所述原始影像的各所述像素區塊內的所述多個像素點的初始深度的平均值作為一平均深度; 一理想深度計算模組,連接所述初始深度計算模組,配置以依據所述影像讀取識別模組讀取所述多個像素區塊的順序,以設定各所述像素區塊的一理想深度;以及 一深度校正計算模組,連接所述平均深度計算模組以及所述理想深度計算模組,配置以將各所述像素區塊的所述平均深度與其所述理想深度進行比較,以決定是否校正各所述像素區塊的顏色; 其中,當所述深度校正計算模組判斷所述原始影像中的哪一所述像素區塊的所述平均深度與其所述理想深度之間的關係不符合一預設關係時,所述深度校正計算模組對那一所述像素區塊的初始深度進行校正。 An image processing system with a defogging mechanism, including: an image reading and recognition module configured to read the color depth of an original image; An initial depth calculation module, connected to the image recognition module, configured to determine the initial depth of each of the plurality of pixels in each of the plurality of pixel blocks divided by the original image. depth; An average depth calculation module, connected to the initial depth calculation module, configured to calculate the average of the initial depths of the plurality of pixels in each pixel block of the original image as an average depth; An ideal depth calculation module, connected to the initial depth calculation module, configured to set an ideal depth of each pixel block according to the order in which the image reading recognition module reads the plurality of pixel blocks. depth; and A depth correction calculation module, connected to the average depth calculation module and the ideal depth calculation module, configured to compare the average depth of each pixel block with its ideal depth to determine whether to correct The color of each pixel block; Wherein, when the depth correction calculation module determines which pixel block in the original image has a relationship between the average depth and its ideal depth that does not meet a preset relationship, the depth correction The calculation module corrects the initial depth of the pixel block. 如請求項1所述的具有除霧機制的影像處理系統,其中,當所述深度校正計算模組判斷哪一所述像素區塊的所述平均深度大於所述理想深度或所述平均深度與所述理想深度之間的差值小於一理想深度差門檻值時,所述深度校正計算模組校正那一所述像素區塊的初始深度。The image processing system with a defogging mechanism as claimed in claim 1, wherein when the depth correction calculation module determines which of the pixel blocks the average depth is greater than the ideal depth or the average depth is When the difference between the ideal depths is less than an ideal depth difference threshold, the depth correction calculation module corrects the initial depth of that pixel block. 如請求項2所述的具有除霧機制的影像處理系統,其中,當所述深度校正計算模組判斷哪一所述像素區塊的所述平均深度小於所述理想深度且所述平均深度與所述理想深度之間的差值大於所述理想深度差門檻值時,所述深度校正計算模組不校正那一所述像素區塊的初始深度。The image processing system with a defogging mechanism as described in claim 2, wherein when the depth correction calculation module determines which pixel block the average depth is less than the ideal depth and the average depth is When the difference between the ideal depths is greater than the ideal depth difference threshold, the depth correction calculation module does not correct the initial depth of that pixel block. 如請求項1所述的具有除霧機制的影像處理系統,其中所述深度校正計算模組將欲校正的那一所述像素區塊的初始深度、所述平均深度以及所述理想深度中的全部或數者分別乘上多個權重值後相加以計算出那一所述像素區塊的一參考校正深度,依據所述參考校正深度以對那一所述像素區塊的所述像素區塊的初始深度進行校正。The image processing system with a defogging mechanism as claimed in claim 1, wherein the depth correction calculation module calculates the initial depth of the pixel block to be corrected, the average depth and the ideal depth. All or some of them are multiplied by multiple weight values respectively and then added together to calculate a reference correction depth of that pixel block, and the pixel block of that pixel block is calculated based on the reference correction depth. The initial depth is corrected. 如請求項1所述的具有除霧機制的影像處理系統,更包含: 一目標深度決定模組,連接所述影像讀取識別模組以及所述平均深度計算模組,配置以設定所述原始影像的各所述像素區塊的一目標深度; 其中,當目前的所述像素區塊的所述平均深度小於上一所述像素區塊的所述平均深度或與上一所述像素區塊之間的差值小於一平均深度差門檻值時,所述目標深度決定模組設定目前的所述像素區塊的所述目標深度,等於目前的所述像素區塊內出現次數最多的初始深度; 其中,當目前的所述像素區塊的所述平均深度大於上一所述像素區塊的所述平均深度且與上一所述像素區塊之間的差值大於所述平均深度差門檻值時,所述目標深度決定模組設定目前的所述像素區塊的所述目標深度等於上一所述像素區塊的所述平均深度。 The image processing system with defogging mechanism as described in claim 1 further includes: a target depth determination module, connected to the image reading recognition module and the average depth calculation module, configured to set a target depth of each pixel block of the original image; Wherein, when the average depth of the current pixel block is less than the average depth of the previous pixel block or the difference between the current pixel block and the previous pixel block is less than an average depth difference threshold , the target depth determination module sets the target depth of the current pixel block to be equal to the initial depth that appears most frequently in the current pixel block; Wherein, when the average depth of the current pixel block is greater than the average depth of the previous pixel block and the difference between the current pixel block and the previous pixel block is greater than the average depth difference threshold When , the target depth determination module sets the target depth of the current pixel block to be equal to the average depth of the previous pixel block. 如請求項5所述的具有除霧機制的影像處理系統,其中所述深度校正計算模組將欲校正的那一所述像素區塊的所述目標深度、初始深度、所述平均深度以及所述理想深度中的全部或數者分別乘上多個權重值後相加以計算出那一所述像素區塊的一參考校正深度,依據所述參考校正深度以對那一所述像素區塊的所述像素區塊的初始深度進行校正。The image processing system with a defogging mechanism as claimed in claim 5, wherein the depth correction calculation module calculates the target depth, the initial depth, the average depth and the average depth of the pixel block to be corrected. All or some of the ideal depths are multiplied by multiple weight values and then added together to calculate a reference correction depth of that pixel block, and the reference correction depth of that pixel block is calculated based on the reference correction depth. The initial depth of the pixel block is corrected. 如請求項1所述的具有除霧機制的影像處理系統,其中,當所述初始深度計算模組判斷所述原始影像中的哪一所述像素點的多種顏色的顏色深度皆為零值時,所述初始深度計算模組設定那一所述像素點的飽和度為零值; 其中,當所述初始深度計算模組判斷所述原始影像中的哪一所述像素點的多種顏色的顏色深度皆非為零值時,所述初始深度計算模組計算那一所述像素點的多種顏色中的最小顏色深度與最大顏色深度的一比例,並依據所述比例以判斷那一所述像素點的飽和度。 The image processing system with a defogging mechanism as claimed in claim 1, wherein when the initial depth calculation module determines which pixel in the original image has a color depth of multiple colors of zero, , the initial depth calculation module sets the saturation of that pixel to zero; Wherein, when the initial depth calculation module determines which pixel point in the original image has a color depth of multiple colors that are not zero, the initial depth calculation module calculates that pixel point. A ratio between the minimum color depth and the maximum color depth among multiple colors, and the saturation of that pixel is determined based on the ratio. 如請求項7所述的具有除霧機制的影像處理系統,其中所述初始深度計算模組定義各所述像素點的最大顏色深度為各所述像素點的明度,所述初始深度計算模組依據每一所述像素點的飽和度和明度以計算每一所述像素點的初始深度。The image processing system with a defogging mechanism as claimed in claim 7, wherein the initial depth calculation module defines the maximum color depth of each pixel as the brightness of each pixel, and the initial depth calculation module The initial depth of each pixel is calculated based on the saturation and brightness of each pixel. 如請求項1所述的具有除霧機制的影像處理系統,更包含: 一最大深度比對模組,連接所述深度校正計算模組,配置以將從所述深度校正計算模組將校正後的所述原始影像的所述多個像素點的顏色深度相互比對,以比對出所述多個像素點中的最大顏色深度,作為一影像還原參數。 The image processing system with defogging mechanism as described in claim 1 further includes: a maximum depth comparison module, connected to the depth correction calculation module, configured to compare the color depths of the plurality of pixels of the corrected original image with each other from the depth correction calculation module, The maximum color depth among the plurality of pixels is compared and used as an image restoration parameter. 如請求項9所述的具有除霧機制的影像處理系統,更包含: 一清晰影像還原模組,連接所述深度校正計算模組,其中所述深度校正計算模組依據所述原始影像的顏色深度與所述清晰影像的顏色深度的比例以計算出一透射率,所述影像還原模組將所述原始影像的所述多個像素區塊的初始深度與所述透射率以及校正後的所述原始影像的所述多個像素點的顏色深度進行運算,以計算出所述原始影像還原成所述清晰影像時的顏色深度,並據以還原出所述清晰影像顯示。 The image processing system with a defogging mechanism as described in claim 9 further includes: A clear image restoration module connected to the depth correction calculation module, wherein the depth correction calculation module calculates a transmittance based on the ratio of the color depth of the original image and the color depth of the clear image, so The image restoration module calculates the initial depth of the plurality of pixel blocks of the original image and the transmittance and the color depth of the plurality of pixels of the corrected original image to calculate The original image is restored to the color depth of the clear image, and the clear image display is restored accordingly.
TW112108840A 2023-03-10 2023-03-10 Image processing system having dehazing mechanism TWI831640B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW112108840A TWI831640B (en) 2023-03-10 2023-03-10 Image processing system having dehazing mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW112108840A TWI831640B (en) 2023-03-10 2023-03-10 Image processing system having dehazing mechanism

Publications (1)

Publication Number Publication Date
TWI831640B true TWI831640B (en) 2024-02-01

Family

ID=90824736

Family Applications (1)

Application Number Title Priority Date Filing Date
TW112108840A TWI831640B (en) 2023-03-10 2023-03-10 Image processing system having dehazing mechanism

Country Status (1)

Country Link
TW (1) TWI831640B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243758A (en) * 2011-07-14 2011-11-16 浙江大学 Fog-degraded image restoration and fusion based image defogging method
TW201308251A (en) * 2011-08-04 2013-02-16 Yi-Wu Chiang Underwater image enhancement system
TW201535323A (en) * 2014-03-14 2015-09-16 Nat Univ Chin Yi Technology System and method for image defogging, system and method for driving assistance
CN106999030A (en) * 2014-07-24 2017-08-01 Z思快尔有限公司 Multicore fibrescope
WO2019064825A1 (en) * 2017-09-27 2019-04-04 ソニー株式会社 Information processing device, information processing method, control device, and image processing device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243758A (en) * 2011-07-14 2011-11-16 浙江大学 Fog-degraded image restoration and fusion based image defogging method
TW201308251A (en) * 2011-08-04 2013-02-16 Yi-Wu Chiang Underwater image enhancement system
TW201535323A (en) * 2014-03-14 2015-09-16 Nat Univ Chin Yi Technology System and method for image defogging, system and method for driving assistance
CN106999030A (en) * 2014-07-24 2017-08-01 Z思快尔有限公司 Multicore fibrescope
CN110251058A (en) * 2014-07-24 2019-09-20 Z思快尔有限公司 Multicore fibrescope
WO2019064825A1 (en) * 2017-09-27 2019-04-04 ソニー株式会社 Information processing device, information processing method, control device, and image processing device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
專書 張城豪及鄺獻榮 可用於水下影像除霧之快速導引濾波器硬體架構設計與實現 臺灣博碩論文知識加值系統(https://hdl.handle.net/11296/bt9xwb) 2022年10月12日; *
專書 郭建志及沈岱範 內視鏡影像鏡面反射去除之自動修補技術研究 臺灣博碩論文知識加值系統(https://hdl.handle.net/11296/ctkbn6) 2017年08月01日 *

Similar Documents

Publication Publication Date Title
US8139819B2 (en) Eye open/close recognizing apparatus and recording medium
KR100981003B1 (en) Moving body image extraction apparatus and computer readable storage medium storing program
CN111292257B (en) Retinex-based image enhancement method in scotopic vision environment
CN106683080B (en) A kind of retinal fundus images preprocess method
CN105405105B (en) Display grey scale curve for breast molybdenum target image corrects system and method
CN111784668A (en) Digestive endoscopy image automatic freezing method based on perceptual hash algorithm
CN110910319B (en) Operation video real-time defogging enhancement method based on atmospheric scattering model
CN105096267B (en) A kind of method and apparatus that eye brightness is adjusted based on identification of taking pictures
CN109816666B (en) Symmetrical full convolution neural network model construction method, fundus image blood vessel segmentation device, computer equipment and storage medium
CN105744118B (en) A kind of video enhancement method and video enhancement systems based on video frame adaptive
CN112639865A (en) Image processing system, learning completion model, and image processing method
WO2019015477A1 (en) Image correction method, computer readable storage medium and computer device
US20120120196A1 (en) Image counting method and apparatus
CN109255760A (en) Distorted image correction method and device
CN109766007A (en) A kind of the blinkpunkt compensation method and compensation device, display equipment of display equipment
JP2007312810A (en) Image processing device
CN111080537A (en) Intelligent control method, medium, equipment and system for underwater robot
JP2004032207A (en) Image display, projector, program and storage medium
CN117237279A (en) Blind quality evaluation method and system for non-uniform distortion panoramic image
CN109934787B (en) Image splicing method based on high dynamic range
TWI831640B (en) Image processing system having dehazing mechanism
JP2007096437A (en) Determination of image creator's intention
US9323981B2 (en) Face component extraction apparatus, face component extraction method and recording medium in which program for face component extraction method is stored
CN114897647B (en) Teaching auxiliary system
CN110012277A (en) A kind of auto white balance method and device for portrait image