opencv3.0

OpenCV with Python error for arcLength

时间秒杀一切 提交于 2019-12-11 13:32:41
问题 I have an issue in my code and can't find a proper solution for it. I am using Python 2.7.10 and OpenCV 3.0. I read two images and want to match one of the pictures(a template) with the contours from the other but I get the following error: error: (-215) count >= 0 && (depth == CV_32F || depth == CV_32S) in function cv::arcLength My code looks like this: gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) gray = cv2.bilateralFilter(gray, 11, 10, 17) edges = cv2.Canny(gray, 100, 20) contours

Android OpenCV Paper Sheet detection

萝らか妹 提交于 2019-12-11 11:12:29
问题 I think this question is asked before but i didnt find a sample or solution for my problem. I am new to opencv and i want to use the OpenCV CameraPreview for paper sheet detection. In my sample app i use opencv 3.0.0 with static initialization. I understand that object recognition can done with these steps: Make the input image Canny Blur the Canny Image Find Contours on the blurred Canny Image Search for rectangles etc Draw lines or fill the rectangle with half transparent color My problem

How to solve:-1: error: No rule to make target `/home/xxxxx/opencv-3.0.0/lib/libopencv_xphoto.so.3.0.0', needed by `xxxxx'. Stop

戏子无情 提交于 2019-12-11 09:55:21
问题 I am trying to use cmake to compile code with OpenCV 3.0 in it. I tried to make it as simple as possible: project(xxxxx) cmake_minimum_required(VERSION 2.8) aux_source_directory(. SRC_LIST) find_package(OpenCV) message("Libs: ${OpenCV_LIBS}") message("Include Dir: ${OpenCV_INCLUDE_DIRS}") include_directories(${OpenCV_INCLUDE_DIRS}) add_executable(${PROJECT_NAME} ${SRC_LIST}) target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS} ) all I have in my main.cpp is: #include <opencv2/core.hpp> and cv

install opencv 3.4.1 and Qt 5.10 with CMAKE

笑着哭i 提交于 2019-12-11 09:48:13
问题 I install Qt 5.10 latest version and opencv3.4.1 and I couldn't install the library in this version of Qt with Cmake can anybody help me to do it on my windows 10 64-bit please? I tried with this video also https://www.youtube.com/watch?v=ZOSu-2Oju-A and in cmd step I have this (picture in this link) in this link also (( https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows )) I do all steps carefully but I didn't found the folder bin in opencv-build after do the steps and My OS is windows

python3 'int' object is not iterable

为君一笑 提交于 2019-12-11 08:45:09
问题 This code is used to recognize faces. I think the problem is about the python version between 2 and 3 because I cloned it from a py2 project. My enviroment is Python 3.5.1 and OpenCV 3.1.0 [X,y]=read_images(sys.argv[1]) y=np.asarray(y,dtype=np.int32) if len(sys.argv)==3: out_dir=sys.argv[2] model=cv2.face.createEigenFaceRecognizer() model.train(np.asarray(X),np.asarray(y)) camera=cv2.VideoCapture(0) face_cascade=cv2.CascadeClassifier('/home/cisco/py/data/haarcascades/cascades/haarcascade

How to avoid rotation of rects, detected by MinAreaRect?

戏子无情 提交于 2019-12-11 08:13:59
问题 I am trying to detect text fields on Windows Form but CvInvoke.MinAreaRect(contour) returns rectangle, rotated by -7.29419661 Angle. My code is Image<Bgr, Byte> a = new Image<Bgr, byte>(@"d:/Art/documents/Projects/InputFieldsDetector/Images/Form345_1.PNG"); imageBox1.Image = a; UMat grayed = new UMat(); CvInvoke.CvtColor(a, grayed, ColorConversion.Bgr2Gray); imageBox2.Image = grayed; UMat canny = new UMat(); CvInvoke.Canny(grayed, canny, 50, 200, 3); imageBox3.Image = canny;

How to erase the dotted watermark from set of similar images?

拈花ヽ惹草 提交于 2019-12-11 05:22:38
问题 I want to automate the task of entering set of images into a number generating system & before that i like to remove a dotted watermark which is common across these images. I tried using google, tesseract & abby reader, but I found that the image part that does not contain the watermark is recognized well, but the part that is watermarked is almost impossible to recognize. I would like to remove the watermark using image processing. I already tried few sample codes of opencv, python, matlab

Unable to create DescriptorMatcher in openCV 3.2 - Android

梦想的初衷 提交于 2019-12-11 05:16:49
问题 I'm running the following openCV code in Android: FeatureDetector detector = FeatureDetector.create(FeatureDetector.ORB); DescriptorExtractor descriptor = DescriptorExtractor.create(DescriptorExtractor.ORB); DescriptorMatcher matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMING); It works fine in openCV 2.4.1 In openCV 3.2 I'm getting the following exception: java.lang.UnsatisfiedLinkError: No implementation found for long org.opencv.features2d.DescriptorMatcher.create_1

Installing OpenCV3 with Homebrew: No head is defined for opencv

試著忘記壹切 提交于 2019-12-11 05:10:46
问题 I am having trouble installing OpenCV3 with the error I have... No head is defined for opencv I have not found any solution to on the internet. I used these websites as references: https://www.pyimagesearch.com/2016/12/19/install-opencv-3-on-macos-with-homebrew-the-easy-way/ https://www.learnopencv.com/install-opencv3-on-macos/ The exact steps I followed were: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" echo "# Homebrew" >> ~/.bash_profile echo

How to align two images based on a common feature with matchTemplate

≯℡__Kan透↙ 提交于 2019-12-11 03:08:37
问题 I have two images which overlap. I'd like to align these two images. My current approach is to find a common feature (a marking) in both images. I'd then like to align these two images according to the place where the feature overlaps. The images aren't perfect, so I'm looking for some way that will align based the 'best' fit (most overlap). Originally I tried to align the images using feature matching through SIFT but the features matches were often incorrect/too few. Here's the code I used