how to insert a CvPoint into a CvSeq with cvInsert?

ε祈祈猫儿з 提交于 2019-12-13 03:19:41

问题


I'm using a CvSeq of Cvpoint and it is created by cvApproxPoly. I need to delete some points and insert some new ones. I can delete the points with any problem, but when I try to insert I get an error: "cannot convert parameter 3 from "CvPoint" to "const void *"

the code I wrote is

Cvpoint p;
p.x=1;
p.y=1;
cvInsert (mySeq, i, p);

how do I typecast p?


回答1:


try cvSeqPush

call it as

Cvpoint p;
p.x=1;
p.y=1;
cvSeqPush(mySeq, &p);


来源:https://stackoverflow.com/questions/8312102/how-to-insert-a-cvpoint-into-a-cvseq-with-cvinsert

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!