Changeset 475
- Timestamp:
- 03/26/09 06:07:08 (3 years ago)
- Location:
- trunk/software/rb/vision
- Files:
-
- 3 modified
-
classify.cpp (modified) (2 diffs)
-
classify.h (modified) (2 diffs)
-
vision.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/software/rb/vision/classify.cpp
r474 r475 72 72 73 73 /* Blur */ 74 cvSmooth(input_img, input_img, CV_BLUR, 11, 11, 0, 0);74 cvSmooth(input_img, input_img, CV_BLUR, 3, 3, 0, 0); 75 75 76 76 /* Convert to HSV */ … … 108 108 fprintf(stderr, "Training DTree\n"); 109 109 110 float priors[] = { 111 10, // GRASS // 112 5, // OBSTICLE // .2 == no lines, no obst (black) 113 1 // line // .2 == no effect 114 }; 110 float priors[] = {20, 5, 2, 1}; // grass, obsticle, line, ignore 115 111 116 112 CvMat* var_type = cvCreateMat(input->cols+1, 1, CV_8U); -
trunk/software/rb/vision/classify.h
r474 r475 12 12 RB_OBSTICLE, 13 13 RB_LINE, 14 RB_IGNORE , 14 15 RB_NUM_CLASSES 15 16 } rb_classes_t; … … 18 19 {{0*255, 0*255, 1*255, 0}}, // Red 19 20 {{1*255, 1*255, 1*255, 0}}, // White 21 {{0*255, 0*255, 0*255, 0}} // Black 20 22 }; 21 //typedef enum rb_classes_t {22 // RB_SKY ,23 // RB_GRASS ,24 // RB_LINE ,25 // RB_OBSTICLE,26 // RB_PATH ,27 // RB_IGNORE ,28 // RB_NUM_CLASSES29 //} rb_classes_t;30 //const static CvScalar class_colors[] = {31 // {{0*255, 0*255, 1*255, 0}}, // Blue32 // {{0*255, 1*255, 0*255, 0}}, // Green33 // {{1*255, 1*255, 1*255, 0}}, // White34 // {{1*255, 0*255, 0*255, 0}}, // Red35 // {{1*255, 0*255, 1*255, 0}}, // Purple36 // {{0*255, 0*255, 0*255, 0}} // Black37 //};38 23 39 24 /** -
trunk/software/rb/vision/vision.c
r474 r475 78 78 /* Smooth image */ 79 79 print_time("Smoothing"); 80 cvSmooth(img, img, CV_BLUR, 11, 11, 0, 0);80 cvSmooth(img, img, CV_BLUR, 3, 3, 0, 0); 81 81 82 82 /* Convert image to HSV */ … … 118 118 CvSeq *get_points(CvMat *classes) 119 119 { 120 //int test_data[][3] = {121 // {RB_SKY,100,100}, {RB_GRASS,200,100}, {RB_OBSTICLE,300,100},122 // {RB_SKY,100,200}, {RB_GRASS,200,200}, {RB_OBSTICLE,300,200},123 // {RB_SKY,100,300}, {RB_GRASS,200,300}, {RB_OBSTICLE,300,300},124 //};125 126 120 CvMemStorage *storage = cvCreateMemStorage(0); 127 121 CvSeq *seq = cvCreateSeq(CV_32SC3, // sequence of 3 tuples? (scalars?)

