Jump to content
  • 0

how to use hls::EqualizeHist ?


kuangjiqingma

Question

Hello everyone,

RGB_IMAGE img_0(rows, cols);
GRAY_IMAGE img_1(rows, cols);
GRAY_IMAGE img_2(rows, cols);
#pragma HLS dataflow
hls::AXIvideo2Mat(INPUT_STREAM, img_0);
hls::CvtColor<HLS_BGR2GRAY>(img_0,img_1);
hls::EqualizeHist(img_1,img_2);
hls::Mat2AXIvideo(img_2, OUTPUT_STREAM);

 

I write the code like this,why i can't get the output image on the zedboard but a black image

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

@kuangjiqingma,

I think you'll find very quickly that very few folks on this forum are familiar with HLS.  May I invite you to start answering the HLS questions that others have here on this forum?

I am personally working on an HDMI implementation myself.  I've discovered that there are many, many, steps to producing an HDMI signal.  These steps go well beyond just dumping pixels to an interface, but also include checking for whether the hot-plug detect signal is high, reading the EDID signaling, and then the TMDS signal itself.  The TMDS signal encodes video and horizontal frame syncs, audio side channels, as well as pixel data.  These syncs themselves take a bit of work, and there's a lot of details (all simple, but still a lot of them) required to getting the right number of V and H sync clocks, the right pixel clock, and so forth.

Knowing all of this ... I have to admit, it's a bit of a struggle to imagine that the code you've posted above is producing an HDMI signal.  You might be right, maybe it does, but if so there's got to be a *lot* of stuff going on under the hood.

Dan

Link to comment
Share on other sites

I've used SDSoC, but have no straight-up HLS experience. I assume the goal here is to produce an ip core that has an axi input stream and an axi output stream, and treats the input stream as a video feed, converting it to black and white and then equalizing the luminance. Does that sound right?

What are you using for your input video stream in your block diagram? How is the output stream connected?

Link to comment
Share on other sites

11 hours ago, D@n said:

@kuangjiqingma,

I think you'll find very quickly that very few folks on this forum are familiar with HLS.  May I invite you to start answering the HLS questions that others have here on this forum?

I am personally working on an HDMI implementation myself.  I've discovered that there are many, many, steps to producing an HDMI signal.  These steps go well beyond just dumping pixels to an interface, but also include checking for whether the hot-plug detect signal is high, reading the EDID signaling, and then the TMDS signal itself.  The TMDS signal encodes video and horizontal frame syncs, audio side channels, as well as pixel data.  These syncs themselves take a bit of work, and there's a lot of details (all simple, but still a lot of them) required to getting the right number of V and H sync clocks, the right pixel clock, and so forth.

Knowing all of this ... I have to admit, it's a bit of a struggle to imagine that the code you've posted above is producing an HDMI signal.  You might be right, maybe it does, but if so there's got to be a *lot* of stuff going on under the hood.

Dan

Thank you for your invitation ! I am willing to answer the questions about hls . Your work is good.I have to admit.It's hard to me.

Link to comment
Share on other sites

13 hours ago, jpeyron said:

Hi @kuangjiqingma,

I do not have much experience with HLS but i did find a forum thread here at the Xilinx forums that describes the need for more than one image because : The result is that an image is equalized with respect to the histogram of the previous image. That's why the first image is blank. 

cheers,

Jon

 

HI@jpeyron,

I have tried it on the zedboard with video ,but it still is a black image

Link to comment
Share on other sites

Have you tried verifying the video output pipeline and your code for reading the video from SD? Maybe just try displaying the SD card image directly on the video output (BTW, HDMI or VGA?). This will help narrow the problem. 

I'm curious to know what method you are using to read the video from SD, but if you are confident that is not the issue you don't need to go into detail.

Are you using an embedded Linux platform or just running standalone?

Link to comment
Share on other sites

@sbobrowicz

RGB_IMAGE img_0(rows, cols);
GRAY_IMAGE img_1(rows, cols);
GRAY_IMAGE img_2(rows, cols);
#pragma HLS dataflow
hls::AXIvideo2Mat(INPUT_STREAM, img_0);
hls::CvtColor<HLS_BGR2GRAY>(img_0,img_1);
hls::Mat2AXIvideo(img_1, OUTPUT_STREAM);

When i remove hls::EqualizeHist(img_1,img_2),its output is ok on the zedboard.I'm using an embedded Linux platform.I use opencv api to read the video .Then arm transmits data to fpga by vdma.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...