OpenCV Matrix To Binary Image -
i have client , server, have image in client , want send server. image in cv::mat format. therefore need convert matrix binary. have tried memcpy(binimage,matimg.data,sizeof(matimg.data)
binimage's format char*
how can convert matimg binimg? don't have experience opencv.
the following should trick:
memcpy(binimage, matimg.data, matimg.step.p[0]*matimg.rows)
however, think can avoid copy , work directly matimg.data
.
Comments
Post a Comment