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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -