简体   繁体   English

DELPHI和Opencv中的不兼容类型

[英]Incompatible types in DELPHI and Opencv

I am trying to find contour into a picture. 我试图在图片中找到轮廓。 I implement as follows but i get 我实现如下,但我得到

Incompatible types: 'ocv.core.types_c.pCvMemStorage' and 'UWaterShedSegment.pCvMemStorage' error. 不兼容的类型:“ ocv.core.types_c.pCvMemStorage”和“ UWaterShedSegment.pCvMemStorage”错误。

 type
      pCvMemStorage = ^TCvMemStorage;
      pCvSeq = ^TCvSeq;
    .
    .
    .
    var
      contours :  pCvMemStorage;
      first_contour :   pCvSeq;
    .
    .
    .
    cvFindContours(DistImgEq, contours, first_contour, SizeOf(TCvContour) ,CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE,cvPoint(0,0));

You've redeclared the type pCvMemStorage in your own unit and this is hiding the declared type in the ocv.core.types_c unit that is required by the method signature of cvFindContours . 你已经重新声明的类型pCvMemStorage在自己的单位,这是隐藏在声明的类型ocv.core.types_c由方法签名所需的单位cvFindContours

Remove the type declaration from your unit and, if it is not already there, add the ocv.core.types_c unit to your uses clause. 从机上取下类型声明,如果它已不存在,则添加ocv.core.types_c单元您uses的条款。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM