Processed Raw Enable#
資訊
Processed Raw Enable 功能僅適用於以下相機型號,且為必備功能:aca1280-60gc、aca1300-60gc、aca1600-60gc、 aca1920-25gc、aca2000-50gc、aca2040-25gc、aca2500-14gc、aca3800-10gc
使用功能#
啟用Processed Raw Enable#
僅當同時滿足以下兩項條件時,才應啟用「Processed Raw Enable 」功能:
- 您已設定為拜耳像素格式。
- 您想使用 Color Transformation 功能、 Color Adjustment 功能,或是兩者皆用。
在所有其他情況下,請勿啟用此功能。否則,影像品質可能會降低。
若要啟用「Processed Raw Enable 」功能:
- 將像素格式設定為拜耳像素格式,例如拜耳 12。
- 將相機中的
ProcessedRawEnable參數設為true.
運作原理#
該 Color Transformation 以及 Color Adjustment 功能必須將影像資料儲存為 RGB 三元組才能運作。當使用「原始」拜耳像素格式時,通常不會提供 RGB 三元組。相反地,每個像素僅提供紅色、綠色或藍色其中一項資料。為了計算 RGB 三元組,必須對原始影像資料執行去馬賽克演算法。這意味著必須對原始影像資料進行處理。
當啟用Processed Raw Enable 時,原始的拜耳像素資料會經過去馬賽克處理並轉換為RGB資料,從而使 Color Transformation 及 Color Adjustment 功能得以運作。隨後,經處理的像素資料會重新轉換為拜耳像素資料。最終輸出的拜耳資料已不再是「原始」輸出,而是「經處理的原始」輸出。
當「Processed Raw Enable 」功能被停用且採用拜耳像素格式時, Color Transformation 且 Color Adjustment 功能雖仍可用,但不會產生任何效果。
範例程式碼#
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK; /* Return value of pylon methods */
/* Set the pixel format to Bayer BG8 */
errRes = PylonDeviceFeatureFromString(hdev, "PixelFormat", "BayerBG8");
CHECK(errRes);
/* Enable Processed Raw Enable */
errRes = PylonDeviceSetBooleanFeature(hdev, "ProcessedRawEnable", 1);
CHECK(errRes);
您也可以 use the pylon Viewer 來輕鬆設定參數。