Elaboradar 0.1
Caricamento in corso...
Ricerca in corso...
Nessun risultato

◆ class_designation()

void classifier::class_designation ( unsigned win_rg = 1,
unsigned win_az = 1 )

Designate class echo Find the maximum of aggregation values.

Definizione alla linea 446 del file classifier.cpp.

447{
448 if(win_rg||win_az)
449 {
450 std::vector< std::vector< std::vector<HCA_Park> > > vol_Ai_filtered;
451 vol_Ai_filtered=vol_Ai;
452 unsigned half_rg=0.5*(win_rg-1);
453 unsigned half_az=0.5*(win_az-1);
454 int pre_rg,post_rg,pre_az,post_az;
455 unsigned count=0;
456 //cout<<half_az<<"\t"<<half_rg<<endl;
457 for(unsigned el=0;el<vol_Ai.size();el++)
458 {
459 vol_hca.push_back(PolarScan<EchoClass>(vol_z.scan(el).beam_count,vol_z.scan(el).beam_size, NC));
460 vol_hca[el].elevation=vol_z[el].elevation;
461 vol_hca[el].gain=1;
462 vol_hca[el].offset=0;
463 vol_hca[el].undetect=NC;
464 vol_hca[el].nodata=255;
465 for(unsigned az=0;az<vol_Ai[el].size();az++)
466 for(unsigned rg=0;rg<vol_Ai[el][az].size();rg++)
467 {
468 //cout<<el<<"\t"<<az<<"\t"<<rg<<endl;
469 vol_Ai_filtered[el][az][rg].clearAi();
470 vol_Ai_filtered[el][az][rg].Ai+=vol_Ai[el][az][rg].Ai;
471 count++;
472 //cout<<"faccio gli az"<<endl;
473 for(unsigned j=1;j<half_az+1;j++)
474 {
475 pre_az=az-j;
476 post_az=az+j;
477 //cout<<pre_az<<"\t"<<post_az<<endl;
478 if(pre_az<0)pre_az+=vol_Ai[el].size();
479 if(post_az>=vol_Ai[el].size())post_az-=vol_Ai[el].size();
480 //cout<<pre_az<<"\t"<<post_az<<endl;
481 vol_Ai_filtered[el][az][rg].Ai+=vol_Ai[el][pre_az][rg].Ai;
482 vol_Ai_filtered[el][az][rg].Ai+=vol_Ai[el][post_az][rg].Ai;
483 count+=2;
484 }
485 //cout<<"faccio gli rg"<<flush;
486 for(unsigned i=1;i<half_rg+1;i++)
487 {
488 pre_rg=rg-i;
489 post_rg=rg+i;
490 if(pre_rg>=0)
491 {
492 vol_Ai_filtered[el][az][rg].Ai+=vol_Ai[el][az][pre_rg].Ai;
493 count++;
494 }
495 if(post_rg<vol_Ai[el][az].size())
496 {
497 vol_Ai_filtered[el][az][rg].Ai+=vol_Ai[el][az][post_rg].Ai;
498 count++;
499 }
500 //cout<<"faccio gli az "<<i<<flush;
501 for(unsigned j=1;j<half_az+1;j++)
502 {
503 pre_az=az-j;
504 post_az=az+j;
505 pre_az=az-j;
506 post_az=az+j;
507 if(pre_az<0)pre_az+=vol_Ai[el].size();
508 if(post_az>=vol_Ai[el].size())post_az-=vol_Ai[el].size();
509 if(pre_rg>=0)
510 {
511 vol_Ai_filtered[el][az][rg].Ai+=vol_Ai[el][pre_az][pre_rg].Ai;
512 vol_Ai_filtered[el][az][rg].Ai+=vol_Ai[el][pre_az][pre_rg].Ai;
513 count+=2;
514 }
515 if(post_rg<vol_Ai[el][az].size())
516 {
517 vol_Ai_filtered[el][az][rg].Ai+=vol_Ai[el][post_az][post_rg].Ai;
518 vol_Ai_filtered[el][az][rg].Ai+=vol_Ai[el][post_az][post_rg].Ai;
519 count+=2;
520 }
521 }
522 }
523 //cout<<" fatto"<<endl;
524 vol_Ai_filtered[el][az][rg].Ai.array()/=(double)count;
525 //cout<<"normalizzato"<<endl;
526 vol_hca[el](az,rg)=vol_Ai_filtered[el][az][rg].echo(0.00001);
527 //cout<<"azzero"<<endl;
528 count=0;
529 }
530 }
531 }
532 else
533 {
534 for(unsigned el=0;el<vol_z.size();el++)
535 {
536 vol_hca.push_back(PolarScan<EchoClass>(vol_z.scan(el).beam_count,vol_z.scan(el).beam_size, NC));
537 vol_hca[el].elevation=vol_z[el].elevation;
538 for(unsigned az=0;az<vol_z.scan(el).beam_count;az++)
539 for(unsigned rg=0;rg<vol_z.scan(el).beam_size;rg++)
540 vol_hca[el](az,rg)=vol_Ai[el][az][rg].echo(0.00001);
541 }
542 }
543}
std::vector< std::vector< std::vector< HCA_Park > > > vol_Ai
Definition classifier.h:360
Volume< EchoClass > vol_hca
Definition classifier.h:356

Referenzia vol_Ai, vol_hca, e vol_z.

Referenziato da HCA_Park_2009().