How to flush hls::Mat?How do you set, clear, and toggle a single bit?How do I iterate over the words of a string?How to convert a std::string to const char* or char*?How can I profile C++ code running on Linux?reading jpeg file based on Mirror Effect,Brightness and zoom LevelC++11 introduced a standardized memory model. What does it mean? And how is it going to affect C++ programming?What is an undefined reference/unresolved external symbol error and how do I fix it?python: how to identify if a variable is an array or a scalarsobel filter algorithm thresholding (no external libs used)Vivado HLS GPIO switch data for Zybo Board

Why did my rum cake turn black?

How to convert 1k to 1000 and 1m to 1000000 in Excel

Fix /dev/sdb after using dd with no device inserted

Was adding milk to tea started to reduce employee tea break time?

Dropping outliers based on "2.5 times the RMSE"

limit of the integral in the anti-transform

TikZ Can I draw an arrow by specifying the initial point, direction, and length?

What would be the ideal melee weapon made of "Phase Metal"?

How to repair a laptop's screen hinges?

Was the Ford Model T black because of the speed black paint dries?

Spectrum vs eigenvalues

Can I intentionally omit previous work experience or pretend it doesn't exist when applying for jobs?

A DVR algebra with weird automorphisms

Replacements for swear words

Why would an Inquisitive rogue choose to use Insightful Fighting as opposed to using their Cunning Action to Hide?

Would letting a multiclass character rebuild their character to be single-classed be game-breaking?

Cubic programming and beyond?

Email about missed connecting flight compensation 5 months after flight, is there a point?

Why did the Japanese attack the Aleutians at the same time as Midway?

How to check the quality of an audio sample?

Won 50K! Now what should I do with it

Cops: The Hidden OEIS Substring

Why does Hellboy file down his horns?

When is pointing out a person's hypocrisy not considered to be a logical fallacy?



How to flush hls::Mat?


How do you set, clear, and toggle a single bit?How do I iterate over the words of a string?How to convert a std::string to const char* or char*?How can I profile C++ code running on Linux?reading jpeg file based on Mirror Effect,Brightness and zoom LevelC++11 introduced a standardized memory model. What does it mean? And how is it going to affect C++ programming?What is an undefined reference/unresolved external symbol error and how do I fix it?python: how to identify if a variable is an array or a scalarsobel filter algorithm thresholding (no external libs used)Vivado HLS GPIO switch data for Zybo Board






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I need to stack the top half of two images(hls::Mat) together. I ended up having the following errors.




WARNING: Hls::stream 'hls::stream.8' contains leftover data, which may result in RTL simulation hanging.




if I flush the leftover by



while (1)
img_in0 >> p0;
if (!p0.val[0])
break;



I got the following error




WARNING: Hls::stream 'hls::stream.7' is read while empty, which may result in RTL simulation hanging.




I wonder what is the best way to flush the leftover?



#define NO_PREFILTER

#include "stereo_top.h"

void combine2(
GRAY_IMAGE& img_in0,
GRAY_IMAGE& img_in1,
GRAY_IMAGE& img_out,
int rows,
int cols)

hls::Scalar<1, unsigned char> p0, p1, p;


L_row: for(int row = 0; row < rows; row++)
#pragma HLS LOOP_TRIPCOUNT min=1 max=1080

L_col: for(int col = 0; col < cols; col++)
#pragma HLS LOOP_TRIPCOUNT min=1 max=1920
#pragma HLS pipeline rewind
if(row<(rows/2))
img_in0 >> p0;
p = p0;

else

img_in1 >> p1;
p = p1;

img_out << p;




while (1)
img_in0 >> p0;
if (!p0.val[0])
break;




void stereo_filter_lr(AXI_STREAM& imgLeft_axi, AXI_STREAM& imgRight_axi, AXI_STREAM& stereoOut, int rows, int cols)

#pragma HLS INTERFACE axis port=imgRight_axi
#pragma HLS INTERFACE axis port=imgLeft_axi
#pragma HLS INTERFACE ap_none port=cols
#pragma HLS INTERFACE ap_none port=rows

RGB_IMAGE imgL_0(rows, cols);
RGB_IMAGE imgR_0(rows, cols);
GRAY_IMAGE img_L(rows, cols);
GRAY_IMAGE img_R(rows, cols);
GRAY_IMAGE disp(rows, cols);
RGB_IMAGE stereo(rows, cols);

#pragma HLS dataflow

//Recieve data stream and convert to Mat format
hls::AXIvideo2Mat(imgLeft_axi, imgL_0);
hls::AXIvideo2Mat(imgRight_axi, imgR_0);

//Convert RGB Image to Gray Image
hls::CvtColor<HLS_BGR2GRAY>(imgL_0, img_L);
hls::CvtColor<HLS_BGR2GRAY>(imgR_0, img_R);

combine2(img_L, img_R, disp, rows, cols);

hls::CvtColor<HLS_GRAY2BGR>(disp, stereo);
hls::Mat2AXIvideo(stereo, stereoOut);
return;










share|improve this question






























    0















    I need to stack the top half of two images(hls::Mat) together. I ended up having the following errors.




    WARNING: Hls::stream 'hls::stream.8' contains leftover data, which may result in RTL simulation hanging.




    if I flush the leftover by



    while (1)
    img_in0 >> p0;
    if (!p0.val[0])
    break;



    I got the following error




    WARNING: Hls::stream 'hls::stream.7' is read while empty, which may result in RTL simulation hanging.




    I wonder what is the best way to flush the leftover?



    #define NO_PREFILTER

    #include "stereo_top.h"

    void combine2(
    GRAY_IMAGE& img_in0,
    GRAY_IMAGE& img_in1,
    GRAY_IMAGE& img_out,
    int rows,
    int cols)

    hls::Scalar<1, unsigned char> p0, p1, p;


    L_row: for(int row = 0; row < rows; row++)
    #pragma HLS LOOP_TRIPCOUNT min=1 max=1080

    L_col: for(int col = 0; col < cols; col++)
    #pragma HLS LOOP_TRIPCOUNT min=1 max=1920
    #pragma HLS pipeline rewind
    if(row<(rows/2))
    img_in0 >> p0;
    p = p0;

    else

    img_in1 >> p1;
    p = p1;

    img_out << p;




    while (1)
    img_in0 >> p0;
    if (!p0.val[0])
    break;




    void stereo_filter_lr(AXI_STREAM& imgLeft_axi, AXI_STREAM& imgRight_axi, AXI_STREAM& stereoOut, int rows, int cols)

    #pragma HLS INTERFACE axis port=imgRight_axi
    #pragma HLS INTERFACE axis port=imgLeft_axi
    #pragma HLS INTERFACE ap_none port=cols
    #pragma HLS INTERFACE ap_none port=rows

    RGB_IMAGE imgL_0(rows, cols);
    RGB_IMAGE imgR_0(rows, cols);
    GRAY_IMAGE img_L(rows, cols);
    GRAY_IMAGE img_R(rows, cols);
    GRAY_IMAGE disp(rows, cols);
    RGB_IMAGE stereo(rows, cols);

    #pragma HLS dataflow

    //Recieve data stream and convert to Mat format
    hls::AXIvideo2Mat(imgLeft_axi, imgL_0);
    hls::AXIvideo2Mat(imgRight_axi, imgR_0);

    //Convert RGB Image to Gray Image
    hls::CvtColor<HLS_BGR2GRAY>(imgL_0, img_L);
    hls::CvtColor<HLS_BGR2GRAY>(imgR_0, img_R);

    combine2(img_L, img_R, disp, rows, cols);

    hls::CvtColor<HLS_GRAY2BGR>(disp, stereo);
    hls::Mat2AXIvideo(stereo, stereoOut);
    return;










    share|improve this question


























      0












      0








      0








      I need to stack the top half of two images(hls::Mat) together. I ended up having the following errors.




      WARNING: Hls::stream 'hls::stream.8' contains leftover data, which may result in RTL simulation hanging.




      if I flush the leftover by



      while (1)
      img_in0 >> p0;
      if (!p0.val[0])
      break;



      I got the following error




      WARNING: Hls::stream 'hls::stream.7' is read while empty, which may result in RTL simulation hanging.




      I wonder what is the best way to flush the leftover?



      #define NO_PREFILTER

      #include "stereo_top.h"

      void combine2(
      GRAY_IMAGE& img_in0,
      GRAY_IMAGE& img_in1,
      GRAY_IMAGE& img_out,
      int rows,
      int cols)

      hls::Scalar<1, unsigned char> p0, p1, p;


      L_row: for(int row = 0; row < rows; row++)
      #pragma HLS LOOP_TRIPCOUNT min=1 max=1080

      L_col: for(int col = 0; col < cols; col++)
      #pragma HLS LOOP_TRIPCOUNT min=1 max=1920
      #pragma HLS pipeline rewind
      if(row<(rows/2))
      img_in0 >> p0;
      p = p0;

      else

      img_in1 >> p1;
      p = p1;

      img_out << p;




      while (1)
      img_in0 >> p0;
      if (!p0.val[0])
      break;




      void stereo_filter_lr(AXI_STREAM& imgLeft_axi, AXI_STREAM& imgRight_axi, AXI_STREAM& stereoOut, int rows, int cols)

      #pragma HLS INTERFACE axis port=imgRight_axi
      #pragma HLS INTERFACE axis port=imgLeft_axi
      #pragma HLS INTERFACE ap_none port=cols
      #pragma HLS INTERFACE ap_none port=rows

      RGB_IMAGE imgL_0(rows, cols);
      RGB_IMAGE imgR_0(rows, cols);
      GRAY_IMAGE img_L(rows, cols);
      GRAY_IMAGE img_R(rows, cols);
      GRAY_IMAGE disp(rows, cols);
      RGB_IMAGE stereo(rows, cols);

      #pragma HLS dataflow

      //Recieve data stream and convert to Mat format
      hls::AXIvideo2Mat(imgLeft_axi, imgL_0);
      hls::AXIvideo2Mat(imgRight_axi, imgR_0);

      //Convert RGB Image to Gray Image
      hls::CvtColor<HLS_BGR2GRAY>(imgL_0, img_L);
      hls::CvtColor<HLS_BGR2GRAY>(imgR_0, img_R);

      combine2(img_L, img_R, disp, rows, cols);

      hls::CvtColor<HLS_GRAY2BGR>(disp, stereo);
      hls::Mat2AXIvideo(stereo, stereoOut);
      return;










      share|improve this question
















      I need to stack the top half of two images(hls::Mat) together. I ended up having the following errors.




      WARNING: Hls::stream 'hls::stream.8' contains leftover data, which may result in RTL simulation hanging.




      if I flush the leftover by



      while (1)
      img_in0 >> p0;
      if (!p0.val[0])
      break;



      I got the following error




      WARNING: Hls::stream 'hls::stream.7' is read while empty, which may result in RTL simulation hanging.




      I wonder what is the best way to flush the leftover?



      #define NO_PREFILTER

      #include "stereo_top.h"

      void combine2(
      GRAY_IMAGE& img_in0,
      GRAY_IMAGE& img_in1,
      GRAY_IMAGE& img_out,
      int rows,
      int cols)

      hls::Scalar<1, unsigned char> p0, p1, p;


      L_row: for(int row = 0; row < rows; row++)
      #pragma HLS LOOP_TRIPCOUNT min=1 max=1080

      L_col: for(int col = 0; col < cols; col++)
      #pragma HLS LOOP_TRIPCOUNT min=1 max=1920
      #pragma HLS pipeline rewind
      if(row<(rows/2))
      img_in0 >> p0;
      p = p0;

      else

      img_in1 >> p1;
      p = p1;

      img_out << p;




      while (1)
      img_in0 >> p0;
      if (!p0.val[0])
      break;




      void stereo_filter_lr(AXI_STREAM& imgLeft_axi, AXI_STREAM& imgRight_axi, AXI_STREAM& stereoOut, int rows, int cols)

      #pragma HLS INTERFACE axis port=imgRight_axi
      #pragma HLS INTERFACE axis port=imgLeft_axi
      #pragma HLS INTERFACE ap_none port=cols
      #pragma HLS INTERFACE ap_none port=rows

      RGB_IMAGE imgL_0(rows, cols);
      RGB_IMAGE imgR_0(rows, cols);
      GRAY_IMAGE img_L(rows, cols);
      GRAY_IMAGE img_R(rows, cols);
      GRAY_IMAGE disp(rows, cols);
      RGB_IMAGE stereo(rows, cols);

      #pragma HLS dataflow

      //Recieve data stream and convert to Mat format
      hls::AXIvideo2Mat(imgLeft_axi, imgL_0);
      hls::AXIvideo2Mat(imgRight_axi, imgR_0);

      //Convert RGB Image to Gray Image
      hls::CvtColor<HLS_BGR2GRAY>(imgL_0, img_L);
      hls::CvtColor<HLS_BGR2GRAY>(imgR_0, img_R);

      combine2(img_L, img_R, disp, rows, cols);

      hls::CvtColor<HLS_GRAY2BGR>(disp, stereo);
      hls::Mat2AXIvideo(stereo, stereoOut);
      return;







      c++ http-live-streaming scalar vivado






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 26 at 5:33









      phuclv

      17.3k9 gold badges59 silver badges249 bronze badges




      17.3k9 gold badges59 silver badges249 bronze badges










      asked Mar 26 at 5:27









      eli chaneli chan

      112 bronze badges




      112 bronze badges






















          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55350380%2fhow-to-flush-hlsmat%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55350380%2fhow-to-flush-hlsmat%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Obelisk of Theodosius Contents History Description Notes Bibliography Further reading External links Navigation menuAge of spirituality : late antique and early Christian art, third to seventh centuryOver 60 picturesObelisks of the World41°00′21.24″N 28°58′31.43″E / 41.0059000°N 28.9753972°E / 41.0059000; 28.97539727724550-7235741376235741376

          밀양 대씨 역사 각주 함께 보기 둘러보기 메뉴밀양 대씨

          1973년 목차 사건 문화 탄생 사망 노벨상 달력 둘러보기 메뉴