Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View Mat content while debugging

I'm coding some image processing algorithms using Android OpenCV and I'm going crazy to debug some parts. Say that my steps are:

  1. threshold source image (Mat src) so I get a Mat with the result (Mat dst)
  2. get objects (Mat objs)
  3. get contours (Mat conts)
  4. etc.

Is there any way to check the contents of each Mat in debug mode? (apart from "plotting" the image in my device). It would be awesome to see the whole matrix in a table (like in Matlab workspace). Thanks!

like image 292
Carlos Borau Avatar asked Sep 27 '26 02:09

Carlos Borau


1 Answers

Yes! You can use OpenCV Image Viewer Plugin, which works with Android Studio. It displays the Mat in IDE with one click while debugging. No need to plot in the device :)

https://plugins.jetbrains.com/plugin/14371-opencv-image-viewer enter image description here

Disclaimer: I'm the author of this plugin

like image 81
dragon7 Avatar answered Sep 29 '26 20:09

dragon7



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!