Posts

Showing posts with the label opencv

cv2.createStitcher() not enough keypoints?

Image
cv2.createStitcher() not enough keypoints? Good day, I am working on a project to have multiple cameras, each taking an image and then the images will be stitched together. Currently I am trying to use the cv2.createStitcher().stitch(images) function. Below is the code that I use: import cv2 imageFiles = ['imageCapture1_0.png','imageCapture2_0.png'] images = for filename in imageFiles: img = cv2.imread(filename) images.append(img) cv2.ocl.setUseOpenCL(False) stitcher = cv2.createStitcher() status, result = stitcher.stitch(images) cv2.imwrite('result.png',result) The image input is: left image: right image: However, result output type becomes NoneType with size 1 and value: NoneType object of builtins modules. From what I have googled, the cause of this is because there is not enough matching keypoint to stitch the images together. If so, is there a way to stitch image even with less keypoint? Is there a way to set the parameter? I read throu...

rectangle, Contour detection with python3, opencv3

Image
rectangle, Contour detection with python3, opencv3 I want to detect paper sheet from image. i applied medianBlur, Canny , dilate, threshold, etc. algorithms to find.i am able to find sheet but don't know how to crop rectangle and apply transformation answer sheet This my code import numpy as np import cv2 image = cv2.imread('im_1.jpg') image = cv2.resize(image, (800, 600)) draw = np.zeros_like(image) gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) ret, thresh = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY) kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (3, 3)) thresh = cv2.erode(thresh, kernel, iterations=4) thresh = cv2.dilate(thresh, kernel, iterations=4) im, cnts, hier = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) max_area = -1 max_c = 0 for i in range(len(cnts)): contour = cnts[i] area = cv2.contourArea(contour) if (area > max_area): max_area = area max_c = i contour = cnts[max_c] rect = cv2.minAreaRect(contour) ...

Finding a 3D face model mapping for the ibug 68-landmark mark-up

Finding a 3D face model mapping for the ibug 68-landmark mark-up as I already mentioned in the title I need a 3D face model which contains mappings for the ibug 68-landmark mark-up. I want to calculate the headpose with OpenCV and dlib and use the pre trained dlib shape predictor that is why I need that specific mark-up. You can find the mark-up here:: i-bug 68-landmark mark-up I already googled a lot but I can only find papers which either want money for the model or simply do not give you the mapping between the 3D face model and the mark-up. I have already found this github project but there are some points missing. Could you tell me where I can find such a model or how to do the mapping by myself? That would be awesome :P. Thanks in advance! By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the...

Sending live video frame over network to a remote server in python opencv [closed]

Sending live video frame over network to a remote server in python opencv [closed] I am trying to send frames that I am catching with my camera using opencv to a remote server, I tried to build a Rest Service using Flask, also I tried to use the socket, but the problem with this two solution is that both are too slow, and I'am looking for a real time solution. Can someone help? Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question. probably not the sockets are too slow but your bandwidth isn't big enough. Calculate your bandwidth needs by image width times image height times bits per pixel times frames per second. Typically you'll need some good image encoding, if you don't use a gigabi...

Opencv library on AIDE

Opencv library on AIDE I'm new with android programming and I want to code and compile an app based on opencv library and I want to do that from my tablet using AIDE, but I don't know how to setup opencv library in AIDE. Can anyone help me? I believe it has already been discussed somewhere here how to add libraries to your project.... – the_OTHER_DJMethaneMan May 13 '15 at 18:24 best jar file github.com/rajamalw/opencv-android-gradle/raw/master/jar/… – S.Sai Sarath Sep 13 '16 at 6:44 1 Answer 1 Go download the .jar (link to Java2). Create a libs folder in your app's directory and put the ...