OpenCFU icon indicating copy to clipboard operation
OpenCFU copied to clipboard

CFU per ROI

Open qgeissmann opened this issue 10 years ago • 14 comments

Should show CFU/ROI in the GUI and summary result file somehow.

qgeissmann avatar Mar 08 '14 18:03 qgeissmann

For displaying the result I propose: image1 N=32: roi1 N=2 roi2 N=30

implementation looks like this: screenshot from 2014-09-09 22 37 07

qgeissmann avatar Sep 09 '14 22:09 qgeissmann

@natl this solution (e5b0583dce68ba6da264b27128cda753bf4e33cf) conflicts with your solution to display clusters of colonies. we may want to take the discussion on github to keep track. For now, I have merged devel into your feature branch, and commented out your solution. everything seem to merge all right :)!

qgeissmann avatar Sep 09 '14 22:09 qgeissmann

Howdy:

Was this ever implemented? I have my petri plates set up into six sections that I'd like counted (I can easily get >100 colonies a section). As of now, it seems likes any colony which falls under a ROI receives a "ROI=1" tag but doesn't get differentiated between ROIs.

Cheers

danieljnilson avatar Nov 21 '16 15:11 danieljnilson

I am pretty sure I implemented this, but it sounds like either I didn't, or there is a bug. I'll try and reproduce the error tonight and get back to you with a fix.

natl avatar Nov 21 '16 15:11 natl

It appears to work with 2 ROIs but not more than two. I'll try and fool around with it and see if I get different results. From discussions of yours I read on github, it seemed like you did implement it.

Clarity Edit: When I have six ROIs, their results are grouped into two ROIs in the summary page. So 3 of my ROIs are "ROI 1" and the other 3 ROIs are "ROI 2"

On Mon, Nov 21, 2016 at 7:43 AM, Nathanael Lampe [email protected] wrote:

I am pretty sure I implemented this, but it sounds like either I didn't, or there is a bug. I'll try and reproduce the error tonight and get back to you with a fix.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/qgeissmann/OpenCFU/issues/1#issuecomment-261974093, or mute the thread https://github.com/notifications/unsubscribe-auth/AF8arCeNHtgYZtBlu-NZDjJQ_tOe75abks5rAbwsgaJpZM4Bn9xk .

danieljnilson avatar Nov 21 '16 15:11 danieljnilson

If you can send the image you're trying to classify, and a screenshot of the ROI's you're setting up I can try and reproduce the error.

It's worth noting that the clustering (as far as I remember) does not operate on individual ROI's, but on the ensemble of colonies that are valid (that is, it uses red colonies across all ROIs and yellow colonies across all ROIs to determine what is the extent of the red and yellow clusters, for example).

Just checking also that the ROI numbers return to normal when you disable the colour recognition?

natl avatar Nov 21 '16 16:11 natl

You can also try to replicate the bug on the sample image two-colours.jpg This is what I get with three ROIs, unless I'm missing something I can't reproduce your bug:

opencfu-cluster

I tried the same image with 7 ROI's and the summary page in the GUI recorded 7 ROI's, and saved the summary information correctly (unless I'm missing something).

A dump of the summary data for 7 ROI's is below, let me know if I'm missing something obvious.

ID, File_name, ROI, N_Objects, N_Excluded, Cluster1, Cluster2, Cluster3, Comment, Full_Path, ClusterDetail
0,"two-colours.jpg",1,10,1,7,3,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 7, 'r' : 110, 'g' : 45, 'b' : 44 },  2: { 'num' : 3, 'r' : 168, 'g' : 73, 'b' : 59 } }"
0,"two-colours.jpg",2,9,1,9,0,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 9, 'r' : 110, 'g' : 45, 'b' : 44 } }"
0,"two-colours.jpg",3,16,0,8,8,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 8, 'r' : 110, 'g' : 45, 'b' : 44 },  2: { 'num' : 8, 'r' : 168, 'g' : 73, 'b' : 59 } }"
0,"two-colours.jpg",4,7,0,4,3,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 4, 'r' : 110, 'g' : 45, 'b' : 44 },  2: { 'num' : 3, 'r' : 168, 'g' : 73, 'b' : 59 } }"
0,"two-colours.jpg",5,5,0,4,1,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 4, 'r' : 110, 'g' : 45, 'b' : 44 },  2: { 'num' : 1, 'r' : 168, 'g' : 73, 'b' : 59 } }"
0,"two-colours.jpg",6,6,0,6,0,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 6, 'r' : 110, 'g' : 45, 'b' : 44 } }"
0,"two-colours.jpg",7,2,0,2,0,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 2, 'r' : 110, 'g' : 45, 'b' : 44 } }"

natl avatar Nov 21 '16 16:11 natl

I'm on a WiFi Hotspot as I commute into work. I'll upload my image when I get on a solid (ethernet woo) connection. Cheers

On Nov 21, 2016 8:23 AM, "Nathanael Lampe" [email protected] wrote:

You can also try to replicate the bug on the sample image two-colours.jpg This is what I get with three ROIs, unless I'm missing something I can't reproduce your bug:

[image: opencfu-cluster] https://cloud.githubusercontent.com/assets/2887977/20490322/e99021d2-b00d-11e6-8acb-f3062be974d3.png

I tried the same image with 7 ROI's and the summary page in the GUI recorded 7 ROI's, and saved the summary information correctly (unless I'm missing something).

A dump of the summary data for 7 ROI's is below, let me know if I'm missing something obvious. """ ID, File_name, ROI, N_Objects, N_Excluded, Cluster1, Cluster2, Cluster3, Comment, Full_Path, ClusterDetail 0,"two-colours.jpg",1,10,1,7,3,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 7, 'r' : 110, 'g' : 45, 'b' : 44 }, 2: { 'num' : 3, 'r' : 168, 'g' : 73, 'b' : 59 } }" 0,"two-colours.jpg",2,9,1,9,0,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 9, 'r' : 110, 'g' : 45, 'b' : 44 } }" 0,"two-colours.jpg",3,16,0,8,8,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 8, 'r' : 110, 'g' : 45, 'b' : 44 }, 2: { 'num' : 8, 'r' : 168, 'g' : 73, 'b' : 59 } }" 0,"two-colours.jpg",4,7,0,4,3,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 4, 'r' : 110, 'g' : 45, 'b' : 44 }, 2: { 'num' : 3, 'r' : 168, 'g' : 73, 'b' : 59 } }" 0,"two-colours.jpg",5,5,0,4,1,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 4, 'r' : 110, 'g' : 45, 'b' : 44 }, 2: { 'num' : 1, 'r' : 168, 'g' : 73, 'b' : 59 } }" 0,"two-colours.jpg",6,6,0,6,0,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 6, 'r' : 110, 'g' : 45, 'b' : 44 } }" 0,"two-colours.jpg",7,2,0,2,0,0,"2016-11-21 [17:15:40]: no comment","/home/nlampe/gits/openCFU_openCV3/OpenCFU/samples/two-colours.jpg","{ 1: { 'num' : 2, 'r' : 110, 'g' : 45, 'b' : 44 } }" """

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/qgeissmann/OpenCFU/issues/1#issuecomment-261987081, or mute the thread https://github.com/notifications/unsubscribe-auth/AF8arNEIwAtDeWjHgRHPo3kIAVRVWEKCks5rAcVugaJpZM4Bn9xk .

danieljnilson avatar Nov 21 '16 16:11 danieljnilson

git_20161121_122848 20161121_111139

See here, data from part of the experiment. Six ROI's defined, but only 4 are listed by the computer. Exploring the data shows that some of the ROI's were merged. Am I missing something?

danieljnilson avatar Nov 21 '16 20:11 danieljnilson

That seems pretty bad. Thanks for reporting the issue @danieljnilson. I think we should try to see how independent from the GUI front-end the problem is. For instance, use a mask file and the CLI to see if we can reproduce this. I can give it a go as well later this week.

qgeissmann avatar Nov 21 '16 21:11 qgeissmann

@danieljnilson have you compiled OpenCFU from the git (master), or you are using your OS software repo?

qgeissmann avatar Nov 21 '16 21:11 qgeissmann

I am using the compiled git (master). I tried downloading from my OS software repo (Kubuntu) but it couldn't be found... Later on today if I have time, I'll make a ROI mask and try to use it through the CLI. If not, I'll experiment it with at around 8-9 PM PST. Cheers, I appreciate you looking into this so readily.

Edit: Kubuntu 16.10

danieljnilson avatar Nov 21 '16 21:11 danieljnilson

I tried to reproduce the error but I couldn't, neither with circle selections nor with convex hulls inside the GUI:

opencfu_convex_hulls opencfu-cluster_circles

Is there something I'm missing in how I'm trying to reproduce the bug? This is probably one for @qgeissmann to look into rather than me, but if it ends up being because of the colour clustering code somehow, I'll do what I can. I am compiling OpenCFU against OpenCV 2, in case that helps.

natl avatar Nov 22 '16 14:11 natl

No, you're (seemingly) doing exactly what I am doing. Now that I've been working on my raw data (over 100 image files, woo), I notice I can't consistently recreate the error. However, 90% of the time OpenCFU properly separates all six drawn ROIs in the summary. I was 'stress' testing the software yesterday by having it re-analyze images that were rotated at 0, 10, 45, and 100 degrees (for comparison of reported CFUs); I couldn't make the ROI bug consistently occur then either. I will update once I figure out what I must be doing in order to cause it to malfunction (?). Fortunately it seems to be mostly working with my real data.

danieljnilson avatar Nov 23 '16 17:11 danieljnilson