imagepro  2019 march
Biblioteca imagepro
Clases
Referencia del Archivo edgedetectorsobel.h
#include "opencv2/opencv.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "imagepro.h"
#include "edgedetectorsobel_widget.h"

Ir al código fuente de este archivo.

Clases

class  EdgeDetectorSobel
 

Descripción detallada

Versión
1.0
Fecha
2019 march
Autor
Carlos Alberto Ospina Caicedo (SGC-OVSPo)

Detector de bordes de Sobel

Clase para resaltar los bordes dentro de la imagen, usando el filtro de Sobel

Sobel.png
Sobel

Por defecto usa:

kernel_size = 3;

dX = 1;

dY = 1;

delta = 0;

scale = 1;

border_type = BORDER_DEFAULT;

....

Tomado de: https://docs.opencv.org/2.4/modules/imgproc/doc/filtering.html?highlight=scharr#scharr

src – input image.

dst – output image of the same size and the same number of channels as src .

ddepth –

output image depth; the following combinations of src.depth() and ddepth are supported:

src.depth() = CV_8U, ddepth = -1/CV_16S/CV_32F/CV_64F

src.depth() = CV_16U/CV_16S, ddepth = -1/CV_32F/CV_64F

src.depth() = CV_32F, ddepth = -1/CV_32F/CV_64F

src.depth() = CV_64F, ddepth = -1/CV_64F

when ddepth=-1, the destination image will have the same depth as the source; in the case of 8-bit input images it will result in truncated derivatives.

xorder – order of the derivative x.

yorder – order of the derivative y.

ksize – size of the extended Sobel kernel; it must be 1, 3, 5, or 7.

scale – optional scale factor for the computed derivative values; by default, no scaling is applied (see getDerivKernels() for details).

delta – optional delta value that is added to the results prior to storing them in dst.

borderType – pixel extrapolation method (see borderInterpolate() for details).

Ejemplo de uso:

int main()
{
Mat image = imread("pathimagen.jpg");
Mat *image_original = & image;
Mat *image_final = & image;
int kernel_size = 3;
int dX = 1;
int dY = 1;
double delta = 0;
double scale = 1;
int border_type = BORDER_DEFAULT;
s.setInputData(image_original,image_final,kernel,dx,dy,delta,scale,border_type);
imshow("imgo",&image_original);
imshow("imgf",&image_final);
}