automeris-io / WebPlotDigitizer

Computer vision assisted tool to extract numerical data from plot images.
https://automeris.io
GNU Affero General Public License v3.0
2.58k stars 354 forks source link

Batch apply to multiple similar files with same parameters? #323

Open jucor opened 2 months ago

jucor commented 2 months ago

Hi! and thanks for such a great tool through the years :)

Is there a way to run the detection "in batch" to multiple files, after having fixed the axes and the grid and the masks and the datasets?

Use case: I have a hundreds of medical plots (like electrocardiograms), all produced by the same imager. They all have the same multiple axes in the exact same locations on all images, they have the same grid in the same locations, etc etc. What differs is just the actual curve(s). I found how to do it really well on a single image, but running it manually hundreds of time is going to be quite long. It would be terrific if I could do it for one image, save those parameters, and then say "apply to these other 400 images" :-)

Is there such a way? Happy to use any command-line call if easier!

jucor commented 2 months ago

Oh, I see some example here: https://github.com/automeris-io/WebPlotDigitizer/blob/master/node_examples/batch_process.js

I guess I should be able to fiddle with it that way. Not sure how to carry forward the same grid, though. Any idea please?

ankitrohatgi commented 2 months ago

This example shows how to set the calibration in code: https://github.com/automeris-io/WebPlotDigitizer/blob/master/node_examples/calibrate_xy.js

You can download the nodejs package that's needed here: https://automeris.io/downloads/wpd-4.6.tar.gz

This is not super well supported mainly because I don't run into this often, but I do see this coming up often. I have a few questions that would help develop this feature better. Do you mind if we discuss this some more over email?

jucor commented 2 months ago

Thanks for your reactivity! Absolutely, very happy to discuss by email!