[SOLVED] Determining barplot heights

Hi,

I have a barplot with many bars (from a scientific paper).  I would like to get the numbers associated with each bar (there is no table of numbers supplied).  I could do this manually (e.g. using an image visualization/manipulation program and determining pixel heights for the bars).  But is there an easy way to do this with the Image Processing nodes?  I would feed in an image and would specify how many units to which its height corresponds (i.e. I would remove the y-axis and just have the bars).  Then I would like a table with one entry per bar, giving its number of units (based on bar height).  Is that possible?

 

Many thanks in advance,

 

Andrew

 

Hi Andrew,

it really depends on the bar-chart. Can you provide an example image? Then I can show you how to do it (if possible).

Christian

 

Hi Christian,

I've attached a couple example images.  I've also attached an example of how I would crop the image prior to inputting (guessing this makes it easier for the image processing).

Thanks,

Andrew

Hi Andrew,

Looks pretty doable. By the way, you can do the cropping with KNIME Image Processing. I will compose a workflow for you during the weekend and upload it right here.

Greetings,

Christian

 

 

Hi Christian,

That's great, thanks a lot!  I could imagine it may be of broad interest.  I started out thinking there must be a tool out there to do this, but Google turned up nothing for me.

Greetings,

Andrew

Hi Andrew,

faster than expected, here you get the workflow (see attachment) ;-) It's just a demo workflow and needs some more tweaking, but I think it nicely demonstrates how to extract the height of the bar-charts.

If you have any further questions, I'm happy to help.

Christian

 

Hi Christian,

Thank you for the workflow!   I've run it and can see the heights when I open the last node (Interactive Segmentation View).  Just to make sure I didn't miss it: there is not a table where the numbers are printed, is there?  It's not a big deal-- having the numbers visible from the Segmentation View is already a huge help. 

I tried running the workflow on another barplot I have (unfortunately, I cannot share it) and got an error (goes back to the Segment Cropper not creating output-- warns that 'rows with missing cells (labeling) have been skipped').  I'll play around with it and try some other images to see if I can figure out what's going on.  Once I figure it out (or get stuck), I'll let you know.

Thanks again,

 

Andrew

 

 

 

Hi Andrew,

actually there is a table in the workflow. Just check the table after the Math Node.

A reason why your Workflow might fail, is that you have to "crop" the bar-chart in the interactive annotator (double click on the node or right-click -> configure, choose the rectangle and mark the barchart without axis).

Does this help?

Christian

 

Hi Christian,

Sorry, I did not look closely enough.  That does the trick.

Many thanks for this very nice tool!

Kind regards,

Andrew

Great! Let me know if I can further help you.


Christian