Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #28318

Re: need code java of RLSA - Run Length Smoothing Algorithm

Date 2014-04-29 21:10 -0400
From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: need code java of RLSA - Run Length Smoothing Algorithm
References <DfidnXetRf5odsLOnZ2dnUVZ_q-dnZ2d@giganews.com>
Message-ID <53604da0$0$298$14726298@news.sunsite.dk> (permalink)
Organization SunSITE.dk - Supporting Open source

Show all headers | View raw


On 4/29/2014 2:14 PM, ysr88 wrote:
> this is a version of RLSA - Run Length Smoothing Algorithm in c++
>
> int hor_thres = 22;
> int one_count = 0;
> int zero_flag = 0;
> Mat tmpImg = Mat(Img.size(), CV_8UC1, Scalar(0, 0, 0));
> for (int j = 0; j<Img.rows; j++){
>      for (int i = 0; i<Img.cols; j++){
>          if (Img.at<uchar>(j, i) == 0)
>          {
>              if (zero_flag == 1)
>              {
>                  if (one_count <= hor_thres)
>                  {
>                      tmpText(cv::Range(j - zero_count, j), cv::Range(i, i+1)).setTo(cv::Scalar::all(255));
>                      // I want to do the same thing in Matlab as this  image(i,j-one_count:j-1)=0;
>                  }
>                  else
>                  {
>                      zero_flag = 1;
>                  }
>                  one_count = 0;
>              }
>              zero_flag = 1;
>          }
>          else
>          {
>              if (zero_flag == 1)
>              {
>                  one_count = one_count + 1;
>              }
>          }
>      }
> }

If you need the Java code, then you better start writing some Java code.

It is neither likely that someone would want to write your code for free
or be able to write your code (it looks like it uses some library that
is not part of standard C++).

Arne

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

need code java of RLSA - Run Length Smoothing Algorithm ysr88 <yusragharbi@hotmail.fr> - 2014-04-29 13:14 -0500
  Re: need code java of RLSA - Run Length Smoothing Algorithm Arne Vajhøj <arne@vajhoej.dk> - 2014-04-29 21:10 -0400

csiph-web