adamgf / react-native-opencv3

react-native-opencv3 wraps functionality from OpenCV Java SDK 3.4.4 + contrib modules and iOS OpenCV 3.4.1 + contrib modules for use in React-Native apps. Please enjoy!
Other
188 stars 62 forks source link

Hough Lines Transform / Thread counting on a picture ? #6

Open MayoudP opened 4 years ago

MayoudP commented 4 years ago

By any chance, is it possible to use this library in order to achieve Hough Lines counting ? Count the number of lines on a picture. The picture is basically a painting board.

Sorry, it's more a question than a bug 😬

Thanks for the help anyway.

adamgf commented 4 years ago

Hi @MayoudP yes please take a look at the sample app HoughCircles2 in react-native-opencv3-tests in the code where it draws the circles you want to replace that with counting the hough lines and switch out the call to houghCircles to the houghLines I am not sure of the exact method names.

MayoudP commented 4 years ago

Thank you very much for your answer, I'll have a look this week-end. Do you know where can I check all the existing method and their specs ?

adamgf commented 4 years ago

Hi @MayoudP not all of the OpenCV methods are supported just a good chunk of Imgproc and Core methods I am pretty sure HoughLines is supported you will have to check out opencv.org to find the java documentation for the 3.4.4 android release of OpenCV. It invokes the method at run-time so as long as the method exists in Imgproc or Core and the parameters are of the correct types it will just call the method.

MayoudP commented 4 years ago

Alright thank you, and last question, does the algorythm with openCV (HoughLines) would be able to detect lines (Vertically and Horizontally) on such images like this ? In your opinion...

IMG_4062