Get values of a Mat object
Hi guys,
I'm pretty stuck right now. My goal is the following one: JavaFX Image -> Mat -> byte values So I already made it to convert the image to a openCV mat, but I'm confused about the getter and setter methods of the Mat object. I mean, at a specific row and column, let' say X=30 and Y=20, I would get a array back, in all cases, for one value? Like this:
double[] arr = mat.get(j, i);
Why should I even consider to do this? And what's the point behind the getter method "mat.get(int col, int row, byte[] array)? I mean, what's that byte doing there?
Anyways, I want to manipulate specific mat values and I need a byte representation of each value. How would you do this?
I appreciate any help :)
rule 1: never attempt to do anything per pixel here.
what are you trying to achieve ? 99% probability, there's something "high-level", that lets you do this without "trying to defeat the devs", by doing the same in a more lame, error prone way.
I'd like to extract "image" (pixel...) values from certain spots of my images to manipulate and store them in a database. After that, I want to replace the old values by the new calculated values and convert the Mat object to a javafx Image again. Yea the thing with pixel. I realized fighting the opencv dev's will mostly goes a bad way.