Ejemplo n.º 1
0
void MainWindow::usmRadiusChanged(int value)
{
    mCurrUSMRadius = value;
    af::array slices = usm(mCurrentImage, mCurrUSMRadius, mCurrUSMSharpness);
    af::array interleaved = af::reorder(slices, 2, 1, 0)/255.0f;
    interleaved.host((void*)mImageDataRawPtr);
    mRenderCanvas->updateTexData(mImageDataRawPtr, mImageWidth, mImageHeight);
    mRenderCanvas->updateGL();
}
Ejemplo n.º 2
0
void MainWindow::usmChanged(int value)
{
    mCurrUSMSharpness = convertRange(value, USMSHARP_ALGO_MAX, USMSHARP_ALGO_MIN,
                               UI_USMSHARP_SLIDER_MAX, UI_USMSHARP_SLIDER_MIN);
    af::array slices = usm(mCurrentImage, mCurrUSMRadius, mCurrUSMSharpness);
    af::array interleaved = af::reorder(slices, 2, 1, 0)/255.0f;
    interleaved.host((void*)mImageDataRawPtr);
    mRenderCanvas->updateTexData(mImageDataRawPtr, mImageWidth, mImageHeight);
    mRenderCanvas->updateGL();
}
Ejemplo n.º 3
0
/*
in       input image
type     integer defining how convolution for smoothing operation is done
         0 <==> spatial domain; 1 <==> frequency domain
size     size of used smoothing kernel
thresh   minimal intensity difference to perform operation
scale    scaling of edge enhancement
return   enhanced image
*/
Mat Dip3::run(Mat& in, int smoothType, int size, double thresh, double scale){

   return usm(in, smoothType, size, thresh, scale);

}
Ejemplo n.º 4
0
Archivo: Dip3.cpp Proyecto: kziel1/dip
/*
in       input image
type     integer defining how convolution for smoothing operation is done
         0 <==> spatial domain; 1 <==> frequency domain
size     size of used smoothing kernel
thresh   minimal intensity difference to perform operation
scale    scaling of edge enhancement
return   enhanced image
*/
Mat Dip3::run(Mat& in, int smoothType, int size, double thresh, double scale){

   Mat copy = in.clone();
   return usm(copy, smoothType, size, thresh, scale);

}