2020-10-26 10:52:27 -0600 | received badge | ● Popular Question (source) |
2018-12-14 14:20:03 -0600 | received badge | ● Famous Question (source) |
2018-01-05 10:32:01 -0600 | commented answer | Creating Regions of Interest (ROI) by clustering fragmented contours Thanks Steven! My effort was Java-based, so Latent SVM (my first choice) was unfortunately not available in OpenCV Java |
2017-12-18 10:19:13 -0600 | commented answer | Java findHomography transform image point to ground plane point Thanks, @ddantas |
2017-12-18 09:05:04 -0600 | commented answer | Creating Regions of Interest (ROI) by clustering fragmented contours Thanks Steven! |
2017-12-01 08:40:13 -0600 | answered a question | Kerberos.io looks for OpenCV developers Perfect, I've been doing my own modest work on this, am now looking at Kerberos.io, and it appears quite promising. |
2016-08-18 13:21:14 -0600 | received badge | ● Notable Question (source) |
2016-04-15 18:28:27 -0600 | received badge | ● Famous Question (source) |
2016-01-01 14:30:08 -0600 | received badge | ● Good Answer (source) |
2015-12-29 13:40:19 -0600 | received badge | ● Great Question (source) |
2015-08-02 15:51:51 -0600 | received badge | ● Favorite Question (source) |
2015-06-11 13:01:15 -0600 | received badge | ● Popular Question (source) |
2015-06-04 03:59:50 -0600 | received badge | ● Notable Question (source) |
2015-04-07 02:53:04 -0600 | received badge | ● Self-Learner (source) |
2015-04-06 20:20:20 -0600 | answered a question | How to scale up small image (submat) to HoG winSize in Java It turns out the answer is not in Mat in Java, but in Imgproc, which has a resize(). The above code works, though I'm going to use an algorithm to provide more precise size adjustment. |
2015-04-05 21:09:50 -0600 | asked a question | How to scale up small image (submat) to HoG winSize in Java Problem: I have an image ROI (submat) that I want to examine with a HoG detector, though the ROI is smaller than the HoG winsize, which results in an error (see error below). The winsize is 64x128 and the ROI (after initial resizing to ensure blocksize compatibility) is 48x96. Approach: I used .convertTo(Mat m, int rtype, double alpha) in an attempt to to scale the image up to twice the size, though there was no apparent scaling that took place. (see code and output below) Question: How do I scale an image ROI to be at least as large as the HoG winsize? Error when ROI is smaller than the HoG winsize;
Code segment; Output; 21:42:13.975 [Thread-0] DEBUG a.i.MatUtilities - resizedWindow size is too small, convert to 2 times the size 21:42:13.975 [Thread-0] DEBUG a.i.MatUtilities - original ROI = {254, 789, 93x44} 21:42:13.975 [Thread-0] DEBUG a.i.MatUtilities - resizedWindow = {253, 787, 96x48} and ROImat 96x48 |
2015-02-07 21:07:11 -0600 | received badge | ● Popular Question (source) |
2015-01-22 05:10:55 -0600 | received badge | ● Enthusiast |
2015-01-21 06:02:35 -0600 | received badge | ● Necromancer (source) |
2015-01-17 07:00:18 -0600 | asked a question | Java findHomography transform image point to ground plane point Objective: Take a point (or set of points) from a camera perspective view and translate it/them to the respective ground plane points. Approach: Used findHomography to obtain a homography mat using 7 points (in case RANSAC eliminated some). Plan to use perspectiveTransform(). Issue: Cannot interpret homography mat, nor understand how to continue (I don't know C, so cannot follow the example code). It appears 5 of the 9 elements are null, which I take to mean that the homography is faulty, though have no way of interpreting the results, so a made a number of print statements. The output; Am I on the ... (more) |
2014-12-09 14:04:17 -0600 | marked best answer | Read h264 frame from IP Camera feed: Java version I have been able to connect to and open an rstp h264 IP camera stream, and grab the first frame. However, when I try to retrieve() or read() the image, I'm given a null pointer exception. The output is; The "capture" value during the run is VideoCapture(id=18) I've been reviewing the ip camera threads, and by the point capture is successful, the reading seems to be a non-issue. I ran the properties to identify any odd values, and I note that while I've set my camera to 680x480, it is registering 704x480. The same code (adjusted for an mjpeg feed) will connect and open when the camera is producing MJPEG, but will not register a successful .grab() What am I doing wrong on my read (or retrieve)? |
2014-12-09 14:03:08 -0600 | marked best answer | Java BackgroundSubtractionMOG2: can I set fTau or nShadowDetection? Is there a trick to setting fTau or nShadowDetection values in the Java version of BackgroundSubtractionMOG2? The default values are not giving good results (all too often the shadow gives much better contours in findContours() than does the person themselves). Update: If there is no current means to access fTau or nShadowDetection via the Java binding, is it something I can add manually to the next version via pull request? Current settings; new BackgroundSubtractorMOG2(2, 40, true);// I've tried lower values, such as (1, 16, true) BSMOG2.apply(frameToExamine, fore, 0.5) // also tried 0.1 findContours(fore, contours, hierarchyMat, 1, 3) I also erode and dilate before findContours. Update: Added images to provide greater clarity of the problem Contours (from findContours()) Original image Silhouette |
2014-12-09 13:44:10 -0600 | marked best answer | What will be added to the Java wrappers and when? What are the features that will be added to those currently implemented in Java wrappers, and what is the expected timeframe (or roadmap), if any? For example, the following would be very helpful to have in Java;
|
2014-12-06 20:23:35 -0600 | answered a question | DefaultPeopleDetector: true pedestrian height The actual size of the persons in the Daimler images is about 75-80% of the image height (128 pixels), so if your ROI fits the person perfectly, then you need to retain more of the original image above and below the head and feet (respectively). See examples here, along with the full description of the data set; |
2014-11-08 08:13:40 -0600 | received badge | ● Famous Question (source) |
2014-09-23 12:36:31 -0600 | marked best answer | Reading video stream from IP camera in OpenCV Java I'm working towards an advanced motion detection plugin for openHab.org using OpenCV Java, and need to be able to read a video stream directly from an IP camera, preferably an h.264 stream. I have found out how to do the with a webcam, but an IP camera is a very different problem. I would prefer not to store video to a file and read from the file to keep delays at a bare minimum (unless that's the only solution). How is this best accomplished in OpenCV Java? Based on a suggestion by Haris below; I tried; The results are;
Exception in thread "main" java.lang.UnsatisfiedLinkError: Per Alexander Smorkalov's suggestion, I updated to 2.4.7. Now when I execute; it seems to behave, with no errors thrown. I'm using Eclipse as my dev/debug environment, so I'm stepping through (and into many) lines of code with it's debugger. The following line results in 'true' (and prints out the text), which implies that the VideoCapture connection has been opened; But there is nothing there when I go to grab frames from the mjpeg feed; Inside the C++ VideoCapture class is a 'grab()' operation that is returning 'false'; boolean retVal = grab_0(nativeObj); And then this error message appears; I went to Ubuntu Software Center, did a search on GStreamer and came up with this list of plugins, which are all installed on my system; GStreamer FFMPEG video plugin, GStreamer extra plugins GStreamer plugins for mms, wavpak, quicktime, musepack GStreamer plugins for aas, xvid, mpeg2, faad So I went to Synaptic to see what GStreamer plugins where loaded or available. I must say I was rather stunned by the long list, and have not been able to determine which plugin I'm missing. I'm including a screenshot of the list (and there are a few more past the end of the screenshot); C:\fakepath\GStreamerPlugInList.png Am I simply declaring it improperly, or is there a better way? @berak has said that this is not yet fully implemented in the baselined code, so do I need to report this as a bug? Please bear with me, I'm new here and returning to Java programming after 12 years away from hands-on coding. |
2014-09-09 14:24:08 -0600 | commented question | Can I add a Java wrapper to a feature that is not yet released? @berak, that link is now broken. Is there an updated URL? Thanks! |
2014-09-09 14:20:01 -0600 | marked best answer | Creating Regions of Interest (ROI) by clustering fragmented contours Overall Objective: Create Regions of Interest (ROIs) in order to then examine them for objects such as person, dog, vehicle utilizing the Java bindings Approach: BackgroundSubtraction -> FindContours -> downselect to Region of Interest (smallest encompassing rectangle around contours of an object) that is then sent to be classified and/or recognized. Problem: Too many fragmented contours for each object almost all the time. I've tried BackgroundSubtractorMOG and MOG2 with varying parameters (may not have tried the right combinations) along with erode/dilate and findContours(). The contours rarely completely enclose the subject, consisting instead of a number of contours that usually partially map to the subject. On top of that, there are sometime multiple objects (eg., person with dog) moving through the video stream. I am not able to reliable draw a rect around the full object in order to use that smaller window in which to detect features (or classifier, HOG, etc). (I am addressing the shadow issue in a different thread) My approach is leaning towards grouping contours that have some measure of nearness, though for people, the vertical elongation can be a complication for nearness calculations. Question: Is there a method by which the nearness of contours can be evaluated, so as to group them into a larger contour/object? Are there approaches to solving this problem? Below are images that illustrate the issue under consideration; |
2014-06-26 12:32:35 -0600 | commented answer | Creating Regions of Interest (ROI) by clustering fragmented contours Sorry for the delay, have been away on other matters. The non-hierarchical approach means that there should be an agglomeration for each set of contours that passes the size and nearness tests. However, overlapping (or very close) moving images will not be tracked as separate objects (e.g., person walking dog on short leash, a close group of pedestrians, etc). The nearness value is the key; requiring contours to be very close means that a 'sparse' set of contours is not fully combined. Set too far, it could combine contours from non-related objects. My main goal for this was to identify an ROI, then apply other features to classify, track, identify, etc. For example, I would use detectMultiScale(). I am not where I could access the code right now, but should be within the week. |