Skip to content
2 changes: 1 addition & 1 deletion modules/bgsegm/src/bgfg_gsoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const float LSBPtau = 0.05f;
inline int LSBPDist32(unsigned n) {
#if defined(__GNUC__) || defined(__clang__)
return __builtin_popcount(n);
#elif defined(_MSC_VER) && !(defined(_M_ARM) || defined(_M_ARM64))
#elif defined(_MSC_VER)
return __popcnt(n);
#else
// Taken from http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel
Expand Down
11 changes: 7 additions & 4 deletions modules/cudafeatures2d/src/fast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ namespace
{
public:
FAST_Impl(int threshold, bool nonmaxSuppression, int max_npoints);
~FAST_Impl();

virtual void detect(InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask);
virtual void detectAsync(InputArray _image, OutputArray _keypoints, InputArray _mask, Stream& stream);
Expand Down Expand Up @@ -95,6 +96,12 @@ namespace
FAST_Impl::FAST_Impl(int threshold, bool nonmaxSuppression, int max_npoints) :
threshold_(threshold), nonmaxSuppression_(nonmaxSuppression), max_npoints_(max_npoints)
{
cudaSafeCall( cudaMalloc(&d_counter, sizeof(unsigned int)) );
}

FAST_Impl::~FAST_Impl()
{
cudaSafeCall( cudaFree(d_counter) );
}

void FAST_Impl::detect(InputArray _image, std::vector<KeyPoint>& keypoints, InputArray _mask)
Expand All @@ -116,8 +123,6 @@ namespace
{
using namespace cv::cuda::device::fast;

cudaSafeCall( cudaMalloc(&d_counter, sizeof(unsigned int)) );

const GpuMat img = _image.getGpuMat();
const GpuMat mask = _mask.getGpuMat();

Expand Down Expand Up @@ -165,8 +170,6 @@ namespace
kpLoc.colRange(0, count).copyTo(locRow, stream);
keypoints.row(1).setTo(Scalar::all(0), stream);
}

cudaSafeCall( cudaFree(d_counter) );
}

void FAST_Impl::convert(InputArray _gpu_keypoints, std::vector<KeyPoint>& keypoints)
Expand Down
3 changes: 3 additions & 0 deletions modules/cudev/test/test_warp.cu
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ TEST(WarpAffine, Rotation)

TEST(WarpPerspective, Rotation)
{
if (cvtest::skipUnstableTests)
throw SkipTestException("Skip unstable test: https://github.com/opencv/opencv/issues/27813");

const Size size = randomSize(100, 400);

Mat src = randomMat(size, CV_32FC1, 0, 1);
Expand Down
4 changes: 2 additions & 2 deletions modules/dpm/samples/cascade_detect_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ int main( int argc, char** argv )

// use web camera
VideoCapture capture(0);
capture.set(CAP_PROP_FRAME_WIDTH, 320);
capture.set(CAP_PROP_FRAME_HEIGHT, 240);
capture.set(cv::CAP_PROP_FRAME_WIDTH, 320);
capture.set(cv::CAP_PROP_FRAME_HEIGHT, 240);

if ( !capture.isOpened() )
{
Expand Down
2 changes: 1 addition & 1 deletion modules/fastcv/src/allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cv::UMatData* QcAllocator::allocate(int dims, const int* sizes, int type,
{
if( step )
{
if( data0 && step[i] != CV_AUTOSTEP )
if( data0 && step[i] != cv::Mat::AUTO_STEP )
{
CV_Assert(total <= step[i]);
total = step[i];
Expand Down
6 changes: 3 additions & 3 deletions modules/xfeatures2d/src/agast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace cv
namespace xfeatures2d
{

#if (defined __i386__ || defined(_M_IX86) || defined __x86_64__ || defined(_M_X64))
#if (defined __i386__ || defined(_M_IX86) || defined __x86_64__ || defined(_M_X64) || defined(_M_ARM64) || defined(__aarch64__) || defined(__arm__))

static void AGAST_5_8(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold)
{
Expand Down Expand Up @@ -7446,7 +7446,7 @@ static void OAST_9_16(InputArray _img, std::vector<KeyPoint>& keypoints, int thr



#else // !(defined __i386__ || defined(_M_IX86) || defined __x86_64__ || defined(_M_X64))
#else // !(defined __i386__ || defined(_M_IX86) || defined __x86_64__ || defined(_M_X64) || defined(_M_ARM64) || defined(__aarch64__) || defined(__arm__))

static void AGAST_ALL(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, AgastFeatureDetector::DetectorType agasttype)
{
Expand Down Expand Up @@ -7934,7 +7934,7 @@ static void OAST_9_16(InputArray _img, std::vector<KeyPoint>& keypoints, int thr
AGAST_ALL(_img, keypoints, threshold, AgastFeatureDetector::OAST_9_16);
}

#endif // !(defined __i386__ || defined(_M_IX86) || defined __x86_64__ || defined(_M_X64))
#endif // !(defined __i386__ || defined(_M_IX86) || defined __x86_64__ || defined(_M_X64) || defined(_M_ARM64) || defined(__aarch64__) || defined(__arm__))

class AgastFeatureDetector_Impl CV_FINAL : public AgastFeatureDetector
{
Expand Down
6 changes: 3 additions & 3 deletions modules/xfeatures2d/src/agast_score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void makeAgastOffsets(int pixel[16], int rowStride, AgastFeatureDetector::Detect
pixel[k] = offsets[k][0] + offsets[k][1] * rowStride;
}

#if (defined __i386__ || defined(_M_IX86) || defined __x86_64__ || defined(_M_X64))
#if (defined __i386__ || defined(_M_IX86) || defined __x86_64__ || defined(_M_X64) || defined(_M_ARM64) || defined(__aarch64__) || defined(__arm__))
// 16 pixel mask
template<>
int agast_cornerScore<AgastFeatureDetector::OAST_9_16>(const uchar* ptr, const int pixel[], int threshold)
Expand Down Expand Up @@ -9375,7 +9375,7 @@ int agast_cornerScore<AgastFeatureDetector::AGAST_5_8>(const uchar* ptr, const i
b_test = (bmin + bmax) / 2;
}
}
#else // !(defined __i386__ || defined(_M_IX86) || defined __x86_64__ || defined(_M_X64))
#else // !(defined __i386__ || defined(_M_IX86) || defined __x86_64__ || defined(_M_X64) || defined(_M_ARM64) || defined(__aarch64__) || defined(__arm__))


int agast_tree_search(const uint32_t table_struct32[], int pixel_[], const unsigned char* const ptr, int threshold)
Expand Down Expand Up @@ -9860,7 +9860,7 @@ int agast_cornerScore<AgastFeatureDetector::OAST_9_16>(const uchar* ptr, const i
return AGAST_ALL_SCORE(ptr, pixel, threshold, AgastFeatureDetector::OAST_9_16);
}

#endif // !(defined __i386__ || defined(_M_IX86) || defined __x86_64__ || defined(_M_X64))
#endif // !(defined __i386__ || defined(_M_IX86) || defined __x86_64__ || defined(_M_X64) || defined(_M_ARM64) || defined(__aarch64__) || defined(__arm__))

}
} // namespace cv
2 changes: 1 addition & 1 deletion modules/ximgproc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
set(the_description "Extended image processing module. It includes edge-aware filters and etc.")
ocv_define_module(ximgproc opencv_core opencv_imgproc opencv_3d opencv_stereo opencv_imgcodecs opencv_video WRAP python java objc)
ocv_define_module(ximgproc opencv_core opencv_imgproc opencv_3d opencv_stereo opencv_imgcodecs opencv_video WRAP python java objc js)
12 changes: 12 additions & 0 deletions modules/ximgproc/misc/js/gen_dict.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"whitelist":
{
"": ["createEdgeDrawing"],
"ximgproc_EdgeDrawing": ["setParams", "detectEdges", "getEdgeImage"],
"ximgproc_EdgeDrawing_Params": ["Params", "PFmode"]
},
"namespace_prefix_override":
{
"ximgproc": ""
}
}
Loading