Hello.
I tried Reference Desgin "ZedBoard + FMC-HDMI-CAM + PYTHON-1300-C SDSoC platform, Vivado 2015.4", and worked out the demo.
Next, I modify "sds_sobel.cpp" to understand the relationship of video_in and video_out.
Compilation passed, but Error occured when the program run.
"ERROR: application performed illegal memory access and is being terminated"
Why is the error occured?
I show modification part below.
void sds_sobel(unsigned short *img_in, unsigned short *img_out, int rows, int cols, int stride)
{
int row;
int col;
// constructing OpenCV interface
IplImage* src_dma = cvCreateImageHeader(cvSize(cols, rows), IPL_DEPTH_8U, 3); //BGR
IplImage* dst_dma = cvCreateImageHeader(cvSize(cols, rows), IPL_DEPTH_8U, 3); //BGR
src_dma->imageData = (char *) img_in;
dst_dma->imageData = (char *) img_out;
src_dma->widthStep = 2 * stride;
dst_dma->widthStep = 2 * stride;
cv::Mat src_img;
src_img = src_dma;
if (src_img.empty()) {
return;
}
* dst_dma = src_img;
img_out = (unsigned short *) dst_dma->imageData;
cvReleaseImage(&src_dma);
cvReleaseImage(&dst_dma);
}
Thank you
Hisashi