usagi / virtual-keyboard-prototype-1

仮想キーボード試作1型
3 stars 0 forks source link

恐らくvirtual-keyboardのコストラクターで死んでる #38

Closed usagi closed 10 years ago

usagi commented 10 years ago
I0118 09:33:26.621911 12877 etupirka.cxx:19] main_loop_wait[ns]: 33333333
I0118 09:33:26.621925 12877 main.cxx:10] to run
I0118 09:33:26.621933 12877 etupirka.cxx:33] mode is main, to run_main
I0118 09:33:26.621940 12877 etupirka.cxx:169] initialize
I0118 09:33:26.621948 12877 etupirka.cxx:173] to initialize camera_capture
I0118 09:33:26.621958 12877 camera-capture.cxx:15] top-cam-id: 0
I0118 09:33:26.621965 12877 camera-capture.cxx:16] front-cam-id: 1
I0118 09:33:26.621975 12877 camera-capture.cxx:17] width: 640
I0118 09:33:26.621984 12877 camera-capture.cxx:18] height: 480
I0118 09:33:26.621992 12877 camera-capture.cxx:19] video-file-top: /home/usagi/repos/finger-position/top.1.avi
I0118 09:33:26.621999 12877 camera-capture.cxx:20] video-file-front: /home/usagi/repos/finger-position/front.1.avi
I0118 09:33:26.623396 12877 camera-capture.cxx:43] top-cam opened
I0118 09:33:26.624101 12877 camera-capture.cxx:52] front-cam opened
I0118 09:33:26.624119 12877 etupirka.cxx:175] to initialize finger_detector_top
I0118 09:33:26.624131 12877 finger-detector.cxx:9] ctor
I0118 09:33:26.624140 12877 finger-detector.cxx:15] is_top: 1
I0118 09:33:26.624147 12877 finger-detector.cxx:38] set_pre_bilateral d, sc, ss: 16, 72, 16
I0118 09:33:26.624161 12877 finger-detector.cxx:44] set_pre_morphology n: 5
I0118 09:33:26.624168 12877 finger-detector.cxx:55] set_hsv h-min, h-max, s-min, s-max, v-min, v-max: 315.87, 356.36, 0.2992, 0.7049, 120, 255, 
I0118 09:33:26.624187 12877 finger-detector.cxx:61] set_nail_morphology n: 5
I0118 09:33:26.624197 12877 finger-detector.cxx:70] set_nail_median_blur ksize: 13
I0118 09:33:26.624204 12877 finger-detector.cxx:81] set_circles dp, min_dist, param_1, param_2, min_radius, max_radius: 1, 8, 100, 8, 4, 12
I0118 09:33:26.624217 12877 etupirka.cxx:177] to initialize finger_detector_front
I0118 09:33:26.624224 12877 finger-detector.cxx:9] ctor
I0118 09:33:26.624235 12877 finger-detector.cxx:15] is_top: 0
I0118 09:33:26.624243 12877 finger-detector.cxx:38] set_pre_bilateral d, sc, ss: 16, 72, 16
I0118 09:33:26.624254 12877 finger-detector.cxx:44] set_pre_morphology n: 5
I0118 09:33:26.624263 12877 finger-detector.cxx:55] set_hsv h-min, h-max, s-min, s-max, v-min, v-max: 315.87, 356.36, 0.2992, 0.7049, 120, 255, 
I0118 09:33:26.624275 12877 finger-detector.cxx:61] set_nail_morphology n: 5
I0118 09:33:26.624282 12877 finger-detector.cxx:70] set_nail_median_blur ksize: 13
I0118 09:33:26.624294 12877 finger-detector.cxx:81] set_circles dp, min_dist, param_1, param_2, min_radius, max_radius: 1, 8, 100, 8, 4, 12
I0118 09:33:26.624305 12877 etupirka.cxx:179] to initialize space_converter
I0118 09:33:26.624320 12877 space-converter.cxx:15] top_camera_positon[mm]: 0.000000,207.000000,264.000000
I0118 09:33:26.624332 12877 space-converter.cxx:16] front_camera_position[mm]: 0.000000,37.000000,350.000000
I0118 09:33:26.624341 12877 space-converter.cxx:17] top_camera_angle_x[deg]: 31.1
I0118 09:33:26.624349 12877 space-converter.cxx:18] camera_fov_diagonal[deg]: 64
I0118 09:33:26.624361 12877 space-converter.cxx:19] camera_sensor_size[mm]: 3.600000,2.700000
I0118 09:33:26.624372 12877 space-converter.cxx:20] image_size[mm]: 640.000000,480.000000
I0118 09:33:26.624380 12877 space-converter.cxx:31] top_camera_angle_x_rad[rad]: 0.542797
I0118 09:33:26.624389 12877 space-converter.cxx:35] camera_sensor_diagonal[mm]: 4.5
I0118 09:33:26.624398 12877 space-converter.cxx:39] camera_fov_diagonal_rad[rad]:1.11701
I0118 09:33:26.624407 12877 space-converter.cxx:43] camera_fov_diagonal_div_2_rad[rad]: 0.558505
I0118 09:33:26.624426 12877 space-converter.cxx:47] camera_focal_length[mm]: 3.60075
I0118 09:33:26.624443 12877 space-converter.cxx:55] camera_fov_div_2_rad[rad]: 0.463564,0.358702
I0118 09:33:26.624452 12877 space-converter.cxx:63] camera_fov_rad[rad]: 0.927128,0.717404
I0118 09:33:26.624464 12877 space-converter.cxx:70] camera_fov[deg]: 53.120514,41.104218
I0118 09:33:26.624471 12877 etupirka.cxx:181] to initialize virtual_keyboard
terminate called after throwing an instance of 'std::runtime_error'
  what():  FAIL; RESULT_CODE is 1
zsh: abort      ./etupirka
usagi commented 10 years ago
    virtual_keyboard_t::virtual_keyboard_t(const configuration_t& conf)
      : database_object(conf.virtual_keyboard.database)
      , database_(conf.virtual_keyboard.database)
      , table_(conf.virtual_keyboard.table)
      , statement(database_object.prepare
        ( "select id"
          " from " + conf.virtual_keyboard.table +
          " where"
          " x <= ? and x + w >= ?"
          " y <= ? and y + h >= ?"
          " s <= ?"
        )
      )
    {

↓修正: statementのSQL文に and が2箇所抜けてた。

    virtual_keyboard_t::virtual_keyboard_t(const configuration_t& conf)
      : database_object(conf.virtual_keyboard.database)
      , database_(conf.virtual_keyboard.database)
      , table_(conf.virtual_keyboard.table)
      , statement(database_object.prepare
        ( "select id"
          " from " + conf.virtual_keyboard.table +
          " where"
          " x <= ? and x + w >= ? and"
          " y <= ? and y + h >= ? and"
          " s <= ?"
        )
      )
    {