UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor chicki
Visitor
565 Views
Registered: ‎06-21-2018

Video processing: Histogram Enhancement

Dear all,

I process video frame by frame and want applied histogram data (after calculated) of the previous frame for the current frame. And here my data flow:

#pragma HLS dataflow
	const int width = MAX_WIDTH;
	const int height = MAX_HEIGHT;
	GRAY_IMAGE_IN  imgIn (height, width);
	GRAY_IMAGE_IN  img_1 (height, width);
	GRAY_IMAGE_IN  img_2 (height, width);
	GRAY_IMAGE_OUT imgOut(height, width);
	t_uint32 histCum[LEVELS_14BITS];
	t_uint32 histCum_pre[LEVELS_14BITS];

	hls::AXIvideo2Mat(inputStream, imgIn); // stream to Mat data

	splitFrame(imgIn, width, height, img_1, img_2);

	histgramEQ(img_1, width, height, histCum_pre, imgOut); //using histCum of pre frame

	calcHistogram(img_2, width, height, threshold, plateauThreshold, histCum ); //calculate for current frame

	updateHist (histCum, histCum_pre); //update for next

	hls::Mat2AXIvideo(imgOut, outputStream);

But it not work because 

error: histCum_pre read before write

Anyone have an answer or a better solution, please give me some advice.

 

Thank you.

 

0 Kudos
1 Reply
Scholar u4223374
Scholar
529 Views
Registered: ‎04-26-2015

Re: Video processing: Histogram Enhancement

Can you provide the code for all those functions? It's a bit hard to tell what's going on with just the top-level function.

0 Kudos