I have image files of curved black lines on a white background. All the lines are different, but here is one example. The actual image is copyrighted; I cannot upload it. I have traced the line in MS Paint.
My end objective is to calculate the area under these curves using trapz, but first I must convert the y-coordinates to their 10th power, since they are in log scale. I see the first step as getting an array of coordinates that represent the lines.
This is my first time using Octave. I used imread to upload my image. It shows a matrix of 255s and 0s corresponding to my image. I tried
[yy xx] = find(img);
which I saw on another question (Calculate area under FFT graph in MATLAB), but when I entered
figure;plot(xx,yy,'.');
I got an image of two histogram-looking bars.
For my second try, I tried the top answer at
How do I calculate the area under a curve in an image with MATLAB?
However, the first line
[img,map] = imread('file.png')
returned img as uint8 of 178x373x3 and map as a double of 0x0.
Alternately, if there is a smarter way to solve my problem in R or Python, please point me in that direction.
Thanks for any help!