mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -449,7 +449,16 @@ CV_EXPORTS InputOutputArray noArray();
|
||||
|
||||
/////////////////////////////////// MatAllocator //////////////////////////////////////
|
||||
|
||||
//! Usage flags for allocator
|
||||
/** @brief Usage flags for allocator
|
||||
|
||||
@warning All flags except `USAGE_DEFAULT` are experimental.
|
||||
|
||||
@warning For the OpenCL allocator, `USAGE_ALLOCATE_SHARED_MEMORY` depends on
|
||||
OpenCV's optional, experimental integration with OpenCL SVM. To enable this
|
||||
integration, build OpenCV using the `WITH_OPENCL_SVM=ON` CMake option and, at
|
||||
runtime, call `cv::ocl::Context::getDefault().setUseSVM(true);` or similar
|
||||
code. Note that SVM is incompatible with OpenCL 1.x.
|
||||
*/
|
||||
enum UMatUsageFlags
|
||||
{
|
||||
USAGE_DEFAULT = 0,
|
||||
@@ -2077,7 +2086,7 @@ public:
|
||||
|
||||
Mat_<Pixel> image = Mat::zeros(3, sizes, CV_8UC3);
|
||||
|
||||
image.forEach<Pixel>([&](Pixel& pixel, const int position[]) -> void {
|
||||
image.forEach<Pixel>([](Pixel& pixel, const int position[]) -> void {
|
||||
pixel.x = position[0];
|
||||
pixel.y = position[1];
|
||||
pixel.z = position[2];
|
||||
|
||||
@@ -240,7 +240,7 @@ double cv::kmeans( InputArray _data, int K,
|
||||
|
||||
attempts = std::max(attempts, 1);
|
||||
CV_Assert( data0.dims <= 2 && type == CV_32F && K > 0 );
|
||||
CV_CheckGE(N, K, "Number of clusters should be more than number of elements");
|
||||
CV_CheckGE(N, K, "There can't be more clusters than elements");
|
||||
|
||||
Mat data(N, dims, CV_32F, data0.ptr(), isrow ? dims * sizeof(float) : static_cast<size_t>(data0.step));
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ void setSize( Mat& m, int _dims, const int* _sz, const size_t* _steps, bool auto
|
||||
else if( autoSteps )
|
||||
{
|
||||
m.step.p[i] = total;
|
||||
int64 total1 = (int64)total*s;
|
||||
uint64 total1 = (uint64)total*s;
|
||||
if( (uint64)total1 != (size_t)total1 )
|
||||
CV_Error( CV_StsOutOfRange, "The total matrix size does not fit to \"size_t\" type" );
|
||||
total = (size_t)total1;
|
||||
|
||||
Reference in New Issue
Block a user