Ask Your Question

MicTie's profile - activity

2020-06-21 20:59:29 -0500 commented answer CUDA::remap with shared-memory -> black output

Thank you for the clarifdication!

2020-03-18 09:36:19 -0500 received badge  Teacher (source)
2020-03-18 09:07:50 -0500 marked best answer cv.detail.BestOf2NearestRangeMatcher_create() missing

cv.detail.BestOf2NearestRangeMatcher_create(), used in stitching_detailed.py seems missing from OpenCv4.2.

Line 244++:


    if matcher_type == "affine":
        matcher = cv.detail_AffineBestOf2NearestMatcher(False, try_cuda, match_conf)
    elif range_width == -1:
        matcher = cv.detail.BestOf2NearestMatcher_create(try_cuda, match_conf)
    else:
        matcher = cv.detail.BestOf2NearestRangeMatcher_create(range_width, try_cuda, match_conf)
    return matcher 

Will this be added into a future version? Is there a current work-around?

Thanks?

2020-03-18 09:07:49 -0500 received badge  Self-Learner (source)
2020-03-18 08:47:15 -0500 commented question cv.detail.BestOf2NearestRangeMatcher_create() missing

Ln 34: cv.detail_BestOf2NearestRangeMatcher vs cv.detail**.**BestOf2NearestRangeMatcher**_create** cv.detail_BestOf2Nea

2020-03-18 08:46:32 -0500 commented question cv.detail.BestOf2NearestRangeMatcher_create() missing

Ln 34: cv.detail_BestOf2NearestRangeMatcher vs cv.detail.BestOf2NearestRangeMatcher_create cv.detail_BestOf2NearestRang

2020-03-18 08:44:51 -0500 commented question cv.detail.BestOf2NearestRangeMatcher_create() missing

Ln 34: cv.detail_BestOf2NearestRangeMatcher vs cv.detail.BestOf2NearestRangeMatcher_create

2020-03-18 06:35:27 -0500 received badge  Student (source)
2020-03-18 05:59:54 -0500 commented question cv.detail.BestOf2NearestRangeMatcher_create() missing

AttributeError: module 'cv2.detail' has no attribute 'BestOf2NearestRangeMatcher_create' Im refering to BestOf2NearestR

2020-03-18 05:59:09 -0500 commented question cv.detail.BestOf2NearestRangeMatcher_create() missing

AttributeError: module 'cv2.detail' has no attribute 'BestOf2NearestRangeMatcher_create'

2020-03-18 04:52:30 -0500 asked a question cv.detail.BestOf2NearestRangeMatcher_create() missing

cv.detail.BestOf2NearestRangeMatcher_create() missing cv.detail.BestOf2NearestRangeMatcher_create(), used in stitching_d

2020-02-26 22:48:15 -0500 commented question Access camera via IP

If I understand correctly, you have to set your router to forward the port to the LAN-IP, and then exchange the LAN-IP w

2020-02-10 05:57:51 -0500 edited answer CUDA::remap with shared-memory -> black output

Here is how I solved the issue: Essentially, if I replace src = src_bgr; with src_bgr.copyTo(src); or gpu_src.upload(s

2020-02-10 05:57:31 -0500 edited answer CUDA::remap with shared-memory -> black output

Here is how I solved the issue: Essentially, if I replace src = src_bgr; with src_bgr.copyTo(src); or gpu_src.upload(s

2020-02-10 05:38:50 -0500 edited question CUDA::remap with shared-memory -> black output

CUDA::remap with shared-memory -> black output I am trying to undistort images by using CUDA following the 'aged' (op

2020-02-10 05:38:18 -0500 answered a question CUDA::remap with shared-memory -> black output

Here is how I solved the issue: Essentially, if I replace src = src_bgr; with src_bgr.copyTo(src); or gpu_src.upload(s

2020-02-06 23:03:59 -0500 commented question CUDA::remap with shared-memory -> black output

Thanks for your reply! I want to use SHARED as it should be the fastest option, but the image I receive is black. So I w

2020-02-06 23:02:23 -0500 commented question CUDA::remap with shared-memory -> black output

Thanks for your reply! I want to use SHARED as it should be the fastest option, but the image I receive is black. So I w

2020-02-06 23:01:56 -0500 commented question CUDA::remap with shared-memory -> black output

Thanks for your reply! I want to use SHARED as it should be the fastest option, but the image I receive is black. So I w

2020-02-06 22:56:15 -0500 edited question CUDA::remap with shared-memory -> black output

CUDA::remap with shared-memory -> black output I am trying to undistort images by using CUDA following the 'aged' (op

2020-02-06 22:28:14 -0500 edited question CUDA::remap with shared-memory -> black output

CUDA::remap with shared-memory -> black output I am trying to undistort images by using CUDA following the 'aged' (op

2020-02-06 20:03:23 -0500 received badge  Editor (source)
2020-02-06 20:03:23 -0500 edited question CUDA::remap with shared-memory -> black output

CUDA::remap shared-memory I am trying to undistort images by using CUDA following the 'aged' (opencv2) approach from her

2020-02-06 19:24:47 -0500 commented question CUDA::remap with shared-memory -> black output

Thanks for your reply! I want to use SHARED as it should be the fastest option, but the image I receive is black. So I w

2020-02-06 19:07:54 -0500 commented question CUDA::remap with shared-memory -> black output

Thanks for your reply! if I change cv::cuda::HostMem cudamem_src(src_bgr.size(), CV_8UC3, cv::cuda::HostMem::Alloc

2020-02-06 02:17:54 -0500 commented question Image Stitching with cv2.cuda()

As far as I know SIFT is not available for CUDA. But you can try SURF or ORB ... Also note that SIFT and SURF are patent

2020-02-06 01:20:51 -0500 asked a question CUDA::remap with shared-memory -> black output

CUDA::remap shared-memory I am trying to undistort images by using CUDA following the 'aged' (opencv2) approach from her

2020-01-21 07:50:20 -0500 marked best answer Cuda ORB keypoints

I have a little experience with OpenCV (Python) and just received a Jetson Nano and want to test OpenCV with CUDA. So I tried an ORB-example but am stuck with converting GPU-Keypoints to CPU-Keypoints, but I am unable to get any result.


def orb_with_cuda():
        MAX_FEATURES = 100
        GOOD_MATCH_PERCENT = 0.15
        # load images into numpy
        npMat1 = get_sample("im1.jpg")
        npMat2 = get_sample("im2.jpg")        
        # upload into Cuda
        cuMat1 = cv2.cuda_GpuMat()
        cuMat2 = cv2.cuda_GpuMat()
        cuMat1.upload(npMat1)
        cuMat2.upload(npMat2)        
        #convert to Gray
        cuMat1g = cv2.cuda.cvtColor(cuMat1, cv2.COLOR_RGB2GRAY)
        cuMat2g = cv2.cuda.cvtColor(cuMat2, cv2.COLOR_RGB2GRAY)

        #ORB
        corb = cv2.cuda_ORB.create(MAX_FEATURES)
        _kps1, _descs1 = corb.detectAndComputeAsync(cuMat1g, None)
        _kps2, _descs2 = corb.detectAndComputeAsync(cuMat2g, None)

        #convert Keypoints to CPU
        kps1 = [cv2.KeyPoint() for i in range(MAX_FEATURES)]
        kps2 = [cv2.KeyPoint() for i in range(MAX_FEATURES)]
        corb.convert(_kps1, kps1)
        corb.convert(_kps2, kps2)      

        #BruteForce Matching
        cbf = cv2.cuda_DescriptorMatcher.createBFMatcher(cv2.NORM_HAMMING)
        cmatches = cbf.match(_descs1, _descs2) 
        # Sort matches by score
        cmatches.sort(key=lambda x: x.distance, reverse=False)
        # Remove not so good matches
        numGoodMatches = int(len(cmatches) * GOOD_MATCH_PERCENT)
        cmatches = cmatches[:numGoodMatches]  
        # Draw top matches
        imMatches = cv2.drawMatches(npMat1, kps1, npMat2, kps2, cmatches, None)
        cv2.imwrite("gpu_matches.jpg", imMatches)
        return()

The code above is running w/o any errors, but it seems the CPU-keypoints are all empty (the created images does not show any matching lines). The equivalent Non-CUDA code is running fine.

Any idea what I am doing wrong? I tried several conversion methods, this is the 'best' I can find. Thanks for your help!

(Using OpenCV4.1.2 on Jetson Nano with Python3.6.9)

2020-01-21 07:50:20 -0500 received badge  Scholar (source)
2020-01-21 07:49:58 -0500 commented answer Cuda ORB keypoints

I re-compiled the .hpp and everything is working! Thank you so much for your help!

2020-01-21 03:18:01 -0500 commented answer Cuda ORB keypoints

Sorry, did not know I have to recompile ... Do I have to recompile the entire OpenCV, or is there a faster way? (using L

2020-01-21 03:14:12 -0500 commented answer Cuda ORB keypoints

Sorry, did not know I have to recompile ... Do I have to recompile the entire OpenCV, or is there a faster way?

2020-01-21 00:01:05 -0500 commented question Cuda ORB keypoints

Thanks, this seems to be working! I have to wait for a couple of hours before I can show the answer

2020-01-20 23:54:25 -0500 commented question Cuda ORB keypoints

Thanks, this seems to be working! I have to wait for a couple of hours before I can show show the answer

2020-01-20 19:20:57 -0500 commented answer Cuda ORB keypoints

Thanks for your help! Too bad the solution is not working: The line imMatches = cv2.drawMatches(npMat1, corb.convert(_

2020-01-20 07:11:07 -0500 commented question Cuda ORB keypoints

@supra56: using cuMat1 = cv2.cuda_GpuMat() cuMat2 = cv2.cuda_GpuMat() cuMat1g = cv2.cvtColor(npMat1, cv2.COLOR_RGB2GR

2020-01-20 03:52:14 -0500 commented question Cuda ORB keypoints

cmatches is <class 'list'=""> of <class 'cv2.dmatch'="">. You, are right I did some nonsense in my earlier

2020-01-20 02:01:44 -0500 commented question Cuda ORB keypoints

@cudawarped: Thanks for your help! _kps1.download() shows a <class 'numpy.ndarray'=""> with [[2.54100000e+03 4.

2020-01-20 01:44:11 -0500 commented question Cuda ORB keypoints

@supra56: Thanks for your help! I changed the lines to cuMat1 = cv2.cuda_GpuMat() cuMat2 = cv2.cuda_GpuMat()

2020-01-19 08:07:04 -0500 asked a question Cuda ORB keypoints

Cuda ORB keypoints I have a little experience with OpenCV (Python) and just received a Jetson Nano and want to test Open

2020-01-13 22:46:27 -0500 received badge  Enthusiast