Ask Your Question

Marko5280's profile - activity

2020-05-13 10:10:44 -0500 received badge  Notable Question (source)
2020-03-30 03:37:12 -0500 received badge  Popular Question (source)
2020-03-08 11:13:30 -0500 received badge  Popular Question (source)
2019-07-05 17:02:43 -0500 received badge  Notable Question (source)
2019-01-05 03:28:21 -0500 received badge  Popular Question (source)
2018-12-26 11:43:50 -0500 received badge  Student (source)
2018-12-26 11:43:46 -0500 marked best answer If "contours" is vector<vector<Point> what are its elements?

I am working with "findcontours". But, cannot get the type correct. Can someone please help? This code hits a error at:

 for (cont : contours);

The test code is as follows:

// ConsoleApplication 1-25-2018.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"


/**
* file Smoothing.cpp
* brief Sample code for simple filters
* author OpenCV team
*/

#include <iostream>
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui.hpp"

using namespace std;
using namespace cv;
Mat frame;
vector<vector<Point> > contours;
vector<Vec4i> hierarchy;
vector<Point>  cont;

/**
* function main
*/
int main(int argc, char ** argv)
{
    Mat frame;
    frame = imread("lena.jpg");
    imshow("Lena.jpg", frame);
    waitKey();
    dilate(frame, frame, 1);
    imshow("dilate", frame);
    waitKey();
    findContours(frame, contours, hierarchy, RETR_LIST, CHAIN_APPROX_SIMPLE);

    for (cont : contours);
    {
        Moments mu = moments(cont, false);
        if (mu.get_m00() > 100.0) {}
    }
}
2018-10-08 11:51:11 -0500 commented question How do I get the camera ID number and path?

I am using Windows 7 Home Premium Service Pack 1. My previous question was general. This question is specifically about

2018-10-08 11:44:07 -0500 commented question How do I get the camera ID number and path?

I am using Windows 7 Home Premium Service Pack 1.

2018-10-08 11:28:39 -0500 marked best answer How do I choose which camera I am accessing?

I have a 4-way USB splitter and am trying to develop the ability to access any one of four webcams. So far, I have not been able to do this. I am using C++ code samples to develop my java code. That might be some of the difficulty. The code I am using to do this follows . . .

Does anyone know how this should be done?

int camera = 0;   //   C++ VideoCapture cap(0); // open the default camera
//int camera = 1; //  Insten
//int camera = 2; //  logitech279 
//int camera = 3; //  logitech920 
//int camera = 4; //  logitechxxx
VideoCapture vid = new VideoCapture(camera);                             
vid.open(camera);
2018-10-08 11:25:36 -0500 marked best answer OpenCV 3.4.1 breaks Imgproc.putText(Mat, String, Point, int, int, Scaler)

The method putText(Mat, String, Point, int, int, Scaler) is undefined for the type Imgproc

I have finally gotten my test snippet script to work.

http://answers.opencv.org/question/18...

Now it is broken again. I have upgraded to OpenCV 3.4.1 and Intelli-sense give the same old error message. It is a generic error message that does not point to the real problem. The script is proven. I do know that . . . It seems that putText is in the OpenCV Native library so, if the Native library in not installed properly this error message pops up. I have installed the Native library in Eclipse, the project and the script.

Anyone have a clue as to what I have not done or done wrong??

PS: This script has run in the past. The execution error does not provide any useful new information

The test script follows:

package openCV_340_PACKAGE;

import org.opencv.core.*;
import org.opencv.highgui.HighGui;
import org.opencv.imgproc.Imgproc;

public class Smoothing_Images_Test_Case {

    public static void main(String[] args) {
        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
        Mat src;
        src = new Mat(400,400,16,Scalar.all(127));
        Imgproc.putText(src ,
                    "This Image" ,
                    new Point( src.cols()/4 , src.rows()/2 ) ,
                    Core.FONT_HERSHEY_COMPLEX ,
                    1 ,
                    new Scalar(255, 255, 255)) ;
        HighGui.imshow( "This Frame", src );
        HighGui.waitKey( 1500 );
        System.exit(0);
        }
}
2018-10-08 11:18:01 -0500 commented question What is the proper usage for "flip"?

That is what I was looking for. My code now works as expected. THANK YOU

2018-10-05 20:20:10 -0500 asked a question What is the proper usage for "flip"?

What is the proper usage for "flip"? I have the cascade-classifier sample in Java (or something close) running (3.4.1).

2018-05-20 10:17:08 -0500 commented answer SOLVED How do I correctly install OpenCV 3.4.1?

I have tried to write a formatted, accurate and constructive question and answer. There is a downvote for both my quest

2018-05-19 19:15:32 -0500 edited answer SOLVED How do I correctly install OpenCV 3.4.1?

SOLVED FIRST, there is more recent documentation than 2.4! I am now using “OpenCV Java Tutorials” http://opencv-jav

2018-05-19 18:23:56 -0500 marked best answer SOLVED How do I correctly install OpenCV 3.4.1?

I am trying to install OpenCV 3.4.1 using the instructions from 2.4!

https://docs.opencv.org/2.4/doc/tutorials/introduction/java_eclipse/java_eclipse.html

I have done it before and everything worked fine. However, after working with the Workspace command (and messing everything up), nothing works. So, I am starting from the beginning. I try to run the test program and get this error.

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_eye(III)J at org.opencv.core.Mat.n_eye(Native Method) at org.opencv.core.Mat.eye(Mat.java:507) at First_test_Program.main(First_test_Program.java:11)

A search on the subject does not provide a solution. Which version of Java should I install? (7, 8, 9 or 10) The problem is in using old instructions to make a current installation.

Does anyone know how to make a current installation?

2018-05-19 18:23:06 -0500 edited answer SOLVED How do I correctly install OpenCV 3.4.1?

SOLVED FIRST, there is more recent documentation than 2.4! I am now using “OpenCV Java Tutorials” http://opencv-jav

2018-05-19 18:20:11 -0500 edited answer SOLVED How do I correctly install OpenCV 3.4.1?

SOLVED FIRST, there is more recent documentation than 2.4! I am now using “OpenCV Java Tutorials” http://opencv-jav

2018-05-19 18:18:38 -0500 edited answer SOLVED How do I correctly install OpenCV 3.4.1?

SOLVED FIRST, there is more recent documentation than 2.4! I am now using “OpenCV Java Tutorials” http://opencv-jav

2018-05-19 18:16:49 -0500 edited question SOLVED How do I correctly install OpenCV 3.4.1?

How do I correctly install OpenCV 3.4.1? I am trying to install OpenCV 3.4.1 using the instructions from 2.4! https:/

2018-05-19 18:15:59 -0500 answered a question SOLVED How do I correctly install OpenCV 3.4.1?

SOLVED FIRST, there is more recent documentation than 2.4! I am now using “OpenCV Java Tutorials” http://opencv-jav

2018-05-19 11:43:51 -0500 commented question Problem in linking opencv java with eclipse

Tried a new version of what? I still cannot get this to work.

2018-05-17 12:28:31 -0500 asked a question SOLVED How do I correctly install OpenCV 3.4.1?

How do I correctly install OpenCV 3.4.1? I am trying to install OpenCV 3.4.1 using the instructions from 2.4! https:/

2018-05-04 09:42:23 -0500 edited question How do I get the camera ID number and path?

How do I get the camera ID number and path? Edited after comments. Followup to this question Windows 7 OpenCV

2018-05-04 09:39:56 -0500 edited question How do I get the camera ID number and path?

How do I get the camera ID number and path? **Edited after comments. Followup to this question ** Windows 7 Op

2018-05-04 09:28:58 -0500 edited question How do I get the camera ID number and path?

How do I get the camera ID number and path? Edited after comments Windows 7 OpenCV 3.4.1 Eclipse I am to

2018-05-04 09:26:51 -0500 commented question How do I get the camera ID number and path?

I am using Windows 7

2018-05-04 09:23:47 -0500 edited question How do I get the camera ID number and path?

How do I get the camera ID number and path? Windows 7 OpenCV 3.4.1 Eclipse I am told that I can choose which camera I

2018-05-04 08:35:17 -0500 asked a question How do I get the camera ID number and path?

How do I get the camera ID number and path? OpenCV 3.4.1 Eclipse I am told that I can choose which camera I am accessi

2018-05-03 16:28:02 -0500 commented answer How do I choose which camera I am accessing?

Windows 7 Eclipse Great. But, how do I get the camera number and path?

2018-05-03 16:05:50 -0500 commented answer How do I choose which camera I am accessing?

Windows 7 Eclipse Great. But, how do I get the camera number and name?

2018-05-03 16:04:03 -0500 commented answer How do I choose which camera I am accessing?

Great. But, how do I get the camera number and name?

2018-05-03 15:12:34 -0500 asked a question How do I install Maven and v4l2 ?

How do I install Maven and v4l2 ? In Eclipse, in Windows 7, I am trying to run a program with the following . . . impor

2018-05-02 15:45:53 -0500 commented answer How do I choose which camera I am accessing?

Then what is the meaning of: VideoCapture vid = new VideoCapture(camera); is camera a real variable?

2018-05-02 13:08:20 -0500 asked a question How do I choose which camera I am accessing?

How do I choose which camera I am accessing? I have a 4-way USB splitter and am trying to develop the ability to access

2018-04-27 09:24:07 -0500 edited question OpenCV 3.4.1 breaks Imgproc.putText(Mat, String, Point, int, int, Scaler)

SOLVED OpenCV 3.4.1 breaks Imgproc.putText(Mat, String, Point, int, int, Scaler) The method putText(Mat, String, Point,

2018-04-18 07:03:10 -0500 edited question Can someone please rewrite the Cascade Classifier sample script?

Can someone please rewrite the Cascade Classifier sample script? The Cascade Classifier sample script is written in C++

2018-04-18 07:00:22 -0500 received badge  Self-Learner (source)
2018-04-18 06:58:45 -0500 marked best answer Can someone please rewrite the Cascade Classifier sample script?

The Cascade Classifier sample script is written in C++ only. I am studying java. Can someone please rewrite the sample in Java.

2018-04-18 06:58:23 -0500 answered a question Can someone please rewrite the Cascade Classifier sample script?

SOLVED I have found code examples close to what I am trying to do as follows . . . > Face Detection through a webca

2018-04-18 06:30:34 -0500 edited question SOLVED How do I install OpenCV 2.4.11 on Windows 7?

SOLVED How do I install OpenCV 2.4.11 on Windows 7? I am trying to run an OpenCV program on the Lego EV3. It uses Ope

2018-04-18 05:53:31 -0500 marked best answer SOLVED How do I install OpenCV 2.4.11 on Windows 7?

I am trying to run an OpenCV program on the Lego EV3. It uses OpenCV 2.4.11!

My plan is to: . . .

1) Get my program to run with OpenCV 3.4.1 on the PC in Java!

2) Get my program to run with OpenCV 2.4.11 on the PC in Java!

3) Get my program to run with OpenCV 2.4.11 on the EV3 in leJOS Java!

https://docs.opencv.org/2.4/doc/tutor...

Following the OpenCV 2.4.6 instructions above to install OpenCV 2.4.11 into a new ECLIPSE PROJECT proper, the correct procedure seems to be: . . .

1) Load OpenCV 2.4.11

2) Load the Native Library for OpenCV 2.4.11

3) Implement the Native Library in the code

I have done all this but, the test program does no run.

import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat;

public class Hello
{
   public static void main( String[] args )
   {
      System.loadLibrary( Core.NATIVE_LIBRARY_NAME );
      Mat mat = Mat.eye( 3, 3, CvType.CV_8UC1 );
      System.out.println( "mat = " + mat.dump() );
   }
}

What have I not done(not done correctly)?

2018-04-18 05:53:18 -0500 answered a question SOLVED How do I install OpenCV 2.4.11 on Windows 7?

SOLVED OpenCV has been updated. The latest version is OpenCV 3.4.1! https://opencv.org/opencv-3-4-1.html

2018-04-18 05:52:59 -0500 edited question SOLVED How do I install OpenCV 2.4.11 on Windows 7?

How do I install OpenCV 2.4.11 on Windows 7? I am trying to run an OpenCV program on the Lego EV3. It uses OpenCV 2.4.1