cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
241 Views
Registered: ‎08-28-2019

Failure to populate axi stream interface

Hello

I am trying to populate the populate the axi stream interface with the code below but, the image imgsrc give zero rows and zero columns. So, could anyone point me to what I am doing  wrong?

  
#include "stdio.h"
#include "hls_video.h"
#include "hls_opencv.h"
#include "filter.h"

#include <iostream>

int main(){

	cv::Mat  imgsrc;
    imgsrc=cv::imread(INPUT_IMAGE);
	stream_t stream_in;
	stream_t stream_out;
	interface_t valin;
	interface_t valout;


	for(int i = 0; i < imgsrc.rows; i ++){
		for(int j = 0; j < imgsrc.cols; j ++){
			valin.data = imgsrc.at<unsigned char>(i,j);
			valin.dest = 0;
			valin.keep = 1;
			valin.id   = 0;
			valin.strb = 1;
			valin.user = 1;
		    stream_in.write(valin);
		}
	}
 return  0;
}
0 Kudos