TW201804434A - Adaptive high dynamic range image fusion algorithm - Google Patents

Adaptive high dynamic range image fusion algorithm Download PDF

Info

Publication number
TW201804434A
TW201804434A TW105123812A TW105123812A TW201804434A TW 201804434 A TW201804434 A TW 201804434A TW 105123812 A TW105123812 A TW 105123812A TW 105123812 A TW105123812 A TW 105123812A TW 201804434 A TW201804434 A TW 201804434A
Authority
TW
Taiwan
Prior art keywords
dynamic range
high dynamic
image
range image
weight
Prior art date
Application number
TW105123812A
Other languages
Chinese (zh)
Other versions
TWI590192B (en
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 TW105123812A priority Critical patent/TWI590192B/en
Application granted granted Critical
Publication of TWI590192B publication Critical patent/TWI590192B/en
Publication of TW201804434A publication Critical patent/TW201804434A/en

Links

Landscapes

  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

Adaptive high dynamic range image fusion algorithm has steps comprising of: building a learn and image combination model, fetching a database, and performing a training and HDR combination. The combination model receives original images and combines the images as HDR images with referencing to network parameters. Training step inputs database in model and compares original images and HRD images to generate the parameters. Thus, the present invention is able to learn the images with different HDR from different users' picture taking habit, the output images may become nearly perfect.

Description

適應性高動態範圍影像合成演算法Adaptive high dynamic range image synthesis algorithm

本發明係關於一種可學習的影像合成方法,尤指一種適應性高動態範圍影像合成演算法。The invention relates to a learnable image synthesis method, in particular to an adaptive high dynamic range image synthesis algorithm.

一般數位相機所拍攝影像中可呈現的最黑/最白的比值(即對比率Contrast Ratio),取決於光感應元件的靈敏度,一般數位相機所採用的光感應元件,其對比率約為1:4,096,然而,人眼可辨識影像的對比度卻高達1:100,000,約為一般數位相機的24倍,因此,利用數位相機拍照時,其影像細節容易因陰影太暗或亮部太亮而遺失細節,為此,現有一種高動態範圍影像(High Dynamic Range Image)合成技術,可用以重製影像而增加數位相機拍攝影像的動態範圍,以減少影像細節之遺失。The blackest/whitest ratio (ie Contrast Ratio) that can be displayed in a typical digital camera depends on the sensitivity of the light-sensing element. The light-sensing element used in digital cameras generally has a contrast ratio of about 1: 4,096, however, the contrast of human-readable images is as high as 1:100,000, which is about 24 times that of a typical digital camera. Therefore, when taking pictures with a digital camera, the image details are easily lost due to too dark shadows or too bright parts. To this end, there is a high dynamic range image (High Dynamic Range Image) synthesis technology, which can be used to reproduce the image and increase the dynamic range of the image captured by the digital camera to reduce the loss of image details.

早期的高動態範圍影像(HDRI)主要係由人工進行後製合成,攝影師可以配合一般數位相機則內建的自動包圍曝光(Auto Exposure Bracketing,AEB)進行影像拍攝,即於拍攝影像時開啟自動包圍曝光功能,使數位相機以不同曝光度拍攝複數張影像,再將複數張影像以影像後製軟體進行高動態範圍影像之合成。Early high dynamic range images (HDRI) were mainly performed by manual post-production. Photographers can use the Auto Exposure Bracketing (AEB) built in general digital cameras to shoot images, which is automatic when shooting images. The bracketing function enables the digital camera to capture multiple images with different exposures, and then combines multiple images into a high-dynamic range image with image-based software.

現有影像處理軟體多已具配高動態範圍影像合成功能,其中一種合成技術係利用輸入影像中每個畫素的對比度(Contrast)、飽和度(Saturation)及曝光度(Well-Exposedness),簡稱CSE ,三者之乘積作為合成權重,再將位置相對應的複數像素依據其合成權重進行合成,進而得到高動態範圍影像。The existing image processing software has a high dynamic range image synthesis function, and one of the synthesis techniques utilizes the contrast (Contrast), saturation (Saturation) and exposure (Well-Exposedness) of each pixel in the input image, referred to as CSE. The product of the three is used as the composite weight, and the complex pixels corresponding to the position are synthesized according to the combined weights, thereby obtaining a high dynamic range image.

目前高動態範圍影像合成技術已逐漸應用於智慧型手機或高階的數位相機上,使用者可於拍攝影像後,經由智慧型手機或數位相機之運算而得到高動態範圍影像,但由於上述高動態範圍影像合成技術涉及高度影像處理的專業知識,因此目前並無提供使用者調整網路參數、合成權重或合成公式等功能,是以,現有內建於智慧型裝置或數位相機上的高動態範圍影像合成影像功能無法適應於不同拍攝習慣的使用者,且合成的效果仍不佳,造成多數使用者仍必須自行利用影像合成軟體以後製的方式進行高動態範圍影像合成,如此,除了需要高度專業技術以外,亦需花費時間以人工進行影像後製處理。At present, high dynamic range image synthesis technology has been gradually applied to smart phones or high-end digital cameras. Users can obtain high dynamic range images through the operation of smart phones or digital cameras after shooting images, but due to the above high dynamics Range image synthesis technology involves high-level image processing expertise, so there is currently no user to adjust network parameters, composite weights or synthesis formulas, so that the existing high dynamic range built into smart devices or digital cameras The image composite image function cannot be adapted to users of different shooting habits, and the synthetic effect is still not good. Most users still have to use the image synthesis software to make high dynamic range image synthesis in the future. In addition to technology, it takes time to manually perform image post-processing.

有鑒於現有高動態範圍影像合成方法無法適應不同使用者拍攝習慣之技術缺陷,本發明係提出一種適應性高動態範圍影像合成演算法,係包含有:In view of the technical defects that the existing high dynamic range image synthesis method cannot adapt to the shooting habits of different users, the present invention proposes an adaptive high dynamic range image synthesis algorithm, which includes:

建立一機器學習暨影像合成模型,該機器學習暨影像合成模型係預設有複數網路參數,並於接收複數不同曝光度的原始影像後,依據網路參數合成一參考高動態範圍影像;Establishing a machine learning and image synthesis model, the machine learning and image synthesis model is pre-set with a plurality of network parameters, and after receiving a plurality of original images with different exposures, synthesizing a reference high dynamic range image according to the network parameters;

取得一影像資料庫,該影像資料庫包含複數影像組,各影像組包含複數張不同曝光度的原始影像;Obtaining an image database, the image database comprising a plurality of image groups, each image group comprising a plurality of original images of different exposures;

執行一訓練步驟,係將該影像資料庫的複數影像組輸入該機器學習暨影像合成模型,使該機器學習暨影像合成模型比對原始影像及對應的參考高動態範圍影像後,調整其網路參數;Performing a training step, the plurality of image groups of the image database are input into the machine learning and image synthesis model, and the machine learning and image synthesis model is compared with the original image and the corresponding reference high dynamic range image, and the network is adjusted. parameter;

進行高動態範圍影像合成,係將一組待合成影像輸入訓練後的機器學習暨影像合成模型,使該機器學習暨影像合成模型依據調整後的網路參數合成一輸出高動態範圍影像。For high dynamic range image synthesis, a set of images to be synthesized is input into the trained machine learning and image synthesis model, so that the machine learning and image synthesis model synthesizes an output high dynamic range image according to the adjusted network parameters.

上述適應性高動態範圍影像合成演算法,可由使用者提供影像資料庫對機器學習暨影像合成模型進行優化訓練,藉此即可適應不同拍攝習慣的使用者,除此之外,上述適應性高動態範圍影像合成演算法係利用機器學習之原理調整網路參數,使用者不需具備影像處理的專業知識即可進行操作,有利於推廣普及。The above adaptive high dynamic range image synthesis algorithm can be optimized by the user to provide an image database for the machine learning and image synthesis model, thereby adapting to different shooting habits, and the above adaptation is high. The dynamic range image synthesis algorithm uses the principle of machine learning to adjust the network parameters. The user does not need to have the expertise of image processing to operate, which is conducive to popularization.

請配合參閱圖1,本發明適應性高動態範圍影像合成演算法主要步驟包含:Referring to FIG. 1 , the main steps of the adaptive high dynamic range image synthesis algorithm of the present invention include:

建立一機器學習暨影像合成模型,該機器學習暨影像合成模型係預設有複數網路參數,並於接收複數不同曝光度的原始影像後,依據網路參數合成一參考高動態範圍影像,本實施例中,係以類神經網路進行影像合成權重值之計算,故可藉由調整該複數網路參數達到調整合成權重之目的,其詳細步驟於後說明;Establishing a machine learning and image synthesis model, the machine learning and image synthesis model is pre-set with a plurality of network parameters, and after receiving a plurality of original images with different exposures, synthesizing a reference high dynamic range image according to network parameters, In the embodiment, the calculation of the weight of the image synthesis is performed by using the neural network, so that the weight of the composite network can be adjusted by adjusting the complex network parameters, and the detailed steps are described later;

取得一影像資料庫,該影像資料庫包含複數影像組,各影像組包含複數張不同曝光度的原始影像;Obtaining an image database, the image database comprising a plurality of image groups, each image group comprising a plurality of original images of different exposures;

執行一訓練步驟,係將該影像資料庫的複數影像組輸入該機器學習暨影像合成模型,使該機器學習暨影像合成模型比對原始影像及對應的參考高動態範圍影像後,調整其網路參數;Performing a training step, the plurality of image groups of the image database are input into the machine learning and image synthesis model, and the machine learning and image synthesis model is compared with the original image and the corresponding reference high dynamic range image, and the network is adjusted. parameter;

進行高動態範圍影像合成,係將一組待合成影像輸入訓練後的機器學習暨影像合成模型,使該機器學習暨影像合成模型依據調整後的網路參數合成一輸出高動態範圍影像。。For high dynamic range image synthesis, a set of images to be synthesized is input into the trained machine learning and image synthesis model, so that the machine learning and image synthesis model synthesizes an output high dynamic range image according to the adjusted network parameters. .

請進一步配合參閱圖2,上述機器學習暨影像合成模型,執行步驟包含一權重計算程序、一高動態範圍影像合成程序及一參數優化程序,其可以硬體或以軟體達成,該權重計算程序係接收原始影像各像素的對比度、飽和度及亮度後,依據該複數網路參數進行計算而輸出一合成權重,該高動態範圍影像合成程序係接收複數原始影像及該權重計算程序所計算出對應各像素的合成權重,並依據該合成權重將該複數原始影像合成該參考高動態範圍影像,該參數優化程序係接收原始影像及對應的參考高動態範圍影像,並比對參考高動態範圍影像及對應的原始影像後,調整該權重計算程序之網路參數,其步驟容後詳述之。Please further refer to FIG. 2, the above machine learning and image synthesis model, the execution step includes a weight calculation program, a high dynamic range image synthesis program and a parameter optimization program, which can be achieved by hardware or software, and the weight calculation program is After receiving the contrast, saturation, and brightness of each pixel of the original image, calculating a composite weight according to the complex network parameter, the high dynamic range image synthesis program receives the complex original image and the weight calculation program calculates the corresponding Combining the weight of the pixel, and synthesizing the complex original image into the reference high dynamic range image according to the composite weight, the parameter optimization program receives the original image and the corresponding reference high dynamic range image, and compares the reference high dynamic range image and corresponding After the original image, adjust the network parameters of the weight calculation program, and the steps are detailed later.

上述權重計算程序係以一類神經網路達成,其架構圖如圖3所示,其包含一輸入層、一隱藏層及一輸出層,該輸入層係接收原始影像各像素之對比度、飽和度及亮度,該隱藏層係依據該複數內部函數以一激發函數進行轉換而輸出該合成權重Y ,於本實施例中,該複數網路參數至少包含輸入權重w11 ~w3h 、激發函數φ1h 及輸出權重β1k ,該輸出層係輸出對應各像素的合成權重,關於上述原始影像各像素的對比度、飽和度及亮度,係分別以下列方法計算:The weight calculation program is implemented by a type of neural network, and its architecture diagram is as shown in FIG. 3, which includes an input layer, a hidden layer and an output layer, and the input layer receives the contrast, saturation and pixel of each pixel of the original image. The brightness layer is converted according to the complex internal function by an excitation function to output the composite weight Y. In this embodiment, the complex network parameter includes at least an input weight w 11 ~ w 3h and an excitation function φ 1 ~ φ h and the output weight β 1k , the output layer outputs the combined weight corresponding to each pixel, and the contrast, saturation and brightness of each pixel of the original image are calculated by the following methods:

對比度參數C是利用像素灰階化及拉普拉斯轉換取得;The contrast parameter C is obtained by pixel graying and Laplace conversion;

飽和度參數S係利用HSV模型取得:

Figure TW201804434AD00001
The saturation parameter S is obtained using the HSV model:
Figure TW201804434AD00001

亮度參數L為像素之灰階值The brightness parameter L is the gray scale value of the pixel

整理上述權重計算程序隱藏層之激發函數如下所示:The excitation function of the hidden layer of the above weight calculation program is as follows:

Figure TW201804434AD00002
(w為輸入權重、x為輸入、b為偏權值),w與b為介於0至1之間隨機決定之值。
Figure TW201804434AD00002
(w is the input weight, x is the input, b is the bias value), and w and b are randomly determined values between 0 and 1.

又,上述權重計算程序第一次計算合成權重時,可初始設定網路參數使其合成權重恰為對比度、飽和度及亮度三者相乘之乘積

Figure TW201804434AD00003
,再由後續訓練步驟進一步調整網路參數。Moreover, when the weight calculation program calculates the combined weight for the first time, the network parameter can be initially set such that the combined weight is the product of the multiplication of contrast, saturation, and brightness.
Figure TW201804434AD00003
Then, the network parameters are further adjusted by subsequent training steps.

曝光度參數

Figure TW201804434AD00004
係利用高斯曲線取得:
Figure TW201804434AD00005
Figure TW201804434AD00006
為像素之正規化灰階值,
Figure TW201804434AD00007
設為一固定值0.2。Exposure parameter
Figure TW201804434AD00004
Use the Gaussian curve to obtain:
Figure TW201804434AD00005
,
Figure TW201804434AD00006
Normalized grayscale values for pixels,
Figure TW201804434AD00007
Set to a fixed value of 0.2.

請進一步配合參閱圖4,為減少高動態範圍影像發生合成接縫之現象,上述高動態範圍影像合成程序係採用拉普拉斯金字塔及高斯金字塔之影像處理進行高動態範圍影像合成,其包含以下步驟:Please further refer to FIG. 4, in order to reduce the phenomenon of synthetic seams in high dynamic range images, the high dynamic range image synthesis program uses Laplacian pyramid and Gaussian pyramid image processing for high dynamic range image synthesis, which includes the following step:

將複數原始影像進行複數階層的高斯金字塔轉換及拉普拉斯金字塔轉換;Performing a multi-level Gaussian pyramid transformation and a Laplacian pyramid transformation on a plurality of original images;

依據原始影像各像素之合成權重得到一合成權重圖(Weight Map),係對應各像素的合成權重,依對應像素之位置合成該合成權重圖,並將該合權重圖進行高斯金字塔轉換;According to the composite weight of each pixel of the original image, a composite weight map is obtained, corresponding to the combined weight of each pixel, and the combined weight map is synthesized according to the position of the corresponding pixel, and the weighted graph is converted into a Gaussian pyramid;

將經過轉換後的複數原始影像與對應對經過轉換後的合成權重圖依據相對層級相乘(Level to Level),再將相乘後各層級的影像疊加,如圖5所示,以得到該參考高動態範圍影像。Multiplying the converted complex original image with the corresponding pair of converted composite weight maps according to the level of level, and then superimposing the images of each level after multiplication, as shown in FIG. 5, to obtain the reference. High dynamic range image.

(即

Figure TW201804434AD00008
,G為經過高斯金字塔轉換的合成權重圖,L為經過拉普拉斯金字塔轉換的原始影像。)(which is
Figure TW201804434AD00008
, G is a composite weight map transformed by Gaussian pyramid, and L is the original image transformed by Laplacian pyramid. )

上述高斯金字塔轉換式如下:(R為Reduce,高斯金字塔層級越高,影像大小越小)

Figure TW201804434AD00009
The above Gaussian pyramid is transformed as follows: (R is Reduce, the higher the Gaussian pyramid level, the smaller the image size)
Figure TW201804434AD00009

其中i、j為像素點之座標,l為為金字塔層數,w為

Figure TW201804434AD00010
Where i and j are the coordinates of the pixel points, l is the number of pyramid layers, and w is
Figure TW201804434AD00010

上述拉普拉斯金字塔轉換式如下:

Figure TW201804434AD00011
The above Laplacian pyramid conversion is as follows:
Figure TW201804434AD00011

其中E為Enhance,拉普拉斯金字塔層級越高,影像大小越小。

Figure TW201804434AD00012
Where E is Enhance, the higher the Laplacian pyramid level, the smaller the image size.
Figure TW201804434AD00012

疊加之演算式如下:

Figure TW201804434AD00013
=
Figure TW201804434AD00014
Figure TW201804434AD00015
Figure TW201804434AD00016
Figure TW201804434AD00017
Figure TW201804434AD00018
=
Figure TW201804434AD00019
The calculation formula of the superposition is as follows:
Figure TW201804434AD00013
=
Figure TW201804434AD00014
Figure TW201804434AD00015
Figure TW201804434AD00016
Figure TW201804434AD00017
Figure TW201804434AD00018
=
Figure TW201804434AD00019

其中N為最大之金字塔層級;Where N is the largest pyramid level;

L與g分別代表拉普拉斯與高斯金字塔。L and g represent the Laplace and Gaussian pyramids, respectively.

再請進一步配合參閱圖6,本發明適應性高動態範圍影像合成演算法執行訓練步驟時,係由上述參數優化程序接收原始影像及該高動態範圍影像合成程序所合成對應的參考高動態範圍影像後,進行以下步驟:Further, referring to FIG. 6 , when the adaptive high dynamic range image synthesis algorithm performs the training step, the parameter optimization program receives the original image and the corresponding high dynamic range image synthesized by the high dynamic range image synthesis program. After that, proceed as follows:

取得複數原始影像及其對應的參考高動態範圍影像;Obtaining a plurality of original images and corresponding reference high dynamic range images;

比對參考高動態範圍影像與複數原始影像之結構相似性(Structural Similarity Index,SSIM),並以灰階值是否介於255*0.1與255*0.9之間確定原始影像中各像素是否正常曝光,實作上可設定一基準值,若算出結構相似性低於該基準值且無過度曝光,則判定為曝光正常,判斷是否曝光正常的依據可設定其他條件,不限於上述條件;Comparing the structural similarity (SSIM) of the reference high dynamic range image with the complex original image, and determining whether each pixel in the original image is normally exposed by whether the grayscale value is between 255*0.1 and 255*0.9. In practice, a reference value can be set. If the structural similarity is calculated to be lower than the reference value and there is no overexposure, it is determined that the exposure is normal, and the basis for determining whether the exposure is normal can be set other conditions, and is not limited to the above conditions;

若曝光正常,則增加對應該像素的合成權重,以取得新的合成權重,於本實施例中,係於每次判斷後,將合成權重乘上(1+0.1),以增加合成權重;If the exposure is normal, the combined weights of the corresponding pixels are increased to obtain a new combined weight. In this embodiment, after each judgment, the combined weight is multiplied by (1+0.1) to increase the combined weight;

依據以前一步驟算出新的合成權重為學習目標,調整上述權重計算程序的網路參數,其詳細調整方式於後說明;According to the previous step, the new composite weight is calculated as the learning target, and the network parameters of the weight calculation program are adjusted, and the detailed adjustment manner is described later;

取得新的合成權重,以及取得新的參考高動態範圍影像,並回到比對參考高動態範圍影像與原始影像結構相似性之步驟,係交由權重計算程序重新計算新的合成權重,並由該高動態範圍影像合成程序合成新的參考高動態範圍影像,再交由優化程序再次計算結構相似性及調整網路參數。Obtaining a new composite weight, and obtaining a new reference high dynamic range image, and returning to the step of comparing the similarity between the reference high dynamic range image and the original image structure, the weight calculation program recalculates the new composite weight, and The high dynamic range image synthesis program synthesizes a new reference high dynamic range image, and then calculates the structural similarity and adjusts the network parameters by the optimization program.

上述參數優化程序調整激發函數之步驟,係以一線上序列極限機器學習(Online Sequential ELM ,簡稱OSELM)計算新的網路參數,本實施例係以計算新的輸出權重β1k 為例,上述線上序列極限機器學習係如圖7所示,於本實施例中,繼重新計算上述激發函數H0 複數網路參數中的輸出權重β,詳細如下式:

Figure TW201804434AD00020
Figure TW201804434AD00021
Figure TW201804434AD00022
Figure TW201804434AD00023
Figure TW201804434AD00024
Figure TW201804434AD00025
*HThe above parameter optimization program adjusts the excitation function by calculating a new network parameter by using Online Sequential ELM (OSELM). This embodiment takes the calculation of a new output weight β 1 ~ β k as an example. The above-mentioned online sequence limit machine learning system is shown in FIG. 7. In this embodiment, the output weight β in the complex network parameter of the above-mentioned excitation function H 0 is recalculated, as follows:
Figure TW201804434AD00020
Figure TW201804434AD00021
Figure TW201804434AD00022
Figure TW201804434AD00023
Figure TW201804434AD00024
Figure TW201804434AD00025
*H

其中βd+1 為調整後的輸出權重,T即為再次經過激發函數後輸出的合成權重。Where β d+1 is the adjusted output weight, and T is the combined weight output after the excitation function is again passed.

經實際實驗數據顯示,上述權重計算程序中類神經網路之節點數超過50,可使其錯誤率收斂並降低至穩定的範圍,是以,上述類神經網路之節點可設定為50,本實施例較佳地設定為100。The actual experimental data shows that the number of nodes of the neural network in the above weight calculation program exceeds 50, which can cause the error rate to converge and reduce to a stable range. Therefore, the node of the above-mentioned neural network can be set to 50, The embodiment is preferably set to 100.

又上述參數優化程序係以遞迴運算重複調整類神經網路之網路參數,以達到學習之目的,其遞迴次數可預設一優化次數,於反覆執行調整網路參數之次數達到該優化次數後停止執行優化程序,或設定以SSIM指標值為終止訓練之條件,或者兩者搭配作為停止訓練之條件。The above parameter optimization program repeatedly adjusts the network parameters of the neural network based on the recursive operation to achieve the purpose of learning, and the number of recursive times can be preset by an optimization number, and the number of times of adjusting the network parameters is repeatedly performed to achieve the optimization. After the number of times, the optimization program is stopped, or the condition for terminating the training with the SSIM index value is set, or the two are used as the conditions for stopping the training.

本發明適應性高動態範圍影像合成演算法可內建於數位相機或智慧型可攜式裝置,由使用者自行拍攝之照片作為影像資料庫,以對該機器學習暨影像合成模型進行訓練,以調整權重計算程序的網路參數,如此可使該機器學習暨影像合成模型適應不同使用者的使用習慣。The adaptive high dynamic range image synthesis algorithm of the invention can be built in a digital camera or a smart portable device, and the photo taken by the user is used as an image database to train the machine learning and image synthesis model to Adjusting the network parameters of the weight calculation program, the machine learning and image synthesis model can be adapted to the usage habits of different users.

上述機器學習暨影像合成模型中參數優化程序的目的係為調整權重計算程序的網路參數,可不必於每次進行高動態範圍影像合成時皆透過參數優化程序進行參數優化,意即,當使用者以自行拍攝之影像資料庫對機器學習暨影像合成模型訓練完畢後,其網路參數多半已收斂,其後續輸入之照片即可直接利用先前調整出的網路參數進行高動態範圍影像合成輸出輸出高動態範圍影像即可。The purpose of the parameter optimization program in the above machine learning and image synthesis model is to adjust the network parameters of the weight calculation program, and it is not necessary to perform parameter optimization through the parameter optimization program every time the high dynamic range image synthesis is performed, that is, when using After training the machine learning and image synthesis model with the self-photographed image database, most of the network parameters have been converged, and the subsequent input photos can directly use the previously adjusted network parameters for high dynamic range image synthesis output. Output high dynamic range images.

本發明適應性高動態範圍影像合成演算法除可達到適應不同使用者習慣之目的以外,亦可提高影像合成之品質,為以統計數據呈現影像合成品質,以下利用三個影像指標配合圖7及圖8數據說明。The adaptive high dynamic range image synthesis algorithm of the invention can not only achieve the purpose of adapting to different user habits, but also improve the quality of image synthesis, and present image synthesis quality by statistical data. The following three image indicators are used together with FIG. 7 and Figure 8 shows the data.

實驗利用影像指標值作為評估高動態範圍影樣品質之指標,該指標值越大,表示影像品質越高,影像指標值之計算方式為ASSIM*STD*IE*1000,其中:

Figure TW201804434AD00026
The experiment uses the image index value as an indicator to evaluate the high dynamic range shadow sample quality. The larger the index value, the higher the image quality, and the image index value is calculated as ASSIM*STD*IE*1000, where:
Figure TW201804434AD00026

其中:

Figure TW201804434AD00027
為各像素的SSIM指標值,p為總像素數量,M、N為各行、列的總像素數。
Figure TW201804434AD00028
among them:
Figure TW201804434AD00027
For the SSIM index value of each pixel, p is the total number of pixels, and M and N are the total number of pixels in each row and column.
Figure TW201804434AD00028

其中:

Figure TW201804434AD00029
為平均亮度,
Figure TW201804434AD00030
為座標(i,j)像素的亮度。
Figure TW201804434AD00031
among them:
Figure TW201804434AD00029
For average brightness,
Figure TW201804434AD00030
Is the brightness of the coordinates (i, j) pixels.
Figure TW201804434AD00031

其中:L為灰階像素的總階數,pi 為第i階像素之機率。Where: L is the total order of gray-scale pixels, and p i is the probability of the i-th pixel.

而圖7所示的實驗數據統計中顯示,圖中標示image1~image36分別為36組測試影像,針對各組測試影像計算兩個指標值,左邊柱狀標示以傳統的高動態範圍影像(不調整合成權重)與原影像對照後算出的影像指標值,右邊柱狀標示以本發明適應性高動態範圍影像合成演算法合成之高動態範圍影像與原影像對照算出的影像指標值,圖中可看出,本發明相較於傳統高動態範圍影像合成方法,可提升合成影像的品質,圖8統計數據則顯示平均而言,本發明適應性高動態範圍影像合成演算法具有更佳的影像優化效果。The experimental data shown in Figure 7 shows that the image1~image36 are 36 sets of test images, and two index values are calculated for each test image. The left column is labeled with a traditional high dynamic range image (not adjusted). Synthetic weight) The image index value calculated after comparison with the original image, and the right column indicates the image index value calculated by comparing the high dynamic range image synthesized by the adaptive high dynamic range image synthesis algorithm of the present invention with the original image, which can be seen in the figure. The present invention can improve the quality of the synthesized image compared with the conventional high dynamic range image synthesis method, and the statistical data of FIG. 8 shows that the adaptive high dynamic range image synthesis algorithm of the present invention has better image optimization effect. .

圖1:為本發明之流程圖。 圖2:為圖1中執行訓練步驟之細部流程圖。 圖3:為圖2中權重計算程序步驟以類神經網路實施之示意圖。 圖4:為圖2中高動態範圍影像合成程序步驟之細部流程圖。 圖5:為圖4中高斯及拉普拉斯金字塔轉換示意圖。 圖6:為圖2中參數優化程序步驟之細部流程圖。 圖7:為本發明與現有技術比較之一實驗數據統計圖。 圖8:為本發明與現有技術比較之另一實驗數據圖。Figure 1 is a flow chart of the present invention. Figure 2 is a detailed flow chart of the execution of the training steps in Figure 1. Figure 3 is a schematic diagram of the implementation of the weight calculation procedure in Figure 2 with a neural network. Figure 4 is a detailed flow chart of the steps of the high dynamic range image synthesis procedure of Figure 2. Figure 5: Schematic diagram of the Gaussian and Laplacian pyramid transformation in Figure 4. Figure 6 is a detailed flow chart of the steps of the parameter optimization procedure in Figure 2. Figure 7 is a statistical graph of experimental data comparing the present invention with the prior art. Figure 8 is a diagram showing another experimental data of the present invention compared with the prior art.

Claims (10)

一種適應性高動態範圍影像合成演算法,係包含有: 建立一機器學習暨影像合成模型,該機器學習暨影像合成模型係預設有複數網路參數,並於接收複數不同曝光度的原始影像後,依據網路參數合成一參考高動態範圍影像; 取得一影像資料庫,該影像資料庫包含複數影像組,各影像組包含複數張不同曝光度的原始影像; 執行一訓練步驟,係將該影像資料庫的複數影像組輸入該機器學習暨影像合成模型,使該機器學習暨影像合成模型比對原始影像及對應的參考高動態範圍影像後,調整其網路參數; 進行高動態範圍影像合成,係將一組待合成影像輸入訓練後的機器學習暨影像合成模型,使該機器學習暨影像合成模型依據調整後的網路參數合成一輸出高動態範圍影像。An adaptive high dynamic range image synthesis algorithm includes: establishing a machine learning and image synthesis model, the machine learning and image synthesis model is pre-set with a plurality of network parameters, and receiving a plurality of original images with different exposures Then, synthesizing a reference high dynamic range image according to the network parameter; obtaining an image database, the image database comprising a plurality of image groups, each image group comprising a plurality of original images of different exposures; performing a training step The plurality of image groups of the image database are input into the machine learning and image synthesis model, and the machine learning and image synthesis model is compared with the original image and the corresponding reference high dynamic range image, and the network parameters are adjusted; high dynamic range image synthesis is performed. The machine learning and image synthesis model after the training of the image to be synthesized is input, so that the machine learning and image synthesis model synthesizes an output high dynamic range image according to the adjusted network parameters. 如請求項1所述之適應性高動態範圍影像合成演算法,機器學習暨影像合成模型係執行以下步驟: 執行一權重計算程序,係接收原始影像各像素的對比度、飽和度及亮度後,依據該複數網路參數進行計算而輸出一合成權重; 執行一高動態範圍影像合成程序,係接收複數原始影像及該權重計算程序所計算出各像素對應的合成權重,並依據該合成權重將該複數原始影像合成該參考高動態範圍影像;及 執行一參數優化程序,係接收原始影像及對應的參考高動態範圍影像,並比對參考高動態範圍影像及對應的原始影像後,調整該權重計算程序之網路參數。The adaptive high dynamic range image synthesis algorithm according to claim 1, the machine learning and image synthesis model performs the following steps: Performing a weight calculation program, after receiving the contrast, saturation and brightness of each pixel of the original image, The complex network parameter is calculated to output a composite weight; performing a high dynamic range image synthesis program, which receives the complex original image and the combined weight calculated by the weight calculation program for each pixel, and the complex number is determined according to the composite weight The original image is synthesized into the reference high dynamic range image; and a parameter optimization program is executed, and the original image and the corresponding reference high dynamic range image are received, and the reference high dynamic range image and the corresponding original image are compared, and the weight calculation program is adjusted. Network parameters. 如請求項2所述之適應性高動態範圍影像合成演算法,該權重計算程序係以一類神經網路達成,該類神經網路包含一輸入層、一隱藏層及一輸出層,該輸入層係接收原始影像各像素之對比度、飽和度及亮度,該隱藏層係依據該複數內部函數以一激發函數進行轉換而輸出該合成權重。The adaptive high dynamic range image synthesis algorithm according to claim 2, wherein the weight calculation program is implemented by a type of neural network, the neural network comprising an input layer, a hidden layer and an output layer, the input layer The contrast, saturation, and brightness of each pixel of the original image are received, and the hidden layer is converted according to the complex internal function by an excitation function to output the combined weight. 如請求項2所述之適應性高動態範圍影像合成演算法,該高動態範圍影像合成程序包含以下步驟: 將複數原始影像進行複數階層的高斯金字塔轉換及拉普拉斯金字塔轉換; 依據原始影像各像素之合成權重得到一合成權重圖(Weight Map),並將該合權重圖進行高斯金字塔轉換; 將經過轉換後的複數原始影像與對應的經過轉換後的合成權重圖依相對層級相乘,再將相乘後各層級的影像疊加,以得到該參考高動態範圍影像。The adaptive high dynamic range image synthesis algorithm according to claim 2, wherein the high dynamic range image synthesis program comprises the following steps: performing complex Gaussian pyramid transformation and Laplacian pyramid transformation on the complex original image; The composite weight of each pixel obtains a weight map, and the weighted map is converted into a Gaussian pyramid; the converted complex original image is multiplied by the corresponding composite weight map according to the relative level. The images of each level are multiplied to obtain the reference high dynamic range image. 如請求項2所述之適應性高動態範圍影像合成演算法,該優化程序包含以下步驟: 取得複數原始影像及其對應的參考高動態範圍影像; 比對參考高動態範圍影像與複數原始影像之結構相似性,以確定原始影像中各像素是否正常曝光; 若正常曝光,則增加對應該像素的合成權重,以取得新的合成權重; 依據以前一步驟算出新的合成權重為學習目標,調整上述權重計算程序的網路參數; 取得新的合成權重,以及取得新的參考高動態範圍影像,並回到比對參考高動態範圍影像與原始影像結構相似性之步驟。The adaptive high dynamic range image synthesis algorithm according to claim 2, wherein the optimization program comprises the steps of: obtaining a plurality of original images and corresponding reference high dynamic range images; comparing the reference high dynamic range image with the complex original image Structural similarity to determine whether each pixel in the original image is normally exposed; if normal exposure, increase the composite weight of the corresponding pixel to obtain a new composite weight; according to the previous step, calculate a new composite weight as the learning target, adjust the above Weight calculation program network parameters; obtain new composite weights, and obtain new reference high dynamic range images, and return to the step of comparing the similarity between the reference high dynamic range image and the original image structure. 如請求項2所述之適應性高動態範圍影像合成演算法,該優化程序設定有一優化次數,並於反覆執行調整網路參數之次數達到該優化次數後停止執行優化程序。The adaptive high dynamic range image synthesis algorithm according to claim 2, wherein the optimization program sets an optimization number, and stops executing the optimization program after repeatedly performing the adjustment network parameter times to reach the optimization number. 如請求項3所述之適應性高動態範圍影像合成演算法,該高動態範圍影像合成程序包含以下步驟: 將複數原始影像進行複數階層的高斯金字塔轉換及拉普拉斯金字塔轉換; 依據原始影像各像素之合成權重得到一合成權重圖(Weight Map),並將該合權重圖進行高斯金字塔轉換; 將經過轉換後的複數原始影像與對應的經過轉換後的合成權重圖依相對層級相乘,再將相乘後各層級的影像疊加,以得到該參考高動態範圍影像。The adaptive high dynamic range image synthesis algorithm according to claim 3, wherein the high dynamic range image synthesis program comprises the following steps: performing complex Gaussian pyramid transformation and Laplacian pyramid transformation on the complex original image; The composite weight of each pixel obtains a weight map, and the weighted map is converted into a Gaussian pyramid; the converted complex original image is multiplied by the corresponding composite weight map according to the relative level. The images of each level are multiplied to obtain the reference high dynamic range image. 如請求項7所述之適應性高動態範圍影像合成演算法,該優化程序包含以下步驟: 取得複數原始影像及其對應的參考高動態範圍影像; 比對參考高動態範圍影像與複數原始影像之結構相似性,以確定原始影像中各像素是否正常曝光; 若無正常曝光,則增加對應該像素的合成權重,以取得新的合成權重; 依據以前一步驟算出新的合成權重為學習目標,調整上述權重計算程序的網路參數; 取得新的合成權重,以及取得新的參考高動態範圍影像,並回到比對參考高動態範圍影像與原始影像結構相似性之步驟。The adaptive high dynamic range image synthesis algorithm according to claim 7, the optimization program comprising the steps of: obtaining a plurality of original images and corresponding reference high dynamic range images; comparing the reference high dynamic range image with the complex original image Structural similarity to determine whether each pixel in the original image is normally exposed; if there is no normal exposure, increase the combined weight of the corresponding pixel to obtain a new composite weight; calculate a new composite weight as a learning target according to the previous step, adjust The network parameters of the above weight calculation program; obtaining a new composite weight, and obtaining a new reference high dynamic range image, and returning to the step of comparing the similarity between the reference high dynamic range image and the original image structure. 如請求項8所述之適應性高動態範圍影像合成演算法,該優化程序設定有一優化次數,並於反覆執行調整網路參數之次數達到該優化次數後停止執行優化程序。The adaptive high dynamic range image synthesis algorithm according to claim 8, wherein the optimization program sets an optimization number, and stops executing the optimization program after repeatedly performing the adjustment network parameter times to reach the optimization number. 如請求項8所述之適應性高動態範圍影像合成演算法,該複數網路參數至少包含輸入權重、激發函數及輸出權重,該優化程序係調整上述權重計算程序網路參數中的輸出權重。The adaptive high dynamic range image synthesis algorithm according to claim 8, wherein the complex network parameter includes at least an input weight, an excitation function, and an output weight, and the optimization program adjusts an output weight in the network parameter of the weight calculation program.
TW105123812A 2016-07-27 2016-07-27 Adaptive high dynamic range image fusion algorithm TWI590192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW105123812A TWI590192B (en) 2016-07-27 2016-07-27 Adaptive high dynamic range image fusion algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW105123812A TWI590192B (en) 2016-07-27 2016-07-27 Adaptive high dynamic range image fusion algorithm

Publications (2)

Publication Number Publication Date
TWI590192B TWI590192B (en) 2017-07-01
TW201804434A true TW201804434A (en) 2018-02-01

Family

ID=60048202

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105123812A TWI590192B (en) 2016-07-27 2016-07-27 Adaptive high dynamic range image fusion algorithm

Country Status (1)

Country Link
TW (1) TWI590192B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10630911B2 (en) 2018-09-06 2020-04-21 Altek Corporation Image processing method and image processing device
US12051180B2 (en) 2020-04-30 2024-07-30 Chiun Mai Communication Systems, Inc. Method for generating images with high dynamic range during multiple exposures and times of capture, device employing method, and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10630911B2 (en) 2018-09-06 2020-04-21 Altek Corporation Image processing method and image processing device
US12051180B2 (en) 2020-04-30 2024-07-30 Chiun Mai Communication Systems, Inc. Method for generating images with high dynamic range during multiple exposures and times of capture, device employing method, and storage medium

Also Published As

Publication number Publication date
TWI590192B (en) 2017-07-01

Similar Documents

Publication Publication Date Title
WO2022000397A1 (en) Low-illumination image enhancement method and apparatus, and computer device
CN108364267B (en) Image processing method, device and equipment
CN110728648B (en) Image fusion method and device, electronic equipment and readable storage medium
Wei et al. Physics-based noise modeling for extreme low-light photography
Liang et al. Cameranet: A two-stage framework for effective camera isp learning
CN110728633B (en) Multi-exposure high-dynamic-range inverse tone mapping model construction method and device
WO2020192483A1 (en) Image display method and device
US20200234414A1 (en) Systems and methods for transforming raw sensor data captured in low-light conditions to well-exposed images using neural network architectures
CN111669514B (en) High dynamic range imaging method and apparatus
US11508038B2 (en) Image processing method, storage medium, image processing apparatus, learned model manufacturing method, and image processing system
CN111292264A (en) Image high dynamic range reconstruction method based on deep learning
CN107590791B (en) Image enhancement method and image processing apparatus
CN108833775B (en) HDR method and device for resisting motion ghost and portable terminal
CN103314572A (en) Method and device for image processing
CN108600638B (en) Automatic focusing system and method for camera
CN111047543A (en) Image enhancement method, device and storage medium
CN111986106A (en) High dynamic image reconstruction method based on neural network
CN114862698A (en) Method and device for correcting real overexposure image based on channel guidance
CN114785966B (en) Exposure control method, shooting processing method, device and medium
CN112581392A (en) Image exposure correction method, system and storage medium based on bidirectional illumination estimation and fusion restoration
TWI590192B (en) Adaptive high dynamic range image fusion algorithm
Fu et al. Raw image based over-exposure correction using channel-guidance strategy
CN111724447A (en) Image processing method, system, electronic equipment and storage medium
CN113592753A (en) Image processing method and device based on industrial camera shooting and computer equipment
US11869224B2 (en) Method and system for establishing light source information prediction model

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees