콘텐츠로 바로 가기
STAGING SERVER
DEVELOPMENT SERVER

Hue and Saturation#

Hue and Saturation camera feature를 사용하면 한 번의 단계로 이미지의 모든 색상 외관을 조정할 수 있습니다.

이미지의 개별 색상 외관을 조정하려면 Color Adjustment 기능(사용 가능한 경우)을 사용하십시오.

기능 사용#

색조(Hue) 조정하기#

색조를 조정하면 이미지의 색상이 이동합니다. 이는 예를 들어 색상 편차를 보정하거나 의사 색상(false-color) 이미지를 생성하는 데 유용할 수 있습니다.

색조를 조정하려면:

  1. 카메라가 Basler dart 또는 pulse 카메라이면 Pixel Format을 다음과 같이 설정하십시오. YCbCr422-8 또는 RGB8.
  2. 다음 항목의 값을 입력합니다: BslHue 파라미터(dart 및 pulse 카메라: BslHueValue). 파라미터 값 범위는 -180°~180°입니다.

파라미터 값은 RGB 컬러 큐브의 회전을 나타냅니다. 기본적으로 파라미터는 0°(색상 이동 없음)로 설정되어 있습니다.

채도 조절#

채도를 조절하면 색상의 선명도(강도)가 변경됩니다. 예를 들어 채도가 높을수록 색상을 더 쉽게 구별할 수 있습니다.

채도(Saturation)를 조정하려면:

  1. 카메라가 Basler dart 또는 pulse 카메라이면 Pixel Format을 다음과 같이 설정하십시오. YCbCr422-8 또는 RGB8.
  2. 다음 항목의 값을 입력합니다: BslSaturation 파라미터(dart 및 pulse 카메라: BslSaturationValue). 기본적으로 파라미터는 1(일반 채도)로 설정되어 있습니다.

매개변수 값이 낮을수록 회색에 가까운 톤 다운된 색상이 되고, 매개변수 값이 높을수록 더욱 선명하고 생동감 있는 색상이 됩니다.

추가 파라미터#

사용 가능한 경우, BslHueRaw 및 BslSaturationRaw 파라미터를 통해 색조 및 채도 파라미터에 부동 소수점 값 대신 정수 값을 입력할 수 있습니다. 일반적으로 이러한 파라미터는 설정할 필요가 없습니다.

샘플 코드#

dart 및 pulse 카메라#
// Set the Hue parameter to 5 degrees
camera.BslHueValue.SetValue(5);
// Set the Saturation parameter to 1.4
camera.BslSaturationValue.SetValue(1.4);
INodeMap& nodemap = camera.GetNodeMap();
// Set the Hue parameter to 5 degrees
CIntegerParameter(nodemap, "BslHueValue").SetValue(5);
// Set the Saturation parameter to 1.4
CFloatParameter(nodemap, "BslSaturationValue").SetValue(1.4);
// Set the Hue parameter to 5 degrees
camera.Parameters[PLCamera.BslHueValue].SetValue(5);
// Set the Saturation parameter to 1.4
camera.Parameters[PLCamera.BslSaturationValue].SetValue(1.4);
/* 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 Hue parameter to 5 degrees */
errRes = PylonDeviceSetIntegerFeature(hdev, "BslHueValue", 5);
CHECK(errRes);
/* Set the Saturation parameter to 1.4 */
errRes = PylonDeviceSetFloatFeature(hdev, "BslSaturationValue", 1.4);
CHECK(errRes);
# Set the Hue parameter to 5 degrees
camera.BslHueValue.Value = 5
# Set the Saturation parameter to 1.4
camera.BslSaturationValue.Value = 1.4
기타 카메라#
// Set the Hue parameter to 5 degrees
camera.BslHue.SetValue(5);
// Set the Saturation parameter to 1.4
camera.BslSaturation.SetValue(1.4);
INodeMap& nodemap = camera.GetNodeMap();
// Set the Hue parameter to 5 degrees
CIntegerParameter(nodemap, "BslHue").SetValue(5);
// Set the Saturation parameter to 1.4
CFloatParameter(nodemap, "BslSaturation").SetValue(1.4);
// Set the Hue parameter to 5 degrees
camera.Parameters[PLCamera.BslHue].SetValue(5);
// Set the Saturation parameter to 1.4
camera.Parameters[PLCamera.BslSaturation].SetValue(1.4);
/* 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 Hue parameter to 5 degrees */
errRes = PylonDeviceSetIntegerFeature(hdev, "BslHue", 5);
CHECK(errRes);
/* Set the Saturation parameter to 1.4 */
errRes = PylonDeviceSetFloatFeature(hdev, "BslSaturation", 1.4);
CHECK(errRes);
# Set the Hue parameter to 5 degrees
camera.BslHue.Value = 5
# Set the Saturation parameter to 1.4
camera.BslSaturation.Value = 1.4

pylon Viewer를 사용하여 파라미터를 손쉽게 설정할 수도 있습니다.