{
Impl(void* id)
{
+ refcount = 1;
handle = *(cl_platform_id*)id;
getDevices(devices, handle);
}
void PlatformInfo2::getDevice(Device& device, int d) const
{
- CV_Assert(d < (int)p->devices.size() );
+ CV_Assert(p && d < (int)p->devices.size() );
if(p)
device.set(p->devices[d]);
}
int type = _src.type();
if ( !( (CV_8UC1 == type || CV_8UC4 == type || CV_32FC1 == type || CV_32FC4 == type) &&
- (ddepth == CV_32F || ddepth == CV_8U) ) )
+ (ddepth == CV_32F || ddepth == CV_8U || ddepth < 0) ) )
return false;
int cn = CV_MAT_CN(type);
return result;
- } catch(cv::Exception e) {
+ } catch(const cv::Exception& e) {
LOGD("Core::n_1minMaxLoc() catched cv::Exception: %s", e.what());
jclass je = env->FindClass("org/opencv/core/CvException");
if(!je) je = env->FindClass("java/lang/Exception");
return result;
- } catch(cv::Exception e) {
+ } catch(const cv::Exception& e) {
LOGD("Core::n_1getTextSize() catched cv::Exception: %s", e.what());
jclass je = env->FindClass("org/opencv/core/CvException");
if(!je) je = env->FindClass("java/lang/Exception");
LOGD("%s", method_name);
Mat* me = (Mat*) self; //TODO: check for NULL
return me->dims;
- } catch(cv::Exception e) {
+ } catch(const cv::Exception& e) {
throwJavaException(env, &e, method_name);
} catch (...) {
throwJavaException(env, 0, method_name);
}
AndroidBitmap_unlockPixels(env, bitmap);
return;
- } catch(cv::Exception e) {
+ } catch(const cv::Exception& e) {
AndroidBitmap_unlockPixels(env, bitmap);
LOGE("nBitmapToMat catched cv::Exception: %s", e.what());
jclass je = env->FindClass("org/opencv/core/CvException");
}
AndroidBitmap_unlockPixels(env, bitmap);
return;
- } catch(cv::Exception e) {
+ } catch(const cv::Exception& e) {
AndroidBitmap_unlockPixels(env, bitmap);
LOGE("nMatToBitmap catched cv::Exception: %s", e.what());
jclass je = env->FindClass("org/opencv/core/CvException");