rotation(_rvec);
}
else
- CV_Assert(!"Input matrix can only be 3x3, 1x3 or 3x1");
+ CV_Error(Error::StsError, "Input matrix can only be 3x3, 1x3 or 3x1");
}
template<typename T> inline
pack.func = to_binary<double>;
break;
case 'r':
- default: { CV_Assert(!"type not support"); break; }
+ default:
+ CV_Error(cv::Error::StsError, "type is not supported");
};
offset = static_cast<size_t>(cvAlign(static_cast<int>(offset), static_cast<int>(size)));
pack.func = binary_to<double>;
break;
case 'r':
- default: { CV_Assert(!"type not support"); break; }
+ default:
+ CV_Error(cv::Error::StsError, "type is not supported");
}; // need a better way for outputting error.
offset = static_cast<size_t>(cvAlign(static_cast<int>(offset), static_cast<int>(size)));
case 'f': { pack.cv_type = CV_32F; break; }
case 'd': { pack.cv_type = CV_64F; break; }
case 'r':
- default: { CV_Assert(!"type is not support"); break; }
+ default:
+ CV_Error(cv::Error::StsError, "type is not supported");
} // need a better way for outputting error.
binary_to_funcs.push_back(pack);
caps = gst_caps_fixate(caps);
#endif
#else
- CV_Assert(!"Gstreamer 0.10.29 or newer is required for grayscale input");
+ CV_Error(Error::StsError,
+ "Gstreamer 0.10.29 or newer is required for grayscale input");
#endif
}
switch (type) {
case LOAD_AUTO:
{
- CV_Assert(!"cv::viz::Mesh::LOAD_AUTO: Not implemented yet");
- break;
+ CV_Error(Error::StsError, "cv::viz::Mesh::LOAD_AUTO: Not implemented yet");
}
case LOAD_PLY:
{
break;
}
default:
- CV_Assert(!"cv::viz::Mesh::load: Unknown file type");
- break;
+ CV_Error(Error::StsError, "cv::viz::Mesh::load: Unknown file type");
}
vtkSmartPointer<vtkPolyData> polydata = reader->GetOutput();
vtkOBJWriter::SafeDownCast(writer)->SetFileName(file.c_str());
}
else
- CV_Assert(!"Unsupported format");
+ CV_Error(Error::StsError, "Unsupported format");
writer->SetInputConnection(source->GetOutputPort());
writer->Write();
vtkSTLReader::SafeDownCast(reader)->SetFileName(file.c_str());
}
else
- CV_Assert(!"Unsupported format");
+ CV_Error(Error::StsError, "Unsupported format");
cv::Mat cloud;
return;
}
- CV_Assert(!"Unsupported array kind");
+ CV_Error(Error::StsError, "Unsupported array kind");
}
///////////////////////////////////////////////////////////////////////////////////////////////
else if (n.depth() == CV_64F && c.depth() == CV_64F)
filterNanNormalsCopy<double, double>(n, c, total);
else
- CV_Assert(!"Unsupported normals/cloud type");
+ CV_Error(Error::StsError, "Unsupported normals/cloud type");
return total;
}
else if (tc.depth() == CV_64F && cl.depth() == CV_64F)
filterNanTCoordsCopy<double, double>(tc, cl, total);
else
- CV_Assert(!"Unsupported tcoords/cloud type");
+ CV_Error(Error::StsError, "Unsupported tcoords/cloud type");
return total;
}