close
// m为3*5的矩阵,float型的单通道,把每个点都初始化为1
Mat m(3, 5, CV_32FC1, 1);
或者 Mat m(3, 5, CV_32FC1, Scalar(1));
cout<<m;
输出为:
[1, 1, 1, 1, 1;
  1, 1, 1, 1, 1;
  1, 1, 1, 1, 1]
 
 
CvMat* submat, submathdr;
 * submat = cvGetRows( mat, &submathdr, start_row, end_row, delta_row );
 * // Write on submat
 * @endcode
 *
 * @param src       Source array
 * @param dst       Target array. Either of array must be size of setting rows.
 * @param start_row Zero-based index of the starting row (inclusive) of the span. 
 * @param end_row   Zero-based index of the ending row (exclusive) of the span. 
 * @param [delta_row = 1]
 *                  Index step in the row span. That is, the function extracts every 
 *                  delta_row-th row from start_row and up to (but not including) end_row. 
 * @return CVAPI(void)
 * @see cvSetRow( src, dst, row ) // cvSetRows( src, dst, row, row + 1 )
 */
imshow 一定要加 waitKey(1) v.s cvShowImage 一定要加 cvWaitKey(1) !!!

每次出現exception都要確定:
1.是否讀到檔案
2.命令引數是否大於2
arrow
arrow
    全站熱搜

    大玩家闖天涯 發表在 痞客邦 留言(0) 人氣()