Good day Thomas,
I'm far from sure what you mean by "sensitivity" and "noise" in the context of curvature. Obviously, the main problem with general curvature measurements from spatially discrete images, is the discreteness of the signal. Consequently and in order to increase accuracy and precision (not the same), we need reasonable interpolation and I see no chance that this can be performed post hoc. With ImageJ I'd use "Interpolation" fom the "Selection"-menu with a reasonable interval setting. This may provide sufficiently small and perhaps even equal intervals for the computation of the required difference quotients. Not perfectly sure yet, but I'd then favour the curvature computation from polar coordinates as formulated here: <https://en.wikipedia.org/wiki/Curvature#Polar_coordinates> I think you could achieve this yourself by writing a little macro. Regards Herbie :::::::::::::::::::::::::::::::::::: Dear Bob, My reply is late because I had computer problems. The result of the plugin looks nice. In order to use it I would need two features 1) A parameter to tune the sensitivity. Right now it is not sensitive enough for my purpose. I am aware that an increase in sensitivity would make the result more noisy. But as with the plugin of Thomas I would do the smoothing afterwards. 2) A list of the curvature values along the circumference. Just looking at the nice result is not enough in my case. I have to extract numbers from this list. I am content with the plugin of Thomas. But as we say in German: the better is the enemy of the good. Best regards, Thomas -- Sent from: http://imagej.1557.x6.nabble.com/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Herbie,I have a post hoc processing step in my code. I smooth the reciprocal of the radius of curvature. I actually use a weighted power mean for that, as it seemed like the right thing to do, without much evidence.Bob
Sent from Smallbiz Yahoo Mail for iPhone On Monday, July 6, 2020, 1:20 AM, Herbie <[hidden email]> wrote: Good day Thomas, I'm far from sure what you mean by "sensitivity" and "noise" in the context of curvature. Obviously, the main problem with general curvature measurements from spatially discrete images, is the discreteness of the signal. Consequently and in order to increase accuracy and precision (not the same), we need reasonable interpolation and I see no chance that this can be performed post hoc. With ImageJ I'd use "Interpolation" fom the "Selection"-menu with a reasonable interval setting. This may provide sufficiently small and perhaps even equal intervals for the computation of the required difference quotients. Not perfectly sure yet, but I'd then favour the curvature computation from polar coordinates as formulated here: <https://en.wikipedia.org/wiki/Curvature#Polar_coordinates> I think you could achieve this yourself by writing a little macro. Regards Herbie :::::::::::::::::::::::::::::::::::: Dear Bob, My reply is late because I had computer problems. The result of the plugin looks nice. In order to use it I would need two features 1) A parameter to tune the sensitivity. Right now it is not sensitive enough for my purpose. I am aware that an increase in sensitivity would make the result more noisy. But as with the plugin of Thomas I would do the smoothing afterwards. 2) A list of the curvature values along the circumference. Just looking at the nice result is not enough in my case. I have to extract numbers from this list. I am content with the plugin of Thomas. But as we say in German: the better is the enemy of the good. Best regards, Thomas -- Sent from: http://imagej.1557.x6.nabble.com/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Robert Dougherty
Dear Bob and all others interested in this topic,
meanwhile I've coded a little macro that appears working reasonably well. As expected, the interpolation is crucial and it turns out that a reasonable angle increment, i.e. number of local curvature values, for the sample images (450x450) provided by Thomas Fischer is about one degree or better less. My present interpolation strategy for the sample images is: // run( "Create Selection" ); run( "Interpolate", "interval=4 smooth" ); run( "Fit Spline" ); run( "Interpolate", "interval=2 adjust" ); // Finally I decided not to use polar coordinates but parametrized coordinates: <https://en.wikipedia.org/wiki/Curvature#In_terms_of_a_general_parametrization> For the sample image "0453.tif" I get 390 values. Attached please find the results table as a text file. Results_0453.txt <http://imagej.1557.x6.nabble.com/file/t380516/Results_0453.txt> For comparison, I really should like to see the corresponding results of your approach. Regards Herbie ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Robert Dougherty wrote > Herbie,I have a post hoc processing step in my code. I smooth the > reciprocal of the radius of curvature. I actually use a weighted power > mean for that, as it seemed like the right thing to do, without much > evidence.Bob > > > Thomas,Thanks for the feedback and context. There are several things I > want to do with this, but I need to focus on my day job for a while.Bob > > > Sent from Smallbiz Yahoo Mail for iPhone > > > On Sunday, July 5, 2020, 10:14 AM, Thomas Fischer < > thmfischer@ > > wrote: > > Dear Bob, > > My reply is late because I had computer problems. The result of the plugin > looks nice. In order to use it I would need two features > 1) A parameter to tune the sensitivity. Right now it is not sensitive > enough for my purpose. I am aware that an increase in sensitivity would > make the result more noisy. But as with the plugin of Thomas I would do > the > smoothing afterwards. > 2) A list of the curvature values along the circumference. Just looking at > the nice result is not enough in my case. I have to extract numbers from > this list. > > I am content with the plugin of Thomas. But as we say in German: the > better > is the enemy of the good. > > Best regards, Thomas > > > > > > Am So., 5. Juli 2020 um 07:33 Uhr schrieb Robert Dougherty < > rpd@ > >: > >> Gabriel, >> Thanks. In case it matters, there is a new version with smoother >> calculation and a black background. >> Bob >> >> On Saturday, July 4, 2020, 11:33:56 AM PDT, Gabriel Landini < >> > g.landini@.ac >> wrote: >> >> Thanks Bob, I can confirm that it works fine. >> I think colourblind observers (red-green type) would see the green as >> some >> shades of yellow and blue as blue. At lease that is what the Dichromacy >> plugin >> shows. >> Regards >> >> Gabriel >> >> >> On Saturday, 4 July 2020 18:05:09 BST you wrote: >> > Gabriel, >> > In the meantime, I tried and failed to track down how ImageJ is >> supposed >> to >> > load the Phase LUT. Giving up, I changed the code to use another >> > sign-friendly LUT that I coded explicitly. Now Curvature displays the >> > results in green-blue. Going forward, it may be a question of which >> color >> > scheme is better. One could experiment by running the new version of >> > Curvature and then manually changing the LUT to Phase to simulate the >> old >> > version. Perhaps green-blue is better for colorblindness than the >> red-blue >> > scheme of Phase? >> > >> > Bob >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- Sent from: http://imagej.1557.x6.nabble.com/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Herbie,
enclosed are two plots one with Thomas' the other one with your code. The circles are the data. The line is a spline. With one little exception both codes find the same number of locations with negative curvatures. Your code produces much smoother data but does not run smoothly across the junction between begin and end of the data file. Please note that this junction is in the middle of the plot. Best, Thomas Am Mo., 6. Juli 2020 um 18:30 Uhr schrieb Herbie <[hidden email]>: > Dear Bob and all others interested in this topic, > > meanwhile I've coded a little macro that appears working reasonably well. > > As expected, the interpolation is crucial and it turns out that a > reasonable > angle increment, i.e. number of local curvature values, for the sample > images (450x450) provided by Thomas Fischer is about one degree or better > less. > > My present interpolation strategy for the sample images is: > > // > run( "Create Selection" ); > run( "Interpolate", "interval=4 smooth" ); > run( "Fit Spline" ); > run( "Interpolate", "interval=2 adjust" ); > // > > Finally I decided not to use polar coordinates but parametrized > coordinates: > < > https://en.wikipedia.org/wiki/Curvature#In_terms_of_a_general_parametrization > > > > For the sample image "0453.tif" I get 390 values. > Attached please find the results table as a text file. > Results_0453.txt > <http://imagej.1557.x6.nabble.com/file/t380516/Results_0453.txt> > > For comparison, I really should like to see the corresponding results of > your approach. > > Regards > > Herbie > ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: > > Robert Dougherty wrote > > Herbie,I have a post hoc processing step in my code. I smooth the > > reciprocal of the radius of curvature. I actually use a weighted power > > mean for that, as it seemed like the right thing to do, without much > > evidence.Bob > > > > > > Thomas,Thanks for the feedback and context. There are several things I > > want to do with this, but I need to focus on my day job for a while.Bob > > > > > > Sent from Smallbiz Yahoo Mail for iPhone > > > > > > On Sunday, July 5, 2020, 10:14 AM, Thomas Fischer < > > > thmfischer@ > > > > wrote: > > > > Dear Bob, > > > > My reply is late because I had computer problems. The result of the > plugin > > looks nice. In order to use it I would need two features > > 1) A parameter to tune the sensitivity. Right now it is not sensitive > > enough for my purpose. I am aware that an increase in sensitivity would > > make the result more noisy. But as with the plugin of Thomas I would do > > the > > smoothing afterwards. > > 2) A list of the curvature values along the circumference. Just looking > at > > the nice result is not enough in my case. I have to extract numbers from > > this list. > > > > I am content with the plugin of Thomas. But as we say in German: the > > better > > is the enemy of the good. > > > > Best regards, Thomas > > > > > > > > > > > > Am So., 5. Juli 2020 um 07:33 Uhr schrieb Robert Dougherty < > > > rpd@ > > > >: > > > >> Gabriel, > >> Thanks. In case it matters, there is a new version with smoother > >> calculation and a black background. > >> Bob > >> > >> On Saturday, July 4, 2020, 11:33:56 AM PDT, Gabriel Landini < > >> > > > g.landini@.ac > > >> wrote: > >> > >> Thanks Bob, I can confirm that it works fine. > >> I think colourblind observers (red-green type) would see the green as > >> some > >> shades of yellow and blue as blue. At lease that is what the Dichromacy > >> plugin > >> shows. > >> Regards > >> > >> Gabriel > >> > >> > >> On Saturday, 4 July 2020 18:05:09 BST you wrote: > >> > Gabriel, > >> > In the meantime, I tried and failed to track down how ImageJ is > >> supposed > >> to > >> > load the Phase LUT. Giving up, I changed the code to use another > >> > sign-friendly LUT that I coded explicitly. Now Curvature displays the > >> > results in green-blue. Going forward, it may be a question of which > >> color > >> > scheme is better. One could experiment by running the new version of > >> > Curvature and then manually changing the LUT to Phase to simulate the > >> old > >> > version. Perhaps green-blue is better for colorblindness than the > >> red-blue > >> > scheme of Phase? > >> > > >> > Bob > >> > >> -- > >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html > >> > >> > >> -- > >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html > >> > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > -- > Sent from: http://imagej.1557.x6.nabble.com/ > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Thomas
|
Dear Thomas,
as far as I can see, the announced plots are missing. "[...] does not run smoothly across the junction between begin and end of the data" Yes, there is a problem with the curvature-data around the start / end position (presently at the rightmost point of the lowest object border) and I'm not perfectly sure about its cause. Presently, I conjecture that the selection process is responsible for it which can't easily be changed. I have an idea how this problem can be circumvented, but hadn't time to implement it. However, the first step will be to ensure that the selection process is actually the main source of the problem. "Your code produces much smoother data [...]" The smoothness depends on the kind of spatial contour interpolation and I'm not aware of exact mathematical approaches to contour interpolations. My present and purely heuristic approach consists of the three operations: // run( "Interpolate", "interval=4 smooth" ); run( "Fit Spline" ); run( "Interpolate", "interval=2 adjust" ); // The first two operations are dominant. (Setting "interval" to a lower value means less smoothing...) It's up to you to decide, or even better, you explain how contours of spatially discrete and binary objects must be represented in order to compute the correct local contour curvatures. Regards Herbie :::::::::::::::::::::::::::::::::::::::::::: Am 07.07.20 um 11:48 schrieb Thomas Fischer: > Dear Herbie, > > enclosed are two plots one with Thomas' the other one with your code. The > circles are the data. The line is a spline. With one little exception both > codes find the same number of locations with negative curvatures. Your code > produces much smoother data but does not run smoothly across the junction > between begin and end of the data file. Please note that this junction is > in the middle of the plot. > > Best, Thomas > > Am Mo., 6. Juli 2020 um 18:30 Uhr schrieb Herbie <[hidden email]>: > >> Dear Bob and all others interested in this topic, >> >> meanwhile I've coded a little macro that appears working reasonably well. >> >> As expected, the interpolation is crucial and it turns out that a >> reasonable >> angle increment, i.e. number of local curvature values, for the sample >> images (450x450) provided by Thomas Fischer is about one degree or better >> less. >> >> My present interpolation strategy for the sample images is: >> >> // >> run( "Create Selection" ); >> run( "Interpolate", "interval=4 smooth" ); >> run( "Fit Spline" ); >> run( "Interpolate", "interval=2 adjust" ); >> // >> >> Finally I decided not to use polar coordinates but parametrized >> coordinates: >> < >> https://en.wikipedia.org/wiki/Curvature#In_terms_of_a_general_parametrization >>> >> >> For the sample image "0453.tif" I get 390 values. >> Attached please find the results table as a text file. >> Results_0453.txt >> <http://imagej.1557.x6.nabble.com/file/t380516/Results_0453.txt> >> >> For comparison, I really should like to see the corresponding results of >> your approach. >> >> Regards >> >> Herbie >> ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: >> >> Robert Dougherty wrote >>> Herbie,I have a post hoc processing step in my code. I smooth the >>> reciprocal of the radius of curvature. I actually use a weighted power >>> mean for that, as it seemed like the right thing to do, without much >>> evidence.Bob >>> >>> >>> Thomas,Thanks for the feedback and context. There are several things I >>> want to do with this, but I need to focus on my day job for a while.Bob >>> >>> >>> Sent from Smallbiz Yahoo Mail for iPhone >>> >>> >>> On Sunday, July 5, 2020, 10:14 AM, Thomas Fischer < >> >>> thmfischer@ >> >>> > wrote: >>> >>> Dear Bob, >>> >>> My reply is late because I had computer problems. The result of the >> plugin >>> looks nice. In order to use it I would need two features >>> 1) A parameter to tune the sensitivity. Right now it is not sensitive >>> enough for my purpose. I am aware that an increase in sensitivity would >>> make the result more noisy. But as with the plugin of Thomas I would do >>> the >>> smoothing afterwards. >>> 2) A list of the curvature values along the circumference. Just looking >> at >>> the nice result is not enough in my case. I have to extract numbers from >>> this list. >>> >>> I am content with the plugin of Thomas. But as we say in German: the >>> better >>> is the enemy of the good. >>> >>> Best regards, Thomas >>> >>> >>> >>> >>> >>> Am So., 5. Juli 2020 um 07:33 Uhr schrieb Robert Dougherty < >> >>> rpd@ >> >>> >: >>> >>>> Gabriel, >>>> Thanks. In case it matters, there is a new version with smoother >>>> calculation and a black background. >>>> Bob >>>> >>>> On Saturday, July 4, 2020, 11:33:56 AM PDT, Gabriel Landini < >>>> >> >>> g.landini@.ac >> >>>> wrote: >>>> >>>> Thanks Bob, I can confirm that it works fine. >>>> I think colourblind observers (red-green type) would see the green as >>>> some >>>> shades of yellow and blue as blue. At lease that is what the Dichromacy >>>> plugin >>>> shows. >>>> Regards >>>> >>>> Gabriel >>>> >>>> >>>> On Saturday, 4 July 2020 18:05:09 BST you wrote: >>>>> Gabriel, >>>>> In the meantime, I tried and failed to track down how ImageJ is >>>> supposed >>>> to >>>>> load the Phase LUT. Giving up, I changed the code to use another >>>>> sign-friendly LUT that I coded explicitly. Now Curvature displays the >>>>> results in green-blue. Going forward, it may be a question of which >>>> color >>>>> scheme is better. One could experiment by running the new version of >>>>> Curvature and then manually changing the LUT to Phase to simulate the >>>> old >>>>> version. Perhaps green-blue is better for colorblindness than the >>>> red-blue >>>>> scheme of Phase? >>>>> >>>>> Bob >>>> >>>> -- >>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>>> >>>> >>>> -- >>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>>> >>> >>> -- >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>> >>> >>> >>> >>> -- >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> >> >> >> >> >> -- >> Sent from: http://imagej.1557.x6.nabble.com/ >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
This may be irrelevant and ignorant, but I'll ask anyway: is the "interpolation" being done over a cyclic domain? If not, that would explain a glitch at the transition from end to start of the contour.
-- Kenneth Sloan [hidden email] Vision is the art of seeing what is invisible to others. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Kenneth,
your remark is to the point and was also made by Michael Schmid offlist. The problem is, that the spline is applied to a selection by a macro and therefore I see no easy way to avoid it. What I did and what allows me to reduce the glitch, is to also compute local curvatures from the same but rotated contour (180deg). From both results I can detect the problematic values and try to compensate them... Thanks for chiming in Herbie ::::::::::::::::::::::::::::::::::::::::::: Am 07.07.20 um 22:30 schrieb Kenneth Sloan: > This may be irrelevant and ignorant, but I'll ask anyway: is the "interpolation" being done over a cyclic domain? If not, that would explain a glitch at the transition from end to start of the contour. > > -- > Kenneth Sloan > [hidden email] > Vision is the art of seeing what is invisible to others. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by foxtango
Dear Thomas and all listers who are still interested in this topic,
attached please find my results (of sample image "0453.tif") without the previously discussed glitch. For the time being they represent the best I could achieve. "curvature2", "curvature3", and "curvature4" are results obtained with increasing smoothing of the underlying contour selection. As mentioned before, I have no idea what interpolation scheme is formally adequate and I'm still not sure if there exists such an scheme. (The graphs are now rotated about 180deg along the object circumference, in order to conform with the graphs provided earlier.) Best Herbie :::::::::::::::::::::::::::::::::::::::::::: Am 07.07.20 um 11:48 schrieb Thomas Fischer: > Dear Herbie, > > enclosed are two plots one with Thomas' the other one with your code. The > circles are the data. The line is a spline. With one little exception both > codes find the same number of locations with negative curvatures. Your code > produces much smoother data but does not run smoothly across the junction > between begin and end of the data file. Please note that this junction is > in the middle of the plot. > > Best, Thomas > > Am Mo., 6. Juli 2020 um 18:30 Uhr schrieb Herbie <[hidden email]>: > >> Dear Bob and all others interested in this topic, >> >> meanwhile I've coded a little macro that appears working reasonably well. >> >> As expected, the interpolation is crucial and it turns out that a >> reasonable >> angle increment, i.e. number of local curvature values, for the sample >> images (450x450) provided by Thomas Fischer is about one degree or better >> less. >> >> My present interpolation strategy for the sample images is: >> >> // >> run( "Create Selection" ); >> run( "Interpolate", "interval=4 smooth" ); >> run( "Fit Spline" ); >> run( "Interpolate", "interval=2 adjust" ); >> // >> >> Finally I decided not to use polar coordinates but parametrized >> coordinates: >> < >> https://en.wikipedia.org/wiki/Curvature#In_terms_of_a_general_parametrization >>> >> >> For the sample image "0453.tif" I get 390 values. >> Attached please find the results table as a text file. >> Results_0453.txt >> <http://imagej.1557.x6.nabble.com/file/t380516/Results_0453.txt> >> >> For comparison, I really should like to see the corresponding results of >> your approach. >> >> Regards >> >> Herbie >> ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: >> >> Robert Dougherty wrote >>> Herbie,I have a post hoc processing step in my code. I smooth the >>> reciprocal of the radius of curvature. I actually use a weighted power >>> mean for that, as it seemed like the right thing to do, without much >>> evidence.Bob >>> >>> >>> Thomas,Thanks for the feedback and context. There are several things I >>> want to do with this, but I need to focus on my day job for a while.Bob >>> >>> >>> Sent from Smallbiz Yahoo Mail for iPhone >>> >>> >>> On Sunday, July 5, 2020, 10:14 AM, Thomas Fischer < >> >>> thmfischer@ >> >>> > wrote: >>> >>> Dear Bob, >>> >>> My reply is late because I had computer problems. The result of the >> plugin >>> looks nice. In order to use it I would need two features >>> 1) A parameter to tune the sensitivity. Right now it is not sensitive >>> enough for my purpose. I am aware that an increase in sensitivity would >>> make the result more noisy. But as with the plugin of Thomas I would do >>> the >>> smoothing afterwards. >>> 2) A list of the curvature values along the circumference. Just looking >> at >>> the nice result is not enough in my case. I have to extract numbers from >>> this list. >>> >>> I am content with the plugin of Thomas. But as we say in German: the >>> better >>> is the enemy of the good. >>> >>> Best regards, Thomas >>> >>> >>> >>> >>> >>> Am So., 5. Juli 2020 um 07:33 Uhr schrieb Robert Dougherty < >> >>> rpd@ >> >>> >: >>> >>>> Gabriel, >>>> Thanks. In case it matters, there is a new version with smoother >>>> calculation and a black background. >>>> Bob >>>> >>>> On Saturday, July 4, 2020, 11:33:56 AM PDT, Gabriel Landini < >>>> >> >>> g.landini@.ac >> >>>> wrote: >>>> >>>> Thanks Bob, I can confirm that it works fine. >>>> I think colourblind observers (red-green type) would see the green as >>>> some >>>> shades of yellow and blue as blue. At lease that is what the Dichromacy >>>> plugin >>>> shows. >>>> Regards >>>> >>>> Gabriel >>>> >>>> >>>> On Saturday, 4 July 2020 18:05:09 BST you wrote: >>>>> Gabriel, >>>>> In the meantime, I tried and failed to track down how ImageJ is >>>> supposed >>>> to >>>>> load the Phase LUT. Giving up, I changed the code to use another >>>>> sign-friendly LUT that I coded explicitly. Now Curvature displays the >>>>> results in green-blue. Going forward, it may be a question of which >>>> color >>>>> scheme is better. One could experiment by running the new version of >>>>> Curvature and then manually changing the LUT to Phase to simulate the >>>> old >>>>> version. Perhaps green-blue is better for colorblindness than the >>>> red-blue >>>>> scheme of Phase? >>>>> >>>>> Bob >>>> >>>> -- >>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>>> >>>> >>>> -- >>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>>> >>> >>> -- >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>> >>> >>> >>> >>> -- >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> >> >> >> >> >> -- >> Sent from: http://imagej.1557.x6.nabble.com/ >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html Curvature2_0453.png (19K) Download Attachment Curvature3_0453.png (18K) Download Attachment Curvature4_0453.png (17K) Download Attachment 0453.tif (271K) Download Attachment |
In reply to this post by foxtango
Thomas,
I have updated the plugin at http://www.optinav.info/Curvature.htm. Version 5 shows tabular output and is probably more accurate than my earlier version. Bob On Sunday, July 5, 2020, 10:14:07 AM PDT, Thomas Fischer <[hidden email]> wrote: Dear Bob, My reply is late because I had computer problems. The result of the plugin looks nice. In order to use it I would need two features 1) A parameter to tune the sensitivity. Right now it is not sensitive enough for my purpose. I am aware that an increase in sensitivity would make the result more noisy. But as with the plugin of Thomas I would do the smoothing afterwards. 2) A list of the curvature values along the circumference. Just looking at the nice result is not enough in my case. I have to extract numbers from this list. I am content with the plugin of Thomas. But as we say in German: the better is the enemy of the good. Best regards, Thomas Am So., 5. Juli 2020 um 07:33 Uhr schrieb Robert Dougherty <[hidden email] >: > Gabriel, > Thanks. In case it matters, there is a new version with smoother > calculation and a black background. > Bob > > On Saturday, July 4, 2020, 11:33:56 AM PDT, Gabriel Landini < > [hidden email]> wrote: > > Thanks Bob, I can confirm that it works fine. > I think colourblind observers (red-green type) would see the green as some > shades of yellow and blue as blue. At lease that is what the Dichromacy > plugin > shows. > Regards > > Gabriel > > > On Saturday, 4 July 2020 18:05:09 BST you wrote: > > Gabriel, > > In the meantime, I tried and failed to track down how ImageJ is supposed > to > > load the Phase LUT. Giving up, I changed the code to use another > > sign-friendly LUT that I coded explicitly. Now Curvature displays the > > results in green-blue. Going forward, it may be a question of which color > > scheme is better. One could experiment by running the new version of > > Curvature and then manually changing the LUT to Phase to simulate the old > > version. Perhaps green-blue is better for colorblindness than the > red-blue > > scheme of Phase? > > > > Bob > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear all,
I really enjoyed this thread. I'm right in the assumption that in the end to get the curvature you're sampling the contour with a number of points and use 3 consecutive points to retrieve the radius of curvature? If, so, how do you set the distance between those points, as for small values you will run into noise... Le sam. 11 juil. 2020 à 08:02, Robert Dougherty <[hidden email]> a écrit : > Thomas, > I have updated the plugin at http://www.optinav.info/Curvature.htm. > Version 5 shows tabular output and is probably more accurate than my > earlier version. > > Bob > > > > > On Sunday, July 5, 2020, 10:14:07 AM PDT, Thomas Fischer < > [hidden email]> wrote: > > Dear Bob, > > My reply is late because I had computer problems. The result of the plugin > looks nice. In order to use it I would need two features > 1) A parameter to tune the sensitivity. Right now it is not sensitive > enough for my purpose. I am aware that an increase in sensitivity would > make the result more noisy. But as with the plugin of Thomas I would do the > smoothing afterwards. > 2) A list of the curvature values along the circumference. Just looking at > the nice result is not enough in my case. I have to extract numbers from > this list. > > I am content with the plugin of Thomas. But as we say in German: the better > is the enemy of the good. > > Best regards, Thomas > > > > > > Am So., 5. Juli 2020 um 07:33 Uhr schrieb Robert Dougherty < > [hidden email] > >: > > > Gabriel, > > Thanks. In case it matters, there is a new version with smoother > > calculation and a black background. > > Bob > > > > On Saturday, July 4, 2020, 11:33:56 AM PDT, Gabriel Landini < > > [hidden email]> wrote: > > > > Thanks Bob, I can confirm that it works fine. > > I think colourblind observers (red-green type) would see the green as > some > > shades of yellow and blue as blue. At lease that is what the Dichromacy > > plugin > > shows. > > Regards > > > > Gabriel > > > > > > On Saturday, 4 July 2020 18:05:09 BST you wrote: > > > Gabriel, > > > In the meantime, I tried and failed to track down how ImageJ is > supposed > > to > > > load the Phase LUT. Giving up, I changed the code to use another > > > sign-friendly LUT that I coded explicitly. Now Curvature displays the > > > results in green-blue. Going forward, it may be a question of which > color > > > scheme is better. One could experiment by running the new version of > > > Curvature and then manually changing the LUT to Phase to simulate the > old > > > version. Perhaps green-blue is better for colorblindness than the > > red-blue > > > scheme of Phase? > > > > > > Bob > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Bonjour Fabrice,
as stated earlier already, the main problem, given a binary-valued object, is to obtain a suitable description of the object contour. This description requires interpolation and perhaps smoothing of the sampled object's border points. I'm not aware of a unique mathematically exact approach for this task. Consequently, this first step or pre-processing is based on heuristics. To obtain local curvatures from a contour description, exact numeric methods can be applied. Numeric, not analytic, because differentials are approximated by quotients of differences. However, I would not denote the approximation effects as noise. With ImageJ it is possible to obtain selections or RoIs, i.e. contour descriptions, that show near to evenly spaced sample points having, of course, real-valued coordinates. From contour descriptions showing such parametrized coordinates, local curvatures can be obtained according to <https://en.wikipedia.org/wiki/Curvature#In_terms_of_a_general_parametrization> The many investigations of mine since the beginning of this thread show that the main problem really is in the pre-processing stage: Curvatures strongly depend on how the contour description is computed. Even minor parameter changes in the pre-processing can have dramatic effects on the local curvatures. That said, I've not yet decided about an adequate ImageJ-based heuristic for the pre-processing. Thanks for your interest Herbie ::::::::::::::::::::::::::::::::::::::::::: Am 11.07.20 um 13:26 schrieb Fabrice Senger: > Dear all, > I really enjoyed this thread. I'm right in the assumption that in the end > to get the curvature you're sampling the contour with a number of points > and use 3 consecutive points to retrieve the radius of curvature? If, so, > how do you set the distance between those points, as for small values you > will run into noise... > > Le sam. 11 juil. 2020 à 08:02, Robert Dougherty <[hidden email]> a écrit : > >> Thomas, >> I have updated the plugin at http://www.optinav.info/Curvature.htm. >> Version 5 shows tabular output and is probably more accurate than my >> earlier version. >> >> Bob >> >> >> >> >> On Sunday, July 5, 2020, 10:14:07 AM PDT, Thomas Fischer < >> [hidden email]> wrote: >> >> Dear Bob, >> >> My reply is late because I had computer problems. The result of the plugin >> looks nice. In order to use it I would need two features >> 1) A parameter to tune the sensitivity. Right now it is not sensitive >> enough for my purpose. I am aware that an increase in sensitivity would >> make the result more noisy. But as with the plugin of Thomas I would do the >> smoothing afterwards. >> 2) A list of the curvature values along the circumference. Just looking at >> the nice result is not enough in my case. I have to extract numbers from >> this list. >> >> I am content with the plugin of Thomas. But as we say in German: the better >> is the enemy of the good. >> >> Best regards, Thomas >> >> >> >> >> >> Am So., 5. Juli 2020 um 07:33 Uhr schrieb Robert Dougherty < >> [hidden email] >>> : >> >>> Gabriel, >>> Thanks. In case it matters, there is a new version with smoother >>> calculation and a black background. >>> Bob >>> >>> On Saturday, July 4, 2020, 11:33:56 AM PDT, Gabriel Landini < >>> [hidden email]> wrote: >>> >>> Thanks Bob, I can confirm that it works fine. >>> I think colourblind observers (red-green type) would see the green as >> some >>> shades of yellow and blue as blue. At lease that is what the Dichromacy >>> plugin >>> shows. >>> Regards >>> >>> Gabriel >>> >>> >>> On Saturday, 4 July 2020 18:05:09 BST you wrote: >>>> Gabriel, >>>> In the meantime, I tried and failed to track down how ImageJ is >> supposed >>> to >>>> load the Phase LUT. Giving up, I changed the code to use another >>>> sign-friendly LUT that I coded explicitly. Now Curvature displays the >>>> results in green-blue. Going forward, it may be a question of which >> color >>>> scheme is better. One could experiment by running the new version of >>>> Curvature and then manually changing the LUT to Phase to simulate the >> old >>>> version. Perhaps green-blue is better for colorblindness than the >>> red-blue >>>> scheme of Phase? >>>> >>>> Bob >>> >>> -- >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>> >>> >>> -- >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>> >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by fabrice senger-2
Fabrice,I’m taking a different approach from Herbie and Thomas. For each point, I define the radius of curvature using a circle containing that point and two other points in the polygon. (Actually I apply 3-point smoothing to the pixel polygon from "Wand" to produce the source data.) The trick is to choose which other two points. If the object is supposed to be a circle, then the best points for accuracy are far away, not close! If the shape is more complicated than a circle, then the points have to be closer together, but if they are too close, then the result is noisy. I'm still working on the selection algorithm. I just had an aha moment that the points must not bridge inflection points. This is not yet implemented in my posted code, version 5. I expect it will be in version 6.
Bob Sent from Smallbiz Yahoo Mail for iPhonet On Saturday, July 11, 2020, 4:27 AM, Fabrice Senger <[hidden email]> wrote: Dear all, I really enjoyed this thread. I'm right in the assumption that in the end to get the curvature you're sampling the contour with a number of points and use 3 consecutive points to retrieve the radius of curvature? If, so, how do you set the distance between those points, as for small values you will run into noise... Le sam. 11 juil. 2020 à 08:02, Robert Dougherty <[hidden email]> a écrit : > Thomas, > I have updated the plugin at http://www.optinav.info/Curvature.htm. > Version 5 shows tabular output and is probably more accurate than my > earlier version. > > Bob > > > > > On Sunday, July 5, 2020, 10:14:07 AM PDT, Thomas Fischer < > [hidden email]> wrote: > > Dear Bob, > > My reply is late because I had computer problems. The result of the plugin > looks nice. In order to use it I would need two features > 1) A parameter to tune the sensitivity. Right now it is not sensitive > enough for my purpose. I am aware that an increase in sensitivity would > make the result more noisy. But as with the plugin of Thomas I would do the > smoothing afterwards. > 2) A list of the curvature values along the circumference. Just looking at > the nice result is not enough in my case. I have to extract numbers from > this list. > > I am content with the plugin of Thomas. But as we say in German: the better > is the enemy of the good. > > Best regards, Thomas > > > > > > Am So., 5. Juli 2020 um 07:33 Uhr schrieb Robert Dougherty < > [hidden email] > >: > > > Gabriel, > > Thanks. In case it matters, there is a new version with smoother > > calculation and a black background. > > Bob > > > > On Saturday, July 4, 2020, 11:33:56 AM PDT, Gabriel Landini < > > [hidden email]> wrote: > > > > Thanks Bob, I can confirm that it works fine. > > I think colourblind observers (red-green type) would see the green as > some > > shades of yellow and blue as blue. At lease that is what the Dichromacy > > plugin > > shows. > > Regards > > > > Gabriel > > > > > > On Saturday, 4 July 2020 18:05:09 BST you wrote: > > > Gabriel, > > > In the meantime, I tried and failed to track down how ImageJ is > supposed > > to > > > load the Phase LUT. Giving up, I changed the code to use another > > > sign-friendly LUT that I coded explicitly. Now Curvature displays the > > > results in green-blue. Going forward, it may be a question of which > color > > > scheme is better. One could experiment by running the new version of > > > Curvature and then manually changing the LUT to Phase to simulate the > old > > > version. Perhaps green-blue is better for colorblindness than the > > red-blue > > > scheme of Phase? > > > > > > Bob > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Ha ha yes if you don't want to run into infinity
Le sam. 11 juil. 2020 à 19:12, Robert Dougherty <[hidden email]> a écrit : > Fabrice,I’m taking a different approach from Herbie and Thomas. For each > point, I define the radius of curvature using a circle containing that > point and two other points in the polygon. (Actually I apply 3-point > smoothing to the pixel polygon from "Wand" to produce the source data.) The > trick is to choose which other two points. If the object is supposed to be > a circle, then the best points for accuracy are far away, not close! If > the shape is more complicated than a circle, then the points have to be > closer together, but if they are too close, then the result is noisy. I'm > still working on the selection algorithm. I just had an aha moment that > the points must not bridge inflection points. This is not yet implemented > in my posted code, version 5. I expect it will be in version 6. > Bob > > > Sent from Smallbiz Yahoo Mail for iPhonet > > > On Saturday, July 11, 2020, 4:27 AM, Fabrice Senger < > [hidden email]> wrote: > > Dear all, > I really enjoyed this thread. I'm right in the assumption that in the end > to get the curvature you're sampling the contour with a number of points > and use 3 consecutive points to retrieve the radius of curvature? If, so, > how do you set the distance between those points, as for small values you > will run into noise... > > Le sam. 11 juil. 2020 à 08:02, Robert Dougherty <[hidden email]> a écrit > : > > > Thomas, > > I have updated the plugin at http://www.optinav.info/Curvature.htm. > > Version 5 shows tabular output and is probably more accurate than my > > earlier version. > > > > Bob > > > > > > > > > > On Sunday, July 5, 2020, 10:14:07 AM PDT, Thomas Fischer < > > [hidden email]> wrote: > > > > Dear Bob, > > > > My reply is late because I had computer problems. The result of the > plugin > > looks nice. In order to use it I would need two features > > 1) A parameter to tune the sensitivity. Right now it is not sensitive > > enough for my purpose. I am aware that an increase in sensitivity would > > make the result more noisy. But as with the plugin of Thomas I would do > the > > smoothing afterwards. > > 2) A list of the curvature values along the circumference. Just looking > at > > the nice result is not enough in my case. I have to extract numbers from > > this list. > > > > I am content with the plugin of Thomas. But as we say in German: the > better > > is the enemy of the good. > > > > Best regards, Thomas > > > > > > > > > > > > Am So., 5. Juli 2020 um 07:33 Uhr schrieb Robert Dougherty < > > [hidden email] > > >: > > > > > Gabriel, > > > Thanks. In case it matters, there is a new version with smoother > > > calculation and a black background. > > > Bob > > > > > > On Saturday, July 4, 2020, 11:33:56 AM PDT, Gabriel Landini < > > > [hidden email]> wrote: > > > > > > Thanks Bob, I can confirm that it works fine. > > > I think colourblind observers (red-green type) would see the green as > > some > > > shades of yellow and blue as blue. At lease that is what the Dichromacy > > > plugin > > > shows. > > > Regards > > > > > > Gabriel > > > > > > > > > On Saturday, 4 July 2020 18:05:09 BST you wrote: > > > > Gabriel, > > > > In the meantime, I tried and failed to track down how ImageJ is > > supposed > > > to > > > > load the Phase LUT. Giving up, I changed the code to use another > > > > sign-friendly LUT that I coded explicitly. Now Curvature displays > the > > > > results in green-blue. Going forward, it may be a question of which > > color > > > > scheme is better. One could experiment by running the new version of > > > > Curvature and then manually changing the LUT to Phase to simulate the > > old > > > > version. Perhaps green-blue is better for colorblindness than the > > > red-blue > > > > scheme of Phase? > > > > > > > > Bob > > > > > > -- > > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > > > > -- > > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi herbie,
I understand your wish to tackle a rigorously posed mathematical problem. Here are two suggestions. 1) find the curvatures along the outline of a binary object in a wavelength range given in fractions of the length of the outline. The second goes back to what you may have meant in your first answer in this thread. 2) calculate the minimum number of Fourier Descriptors necessary to match the shape in such a way that the sum of the pixels outside the Fourier outline plus the white pixels inside the Fourier outline is below a threshold given in fractions of the area of the object. Of course, heuristic or experience however named enters in the choice of the Parameters and where the thresholds are set. Best, Thomas Am Sa., 11. Juli 2020 um 19:24 Uhr schrieb Fabrice Senger < [hidden email]>: > Ha ha yes if you don't want to run into infinity > > Le sam. 11 juil. 2020 à 19:12, Robert Dougherty <[hidden email]> a écrit > : > > > Fabrice,I’m taking a different approach from Herbie and Thomas. For each > > point, I define the radius of curvature using a circle containing that > > point and two other points in the polygon. (Actually I apply 3-point > > smoothing to the pixel polygon from "Wand" to produce the source data.) > The > > trick is to choose which other two points. If the object is supposed to > be > > a circle, then the best points for accuracy are far away, not close! If > > the shape is more complicated than a circle, then the points have to be > > closer together, but if they are too close, then the result is noisy. > I'm > > still working on the selection algorithm. I just had an aha moment that > > the points must not bridge inflection points. This is not yet implemented > > in my posted code, version 5. I expect it will be in version 6. > > Bob > > > > > > Sent from Smallbiz Yahoo Mail for iPhonet > > > > > > On Saturday, July 11, 2020, 4:27 AM, Fabrice Senger < > > [hidden email]> wrote: > > > > Dear all, > > I really enjoyed this thread. I'm right in the assumption that in the end > > to get the curvature you're sampling the contour with a number of points > > and use 3 consecutive points to retrieve the radius of curvature? If, so, > > how do you set the distance between those points, as for small values you > > will run into noise... > > > > Le sam. 11 juil. 2020 à 08:02, Robert Dougherty <[hidden email]> a > écrit > > : > > > > > Thomas, > > > I have updated the plugin at http://www.optinav.info/Curvature.htm. > > > Version 5 shows tabular output and is probably more accurate than my > > > earlier version. > > > > > > Bob > > > > > > > > > > > > > > > On Sunday, July 5, 2020, 10:14:07 AM PDT, Thomas Fischer < > > > [hidden email]> wrote: > > > > > > Dear Bob, > > > > > > My reply is late because I had computer problems. The result of the > > plugin > > > looks nice. In order to use it I would need two features > > > 1) A parameter to tune the sensitivity. Right now it is not sensitive > > > enough for my purpose. I am aware that an increase in sensitivity would > > > make the result more noisy. But as with the plugin of Thomas I would do > > the > > > smoothing afterwards. > > > 2) A list of the curvature values along the circumference. Just looking > > at > > > the nice result is not enough in my case. I have to extract numbers > from > > > this list. > > > > > > I am content with the plugin of Thomas. But as we say in German: the > > better > > > is the enemy of the good. > > > > > > Best regards, Thomas > > > > > > > > > > > > > > > > > > Am So., 5. Juli 2020 um 07:33 Uhr schrieb Robert Dougherty < > > > [hidden email] > > > >: > > > > > > > Gabriel, > > > > Thanks. In case it matters, there is a new version with smoother > > > > calculation and a black background. > > > > Bob > > > > > > > > On Saturday, July 4, 2020, 11:33:56 AM PDT, Gabriel Landini < > > > > [hidden email]> wrote: > > > > > > > > Thanks Bob, I can confirm that it works fine. > > > > I think colourblind observers (red-green type) would see the green as > > > some > > > > shades of yellow and blue as blue. At lease that is what the > Dichromacy > > > > plugin > > > > shows. > > > > Regards > > > > > > > > Gabriel > > > > > > > > > > > > On Saturday, 4 July 2020 18:05:09 BST you wrote: > > > > > Gabriel, > > > > > In the meantime, I tried and failed to track down how ImageJ is > > > supposed > > > > to > > > > > load the Phase LUT. Giving up, I changed the code to use another > > > > > sign-friendly LUT that I coded explicitly. Now Curvature displays > > the > > > > > results in green-blue. Going forward, it may be a question of which > > > color > > > > > scheme is better. One could experiment by running the new version > of > > > > > Curvature and then manually changing the LUT to Phase to simulate > the > > > old > > > > > version. Perhaps green-blue is better for colorblindness than the > > > > red-blue > > > > > scheme of Phase? > > > > > > > > > > Bob > > > > > > > > -- > > > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > > > > > > > -- > > > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > > > > > -- > > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > > > > -- > > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Thomas
|
Dear Thomas!
re 1: As far as I understand, the problem of contour finding isn't solved by this approach. But I must admit that I don't understand what "wavelength" means in this context. re 2: Although a bit heuristic, this approach appears worth being considered. Presently, I try to convert my approach to an IJ-plugin. However, I can't really get rid of the "start end"-glitch... Regards Herbie :::::::::::::::::::::::::::::::::::::::::::: Am 12.07.20 um 18:20 schrieb Thomas Fischer: > Hi herbie, > > I understand your wish to tackle a rigorously posed mathematical problem. > Here are two suggestions. > 1) find the curvatures along the outline of a binary object in a wavelength > range given in fractions of the length of the outline. > The second goes back to what you may have meant in your first answer in > this thread. > 2) calculate the minimum number of Fourier Descriptors necessary to match > the shape in such a way that the sum of the pixels outside the Fourier > outline plus the white pixels inside the Fourier outline is below a > threshold given in fractions of the area of the object. > > Of course, heuristic or experience however named enters in the choice of > the Parameters and where the thresholds are set. > > Best, Thomas > > Am Sa., 11. Juli 2020 um 19:24 Uhr schrieb Fabrice Senger < > [hidden email]>: > >> Ha ha yes if you don't want to run into infinity >> >> Le sam. 11 juil. 2020 à 19:12, Robert Dougherty <[hidden email]> a écrit >> : >> >>> Fabrice,I’m taking a different approach from Herbie and Thomas. For each >>> point, I define the radius of curvature using a circle containing that >>> point and two other points in the polygon. (Actually I apply 3-point >>> smoothing to the pixel polygon from "Wand" to produce the source data.) >> The >>> trick is to choose which other two points. If the object is supposed to >> be >>> a circle, then the best points for accuracy are far away, not close! If >>> the shape is more complicated than a circle, then the points have to be >>> closer together, but if they are too close, then the result is noisy. >> I'm >>> still working on the selection algorithm. I just had an aha moment that >>> the points must not bridge inflection points. This is not yet implemented >>> in my posted code, version 5. I expect it will be in version 6. >>> Bob >>> >>> >>> Sent from Smallbiz Yahoo Mail for iPhonet >>> >>> >>> On Saturday, July 11, 2020, 4:27 AM, Fabrice Senger < >>> [hidden email]> wrote: >>> >>> Dear all, >>> I really enjoyed this thread. I'm right in the assumption that in the end >>> to get the curvature you're sampling the contour with a number of points >>> and use 3 consecutive points to retrieve the radius of curvature? If, so, >>> how do you set the distance between those points, as for small values you >>> will run into noise... >>> >>> Le sam. 11 juil. 2020 à 08:02, Robert Dougherty <[hidden email]> a >> écrit >>> : >>> >>>> Thomas, >>>> I have updated the plugin at http://www.optinav.info/Curvature.htm. >>>> Version 5 shows tabular output and is probably more accurate than my >>>> earlier version. >>>> >>>> Bob >>>> >>>> >>>> >>>> >>>> On Sunday, July 5, 2020, 10:14:07 AM PDT, Thomas Fischer < >>>> [hidden email]> wrote: >>>> >>>> Dear Bob, >>>> >>>> My reply is late because I had computer problems. The result of the >>> plugin >>>> looks nice. In order to use it I would need two features >>>> 1) A parameter to tune the sensitivity. Right now it is not sensitive >>>> enough for my purpose. I am aware that an increase in sensitivity would >>>> make the result more noisy. But as with the plugin of Thomas I would do >>> the >>>> smoothing afterwards. >>>> 2) A list of the curvature values along the circumference. Just looking >>> at >>>> the nice result is not enough in my case. I have to extract numbers >> from >>>> this list. >>>> >>>> I am content with the plugin of Thomas. But as we say in German: the >>> better >>>> is the enemy of the good. >>>> >>>> Best regards, Thomas >>>> >>>> >>>> >>>> >>>> >>>> Am So., 5. Juli 2020 um 07:33 Uhr schrieb Robert Dougherty < >>>> [hidden email] >>>>> : >>>> >>>>> Gabriel, >>>>> Thanks. In case it matters, there is a new version with smoother >>>>> calculation and a black background. >>>>> Bob >>>>> >>>>> On Saturday, July 4, 2020, 11:33:56 AM PDT, Gabriel Landini < >>>>> [hidden email]> wrote: >>>>> >>>>> Thanks Bob, I can confirm that it works fine. >>>>> I think colourblind observers (red-green type) would see the green as >>>> some >>>>> shades of yellow and blue as blue. At lease that is what the >> Dichromacy >>>>> plugin >>>>> shows. >>>>> Regards >>>>> >>>>> Gabriel >>>>> >>>>> >>>>> On Saturday, 4 July 2020 18:05:09 BST you wrote: >>>>>> Gabriel, >>>>>> In the meantime, I tried and failed to track down how ImageJ is >>>> supposed >>>>> to >>>>>> load the Phase LUT. Giving up, I changed the code to use another >>>>>> sign-friendly LUT that I coded explicitly. Now Curvature displays >>> the >>>>>> results in green-blue. Going forward, it may be a question of which >>>> color >>>>>> scheme is better. One could experiment by running the new version >> of >>>>>> Curvature and then manually changing the LUT to Phase to simulate >> the >>>> old >>>>>> version. Perhaps green-blue is better for colorblindness than the >>>>> red-blue >>>>>> scheme of Phase? >>>>>> >>>>>> Bob >>>>> >>>>> -- >>>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>>>> >>>>> >>>>> -- >>>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>>>> >>>> >>>> -- >>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>>> >>>> >>>> -- >>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>>> >>> >>> -- >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>> >>> >>> >>> -- >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>> >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Robert Dougherty
Fabrice, Thomas, Thomas, Herbie, Gabriel, and others who might be following this,
I just posted Version 6 of my curvature plugin at http://www.optinav.info/Curvature.htm I hope it is finished. My ulterior motive in writing this was that the curvature subject reminded me of the Kelvin effect in evaporating respiratory droplets that are trying to propagate COVID-19. I realize that this is probably not the OP application. Also, [1] suggests the Kelvin effect becomes important for droplets smaller than 0.5 microns, and this is pretty small for this case. Even (dried) talking droplets are 0.9 microns or so. Anyway, it is what it is. An introduction to this subject can be found under "Interesting Video" on the top of http://www.optinav.info/ I'd like feedback from biologists. Bob 1. Marr, L. C., Tang, J. W., Van Mullekom, J., & Lakdawala, S. S. (2019). Mechanistic insights into the effect of humidity on airborne influenza virus survival, transmission and incidence. Journal of the Royal Society Interface, 16(150), 20180298. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Bob, and thanks for the plugin.
I tried to compile and run it in the Fiji script editor (in part to learn how to do it, mostly I use python). After installing openjdk-8 ,when I run it I get the following error: java.lang.ArrayIndexOutOfBoundsException. So I decided to try to see where this happens. First thing I did was to make the pixels not square, and I indeed get the warning message about that. So I knew that it is running at least that far. Then I added another showMessage right after that one (actually I started lower down and worked my way up), like so: if(pw != ph){ IJ.showMessage("Warning: pixel height and width in the image calibration differ.\n"+ "This plugin is not designed for that. The pixel width \n"+ "will be used and the pixel height will be ignored."); IJ.showMessage("does this print"); // line that I added } And in this case, the first warning pops up, but the second one that I added does not, and I get the java.lang.ArrayIndexOutOfBoundsException I dont know Java, but this seems very strange to me Thanks in advance for any assistance --aryeh On 13/07/2020 06:36, Robert Dougherty wrote: > Fabrice, Thomas, Thomas, Herbie, Gabriel, and others who might be following this, > > I just posted Version 6 of my curvature plugin at http://www.optinav.info/Curvature.htm I hope it is finished. > My ulterior motive in writing this was that the curvature subject reminded me of the Kelvin effect in evaporating respiratory droplets that are trying to propagate COVID-19. I realize that this is probably not the OP application. Also, [1] suggests the Kelvin effect becomes important for droplets smaller than 0.5 microns, and this is pretty small for this case. Even (dried) talking droplets are 0.9 microns or so. Anyway, it is what it is. An introduction to this subject can be found under "Interesting Video" on the top of http://www.optinav.info/ I'd like feedback from biologists. > > Bob > 1. Marr, L. C., Tang, J. W., Van Mullekom, J., & Lakdawala, S. S. (2019). Mechanistic insights into the effect of humidity on airborne influenza virus survival, transmission and incidence. Journal of the Royal Society Interface, 16(150), 20180298. > -- Aryeh Weiss Faculty of Engineering Bar Ilan University Ramat Gan 52900 Israel Ph: 972-3-5317638 FAX: 972-3-7384051 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
My first suspicion is that the code you show is not the code actually running (for whatever reason).
Can you please add a new IJ.showMessage() *before* the one that does print - just to rule out this possibility? -- Kenneth Sloan [hidden email] Vision is the art of seeing what is invisible to others. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Kenneth,
Here is a reply that I sent to Aryeh about the out of bounds bug: That bug is fixed in Version 7, just posted. It could happen when particles touched the edges of the image. The plugin should have no issues for images where the height in pixels, h, differs from the width in pixels, w. There is a problem when the "pixel width", pw, differs from the "pixel height", ph. This situation can be created by setting a "Pixel aspect ratio" different from 1.0 in "Analyze/Set Scale" or by setting unequal values for pw and ph in "Image/Properties..." The plugin refuses to run in that case, issuing an error dialog containing "This plugin is not designed for that." because the curvature calculation assumes that the horizontal and vertical scales match. Aryeh then replied that it is not fixed yet, but I think it should be.... Bob On Monday, July 13, 2020, 10:32:36 AM PDT, Kenneth Sloan <[hidden email]> wrote: My first suspicion is that the code you show is not the code actually running (for whatever reason). Can you please add a new IJ.showMessage() *before* the one that does print - just to rule out this possibility? -- Kenneth Sloan [hidden email] Vision is the art of seeing what is invisible to others. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Update - Bob's plug-in works (at least on my system).
There is an issue with how I was trying to debug it, in that my showmessage calls were not doing anything even though the call in the code worked fine (and the output was exactly as written in the code). I will need to see why that happened, but it is a separate issue, and mot likely related to how I was trying to run it. When I have a chance I will play with it some more. --aryeh On 13/07/2020 20:48, Robert Dougherty wrote: > Kenneth, > Here is a reply that I sent to Aryeh about the out of bounds bug: > > That bug is fixed in Version 7, just posted. It could happen when particles touched the edges of the image. > The plugin should have no issues for images where the height in pixels, h, differs from the width in pixels, w. There is a problem when the "pixel width", pw, differs from the "pixel height", ph. This situation can be created by setting a "Pixel aspect ratio" different from 1.0 in "Analyze/Set Scale" or by setting unequal values for pw and ph in "Image/Properties..." The plugin refuses to run in that case, issuing an error dialog containing "This plugin is not designed for that." because the curvature calculation assumes that the horizontal and vertical scales match. > > > Aryeh then replied that it is not fixed yet, but I think it should be.... > Bob > > > On Monday, July 13, 2020, 10:32:36 AM PDT, Kenneth Sloan <[hidden email]> wrote: > > My first suspicion is that the code you show is not the code actually running (for whatever reason). > > Can you please add a new IJ.showMessage() *before* the one that does print - just to rule out this possibility? > -- > Kenneth Sloan > [hidden email] > Vision is the art of seeing what is invisible to others. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > . -- Aryeh Weiss Faculty of Engineering Bar Ilan University Ramat Gan 52900 Israel Ph: 972-3-5317638 FAX: 972-3-7384051 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |