javacv

identify contours in a image which are having same color using opencv or javacv?

邮差的信 提交于 2020-01-01 19:57:12
问题 This question is related to my previous question in that question I used color image as input and it identify by using line color but I like to know how to identify that kind of image using gray-scale image. This is the gray-scale input image and have to identify And I need to identify following objects with its positions (x and y coordinates). Please can some one explain with simple code example to identify those objects and I need to identify connected lines of those objects as well (As

How to iterate through a cvMat matrix in JavaCV?

与世无争的帅哥 提交于 2020-01-01 12:16:12
问题 I have an IplImage that I converted in a Matrix, and now I want to iterate cell by cell. CvMat mtx = new CvMat(iplUltima); for (int i = 0; i < 100; i++) { //I need something like mtx[0][i] = someValue; } 回答1: ¡¡I DID IT!! I share it: CvMat mtx = new CvMat(iplUltima); for (int i = 0; i < 100; i++) { for (int j = 0; j < 100; j++) { opencv_core.cvSet2D(mtx, i, j, CvScalar.ONE); } } iplUltima = new IplImage (mtx); Where i = row and j = column 回答2: First, you need to import the following from

How to identify polygon using opencv or javacv?

有些话、适合烂在心里 提交于 2019-12-31 14:52:46
问题 I'm doing a project that use image processing techniques to identify different objects and their lengths. I go through many examples in javaCV as well as OpenCV. But unfortunately I was unable to identify T shape of polygon. I try to use following rectangle identification method but I failed it. public static CvSeq findSquares( final IplImage src, CvMemStorage storage) { CvSeq squares = new CvContour(); squares = cvCreateSeq(0, sizeof(CvContour.class), sizeof(CvSeq.class), storage); IplImage

How to identify polygon using opencv or javacv?

家住魔仙堡 提交于 2019-12-31 14:51:19
问题 I'm doing a project that use image processing techniques to identify different objects and their lengths. I go through many examples in javaCV as well as OpenCV. But unfortunately I was unable to identify T shape of polygon. I try to use following rectangle identification method but I failed it. public static CvSeq findSquares( final IplImage src, CvMemStorage storage) { CvSeq squares = new CvContour(); squares = cvCreateSeq(0, sizeof(CvContour.class), sizeof(CvSeq.class), storage); IplImage

How to Iterate in OpenCV4Android

☆樱花仙子☆ 提交于 2019-12-30 07:43:28
问题 I had this piece of code to be converted into Java using OpenCV4Android. But their are no Java-Wrappers for matiterator in OpenCV4Android. void show_result(const cv::Mat& labels, const cv::Mat& centers, int height, int width) { std::cout << "===\n"; std::cout << "labels: " << labels.rows << " " << labels.cols << std::endl; std::cout << "centers: " << centers.rows << " " << centers.cols << std::endl; assert(labels.type() == CV_32SC1); assert(centers.type() == CV_32FC1); cv::Mat rgb_image

How to make a video from set of images in android like flipagram

坚强是说给别人听的谎言 提交于 2019-12-29 08:14:16
问题 I have searched for the solution and found - Java CV - FFmpeg Need step by step to integrate them like this 回答1: Steps for Integrating FFMPEG (1.) Download ffmpeg from here: http://bambuser.com/opensource. It contains scripts to build ffmpeg for android. (2.) Modify build.sh. Replace "com.bambuser.broadcaster" with your package name. You also need to set the ffmpeg flags to enable to codecs you're interested in. (3.) Run build.sh, and copy the build/ffmpeg directory into your apps jni/lib

UnsatisfiedLinkError: no opencv_java249 in java.library.path

拜拜、爱过 提交于 2019-12-27 12:23:52
问题 Running into some problems making a piece of code run on my mac. Had someone write me an image analysis java app but I keep getting this error when trying to run it on netbeans. run: Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java249 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1119) at image.prossing.Test.main(Test.java:28) Java Result:

UnsatisfiedLinkError: no opencv_java249 in java.library.path

断了今生、忘了曾经 提交于 2019-12-27 12:22:46
问题 Running into some problems making a piece of code run on my mac. Had someone write me an image analysis java app but I keep getting this error when trying to run it on netbeans. run: Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java249 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1119) at image.prossing.Test.main(Test.java:28) Java Result:

detecting image keypoints --javaCV --EXCEPTION_ACCESS_VIOLATION

血红的双手。 提交于 2019-12-25 11:58:42
问题 I'm java developer .My goal is to detect image keypoints using javaCV this is my code : final CvMat image1 = cvLoadImageM("im1.png" , 0); final CvMat image2 = cvLoadImageM("im2.png", 0); SIFT sift = new SIFT(); FeatureDetector featureDetector =sift.getFeatureDetector(); KeyPoint keypoint1 = new KeyPoint(); KeyPoint keypoint2 = new KeyPoint() ; featureDetector.detect(image1, keypoint1 , null); featureDetector.detect(image2,keypoint2, null); but when I run this code I got an access violation

detecting image keypoints --javaCV --EXCEPTION_ACCESS_VIOLATION

∥☆過路亽.° 提交于 2019-12-25 11:58:15
问题 I'm java developer .My goal is to detect image keypoints using javaCV this is my code : final CvMat image1 = cvLoadImageM("im1.png" , 0); final CvMat image2 = cvLoadImageM("im2.png", 0); SIFT sift = new SIFT(); FeatureDetector featureDetector =sift.getFeatureDetector(); KeyPoint keypoint1 = new KeyPoint(); KeyPoint keypoint2 = new KeyPoint() ; featureDetector.detect(image1, keypoint1 , null); featureDetector.detect(image2,keypoint2, null); but when I run this code I got an access violation