mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 13:47:32 +08:00
finished distance transform; fixed warnings
This commit is contained in:
parent
05ea571b08
commit
7f8c925319
@ -653,20 +653,8 @@ void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labe
|
||||
|
||||
if( labelType == CV_DIST_LABEL_CCOMP )
|
||||
{
|
||||
/*CvSeq *contours = 0;
|
||||
cv::Ptr<CvMemStorage> st = cvCreateMemStorage();
|
||||
cv::Ptr<CvMat> src_copy = cvCreateMat( size.height+border*2, size.width+border*2, src->type );
|
||||
cvCopyMakeBorder(src, src_copy, cvPoint(border, border), IPL_BORDER_CONSTANT, cvScalarAll(255));
|
||||
cvCmpS( src_copy, 0, src_copy, CV_CMP_EQ );
|
||||
cvFindContours( src_copy, st, &contours, sizeof(CvContour),
|
||||
CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE, cvPoint(-border, -border));
|
||||
|
||||
for( int label = 1; contours != 0; contours = contours->h_next, label++ )
|
||||
{
|
||||
CvScalar area_color = cvScalarAll(label);
|
||||
cvDrawContours( labels, contours, area_color, area_color, -255, -1, 8 );
|
||||
}*/
|
||||
// TODO
|
||||
Mat zpix = src == 0;
|
||||
connectedComponents(zpix, labels, 8, CV_32S);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -381,7 +381,6 @@ cv::Moments cv::moments( InputArray _src, bool binary )
|
||||
const int TILE_SIZE = 32;
|
||||
Mat mat = _src.getMat();
|
||||
MomentsInTileFunc func = 0;
|
||||
double buf[TILE_SIZE*TILE_SIZE];
|
||||
uchar nzbuf[TILE_SIZE*TILE_SIZE];
|
||||
Moments m;
|
||||
int type = mat.type();
|
||||
|
Loading…
Reference in New Issue
Block a user