コード例 #1
0
ファイル: ofxUeye.cpp プロジェクト: paulobarcelos/ofxUeye
//////////////////////////////////////////////////////////////////////////////////
// enableBadPixelsCorrection -----------------------------------------------------
//////////////////////////////////////////////////////////////////////////////////
int ofxUeye::enableBadPixelsCorrection()
{
	_badPixelCorrection = true;
    INT nRet;
	nRet = is_HotPixel(m_hCam, IS_HOTPIXEL_ENABLE_SENSOR_CORRECTION, NULL, NULL);
	if (nRet == IS_SUCCESS) return nRet;
	else nRet = is_HotPixel(m_hCam, IS_HOTPIXEL_ENABLE_CAMERA_CORRECTION, NULL, NULL);
	if (nRet == IS_SUCCESS) return nRet;
	else nRet = is_HotPixel(m_hCam, IS_HOTPIXEL_ENABLE_SOFTWARE_USER_CORRECTION, NULL, NULL);
	return nRet;
}
コード例 #2
0
// -------------------  UpdateFeaturesCtrls  -----------------------
//
void properties::UpdateFeaturesCtrls ()
{
    if (m_bInit || !m_hCamera)
        return;

    // get values
    INT nGamma = 0;
    is_Gamma(m_hCamera, IS_GAMMA_CMD_GET, &nGamma, sizeof(nGamma));
    m_bSoftwareGammaSet = nGamma == 180;
    m_bHardwareGammaSet = (is_SetHardwareGamma (m_hCamera, IS_GET_HW_GAMMA) == IS_SET_HW_GAMMA_ON);

    // Read out current mode
    INT nMode = 0;
    is_HotPixel(m_hCamera, IS_HOTPIXEL_GET_CORRECTION_MODE, (void*)&nMode, sizeof(nMode));
    m_bHotPixelCorrSet = nMode;

    m_bGainBoostSet = (is_SetGainBoost (m_hCamera, IS_GET_GAINBOOST) == IS_SET_GAINBOOST_ON);

    // set checked
    checkBoxSoftwareGamma->setChecked (m_bSoftwareGammaSet);
    checkBoxHardwareGamma->setChecked (m_bHardwareGammaSet);
    checkBoxBadPixel->setChecked (m_bHotPixelCorrSet);
    checkBoxGainBoost->setChecked (m_bGainBoostSet);
    // enable
    checkBoxSoftwareGamma->setEnabled (m_bHasSoftwareGamma);
    checkBoxHardwareGamma->setEnabled (m_bHasHardwareGamma);
    checkBoxBadPixel->setEnabled (TRUE);
    checkBoxGainBoost->setEnabled (m_bHasGainBoost);
}
コード例 #3
0
// -------------------  OnButtonBadPixel  -----------------------
//
void properties::OnButtonBadPixel ()
{
    if (m_bInit || !m_hCamera)
        return;

    if (checkBoxBadPixel->isChecked())
    {
        // enable
        is_HotPixel(m_hCamera, IS_HOTPIXEL_ENABLE_CAMERA_CORRECTION, NULL, 0);

    }
    else
    {
        // disable
        is_HotPixel(m_hCamera, IS_HOTPIXEL_DISABLE_CORRECTION, NULL, 0);
    }
}
コード例 #4
0
ファイル: ofxUeye.cpp プロジェクト: paulobarcelos/ofxUeye
//////////////////////////////////////////////////////////////////////////////////
// disableBadPixelsCorrection ----------------------------------------------------
//////////////////////////////////////////////////////////////////////////////////
int ofxUeye::disableBadPixelsCorrection()
{
	_badPixelCorrection = false;
    INT nRet = is_HotPixel(m_hCam, IS_HOTPIXEL_DISABLE_CORRECTION, NULL, NULL);
	return nRet;
}