Exemplo n.º 1
0
/*!*****************************************************************************
 *******************************************************************************
\note  init_vision_processing
\date  June 1999
   
\remarks 

          initialization for vision processing

 *******************************************************************************
 Function Parameters: [in]=input,[out]=output

     none

 ******************************************************************************/
int
init_vision_processing(void)

{
  
  int i,j;
  static int firsttime = TRUE;

  stereo_mode = VISION_3D_MODE;
  
  if (firsttime) {
    firsttime = FALSE;
    blobpp = (BlobPP *) my_calloc(max_blobs+1,sizeof(BlobPP),MY_STOP);
  }

#if 1
  /* initialize matrices */
  if (!init_matrices())
      return FALSE;
#endif

  /* initialize filtering */
  if (!init_filters())
    return FALSE;
  
  /* initialize post processing */
  if (!init_pp((char *)vision_default_pp))
    return FALSE;
  
  return TRUE;
  
}
Exemplo n.º 2
0
int main()
{
    init_pp();
    init_qq();
    print_pp();
    print_qq();

    return 0;

}
Exemplo n.º 3
0
/*!*****************************************************************************
 *******************************************************************************
\note  init_vision_states
\date  August 7, 1995
   
\remarks 

initializes all states of the filters to safe initial values

 *******************************************************************************
 Function Parameters: [in]=input,[out]=output

none

 ******************************************************************************/
void
init_vision_states(void)

{
  int i,j;
  extern int count_all_frames;
  extern int count_lost_frames;

  count_all_frames = 0;
  count_lost_frames = 0;
  
  /* initialize the vision variables */
  bzero((char *) blobpp,(max_blobs+1)*sizeof(BlobPP));
  bzero((char *) blobs, (max_blobs+1)*sizeof(SL_VisionBlob));
  bzero((char *) raw_blobs, (max_blobs+1)*sizeof(Blob3D));
  bzero((char *) raw_blobs2D, (2+1)*(max_blobs+1)*sizeof(Blob2D));
  init_pp((char *)vision_default_pp);

}
Exemplo n.º 4
0
int main() {
  uint32_t w;

  init_tokens();

  printf("\nNo truncate, height = %"PRIu32", width = %"PRIu32"\n",
	 display.height, display.width);
  init_pp(&pp, &converter, stdout, &display, PP_HMODE, 0);
  test1(&pp);
  test2(&pp);
  test3(&pp);
  test4(&pp);
  delete_pp(&pp);

  display.truncate = true;
  for (w = 20; w<50; w++) {
    display.width = w;
    printf("\n\nTruncate, height = %"PRIu32", width = %"PRIu32"\n",
	 display.height, display.width);
    init_pp(&pp, &converter, stdout, &display, PP_HMODE, 0);
    test1(&pp);
    test2(&pp);
    test3(&pp);
    test4(&pp);
    delete_pp(&pp);
  }


  // tests with height = 4
  // initial mode = PP_VMODE
  display.height = 4;

  display.width = 20;
  display.truncate = false;
  printf("\nNo truncate, height = %"PRIu32", width = %"PRIu32"\n",
	 display.height, display.width);
  init_pp(&pp, &converter, stdout, &display, PP_VMODE, 0);
  test1(&pp);
  test2(&pp);
  test3(&pp);
  test4(&pp);
  delete_pp(&pp);

  display.truncate = true;
  for (w = 4; w<50; w++) {
    display.width = w;
    printf("\n\nTruncate, height = %"PRIu32", width = %"PRIu32"\n",
	 display.height, display.width);
    init_pp(&pp, &converter, stdout, &display, PP_VMODE, 0);
    test1(&pp);
    test2(&pp);
    test3(&pp);
    test4(&pp);
    delete_pp(&pp);
  }


  display.truncate = false;
  for (w = 4; w<50; w++) {
    display.width = w;
    printf("\n\nNo truncate, height = %"PRIu32", width = %"PRIu32"\n",
	 display.height, display.width);
    init_pp(&pp, &converter, stdout, &display, PP_VMODE, 0);
    test1(&pp);
    test2(&pp);
    test3(&pp);
    test4(&pp);
    delete_pp(&pp);
  }

  return 0;
}