Drop cv:: prefix from cv::String used inside the cv namespace
This commit is contained in:
@@ -287,11 +287,11 @@ type_dict = {
|
||||
"suffix" : "II"},
|
||||
"String" : { "j_type" : "String", "jn_type" : "String",
|
||||
"jni_type" : "jstring", "jni_name" : "n_%(n)s",
|
||||
"jni_var" : 'const char* utf_%(n)s = env->GetStringUTFChars(%(n)s, 0); cv::String n_%(n)s( utf_%(n)s ? utf_%(n)s : "" ); env->ReleaseStringUTFChars(%(n)s, utf_%(n)s)',
|
||||
"jni_var" : 'const char* utf_%(n)s = env->GetStringUTFChars(%(n)s, 0); String n_%(n)s( utf_%(n)s ? utf_%(n)s : "" ); env->ReleaseStringUTFChars(%(n)s, utf_%(n)s)',
|
||||
"suffix" : "Ljava_lang_String_2"},
|
||||
"c_string": { "j_type" : "String", "jn_type" : "String",
|
||||
"jni_type" : "jstring", "jni_name" : "n_%(n)s.c_str()",
|
||||
"jni_var" : 'const char* utf_%(n)s = env->GetStringUTFChars(%(n)s, 0); cv::String n_%(n)s( utf_%(n)s ? utf_%(n)s : "" ); env->ReleaseStringUTFChars(%(n)s, utf_%(n)s)',
|
||||
"jni_var" : 'const char* utf_%(n)s = env->GetStringUTFChars(%(n)s, 0); String n_%(n)s( utf_%(n)s ? utf_%(n)s : "" ); env->ReleaseStringUTFChars(%(n)s, utf_%(n)s)',
|
||||
"suffix" : "Ljava_lang_String_2"},
|
||||
"TermCriteria": { "j_type" : "TermCriteria", "jn_args" : (("int", ".type"), ("int", ".maxCount"), ("double", ".epsilon")),
|
||||
"jni_var" : "TermCriteria %(n)s(%(n)s_type, %(n)s_maxCount, %(n)s_epsilon)", "jni_type" : "jdoubleArray",
|
||||
@@ -417,7 +417,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual
|
||||
{
|
||||
'j_code' :
|
||||
"""
|
||||
// C++: Size getTextSize(const cv::String& text, int fontFace, double fontScale, int thickness, int* baseLine);
|
||||
// C++: Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, int* baseLine);
|
||||
//javadoc:getTextSize(text, fontFace, fontScale, thickness, baseLine)
|
||||
public static Size getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine) {
|
||||
if(baseLine != null && baseLine.length != 1)
|
||||
@@ -430,7 +430,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual
|
||||
""" private static native double[] n_getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine);\n""",
|
||||
'cpp_code' :
|
||||
"""
|
||||
// C++: Size getTextSize(const cv::String& text, int fontFace, double fontScale, int thickness, int* baseLine);
|
||||
// C++: Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, int* baseLine);
|
||||
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize (JNIEnv*, jclass, jstring, jint, jdouble, jint, jintArray);
|
||||
|
||||
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize
|
||||
@@ -445,7 +445,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize
|
||||
}
|
||||
|
||||
const char* utf_text = env->GetStringUTFChars(text, 0);
|
||||
cv::String n_text( utf_text ? utf_text : "" );
|
||||
String n_text( utf_text ? utf_text : "" );
|
||||
env->ReleaseStringUTFChars(text, utf_text);
|
||||
|
||||
int _baseLine;
|
||||
|
@@ -84,7 +84,7 @@ public:
|
||||
//not supported: SimpleBlob, Dense
|
||||
CV_WRAP static javaFeatureDetector* create( int detectorType )
|
||||
{
|
||||
cv::String name;
|
||||
String name;
|
||||
if (detectorType > DYNAMICDETECTOR)
|
||||
{
|
||||
name = "Dynamic";
|
||||
@@ -146,14 +146,14 @@ public:
|
||||
return (javaFeatureDetector*)((FeatureDetector*) detector);
|
||||
}
|
||||
|
||||
CV_WRAP void write( const cv::String& fileName ) const
|
||||
CV_WRAP void write( const String& fileName ) const
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::WRITE);
|
||||
((FeatureDetector*)this)->write(fs);
|
||||
fs.release();
|
||||
}
|
||||
|
||||
CV_WRAP void read( const cv::String& fileName )
|
||||
CV_WRAP void read( const String& fileName )
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::READ);
|
||||
((FeatureDetector*)this)->read(fs.root());
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
//supported: FlannBased, BruteForce, BruteForce-L1, BruteForce-Hamming, BruteForce-HammingLUT
|
||||
CV_WRAP static javaDescriptorMatcher* create( int matcherType )
|
||||
{
|
||||
cv::String name;
|
||||
String name;
|
||||
|
||||
switch(matcherType)
|
||||
{
|
||||
@@ -240,14 +240,14 @@ public:
|
||||
return (javaDescriptorMatcher*)((DescriptorMatcher*) matcher);
|
||||
}
|
||||
|
||||
CV_WRAP void write( const cv::String& fileName ) const
|
||||
CV_WRAP void write( const String& fileName ) const
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::WRITE);
|
||||
((DescriptorMatcher*)this)->write(fs);
|
||||
fs.release();
|
||||
}
|
||||
|
||||
CV_WRAP void read( const cv::String& fileName )
|
||||
CV_WRAP void read( const String& fileName )
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::READ);
|
||||
((DescriptorMatcher*)this)->read(fs.root());
|
||||
@@ -294,7 +294,7 @@ public:
|
||||
//not supported: Calonder
|
||||
CV_WRAP static javaDescriptorExtractor* create( int extractorType )
|
||||
{
|
||||
cv::String name;
|
||||
String name;
|
||||
|
||||
if (extractorType > OPPONENTEXTRACTOR)
|
||||
{
|
||||
@@ -332,14 +332,14 @@ public:
|
||||
return (javaDescriptorExtractor*)((DescriptorExtractor*) extractor);
|
||||
}
|
||||
|
||||
CV_WRAP void write( const cv::String& fileName ) const
|
||||
CV_WRAP void write( const String& fileName ) const
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::WRITE);
|
||||
((DescriptorExtractor*)this)->write(fs);
|
||||
fs.release();
|
||||
}
|
||||
|
||||
CV_WRAP void read( const cv::String& fileName )
|
||||
CV_WRAP void read( const String& fileName )
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::READ);
|
||||
((DescriptorExtractor*)this)->read(fs.root());
|
||||
@@ -401,7 +401,7 @@ public:
|
||||
//unsupported: Vector
|
||||
CV_WRAP static javaGenericDescriptorMatcher* create( int matcherType )
|
||||
{
|
||||
cv::String name;
|
||||
String name;
|
||||
|
||||
switch(matcherType)
|
||||
{
|
||||
@@ -421,14 +421,14 @@ public:
|
||||
return (javaGenericDescriptorMatcher*)((GenericDescriptorMatcher*) matcher);
|
||||
}
|
||||
|
||||
CV_WRAP void write( const cv::String& fileName ) const
|
||||
CV_WRAP void write( const String& fileName ) const
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::WRITE);
|
||||
((GenericDescriptorMatcher*)this)->write(fs);
|
||||
fs.release();
|
||||
}
|
||||
|
||||
CV_WRAP void read( const cv::String& fileName )
|
||||
CV_WRAP void read( const String& fileName )
|
||||
{
|
||||
FileStorage fs(fileName, FileStorage::READ);
|
||||
((GenericDescriptorMatcher*)this)->read(fs.root());
|
||||
|
Reference in New Issue
Block a user