how to use cvSaveImage ?
Is cvSaveImage obsolete ?
br mike
how to use cvSaveImage ?
Is cvSaveImage obsolete ?
br mike
yes, with the whole C-api (dead since 2.4)
please use cv::imwrite(), and c++.
Hi, I downloaded ASI120MM cam driver from
https://astronomy-imaging-camera.com/software-drivers
there is a sample cpp provided - which uses cvSaveImage, but I think this is a c function which isn’t provided anymore ? I can’t find it in opencv2 4.3 - how to save the capture ?
code of ASI driver example:
if(status == ASI_EXP_SUCCESS)
{
ASIGetDataAfterExp(CamNum, imgBuf, imgSize);
// sprintf(szTemp, “saveImage%d.jpg”, bMain);
if(Image_type==ASI_IMG_RAW16)
{
unsigned short *pCv16bit = (unsigned short *)(pRgb->imageData);
unsigned short *pImg16bit = (unsigned short *)imgBuf;
for(int y = 0; y < displayHei; y++)
{
memcpy(pCv16bit, pImg16bit, displayWid*2);
pCv16bit+=displayWid;
pImg16bit+=width;
}
}
else{
unsigned char *pCv8bit = (unsigned char *)pRgb->imageData;
unsigned char *pImg8bit = (unsigned char *)imgBuf;
for(int y = 0; y < displayHei; y++)
{
memcpy(pCv8bit, pImg8bit, displayWid);
pCv8bit+=displayWid;
pImg8bit+=width;
}
/* if(bSave)
cvSaveImage("saveImage.jpg", pRgb);
bSave = false;*/
}
}