خرید بک لینک

Vote count: 0

We are trying to build an anpr module.The algorithm is we first convert it into gray colored and binarize the image.Then we find the horizontal projections and rank filter it to find peaks for the bands.Bands are the horizontal sections probably in which there may be plates.It works fine for most of images.But for some images it isn't proper. Rank filter and find bands code are like this.

 public Vector<Float> rankFilter(int size,int[] hrproj) {
    int halfSize = size/2;
    //Vector<Float> clone = (Vector<Float>)this.yValues.clone();
    //Vector<Float> clone = new Vector<Float>(this.yValues);
    Vector<Float> rankF = new Vector<Float>();
    for (int i=halfSize; i < hrproj.length - halfSize;  i++) 
    {
        float sum = 0;
        for (int ii = i - halfSize; ii<i+halfSize; ii++) {
            sum+=hrproj[ii];
        }
        rankF.add((float)sum / size);
    }

  retu rankF;  
}


 public void findPeaks(Vector<Float> proj,float con,int numberpeaks,boolean fgBand,int thresh){
 int count =0;//fgband = true = band otherwise plate.
 //while(count <= numberpeaks)
 float maxval = Collections.max(proj);
 do
 {
   count++;      
   //System.out.println("max val == "+maxval);
   int maxind = proj.indexOf(maxval);
   float limit = con * maxval;
   //System.out.println("max index == >"+maxind+ " limit "+limit);
   int topyb0 = findmargin(proj,maxind,limit,true);   
   int botyb1 = findmargin(proj,maxind,limit,false);  
   //System.out.println("yb0 == >"+topyb0+ " yb1 "+botyb1);
   if(fgBand)
    vbands.add(new Bands(topyb0,botyb1,maxval,maxind,proj.subList(topyb0 , botyb1)));}}

Example :for this image

the band obtained is

How to find the correct bands for such images which have shadows,reflections etc.

asked 33 secs ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 18 تير 1395 ساعت: 13:19

صفحه بندی