img from analysis functions empty
See original GitHub issueReally nice job with the VIS tutorial! 1.5 things that stuck out to me: at the very end, for the analysis, the code posted doesn’t actually run in a jupyter cell because 1. indentation 2. args does not exist.
I removed those problems but then found that
analyze_object(), analyze_bound(), analyze_color() all return empty arrays for the images. Looks like you only output the image if area
and filename
are defined. any reason for this?
I realized pcv.params.debug = 'plot'
also shows the plots but it be nice to have this flexibility to see the plots separately. As presented one would expect the images be output, even if filename
(in my case) are not defined. If area
is not defined you might actually consider a warning message.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
What is an image of empty set? - Mathematics Stack Exchange
As known, empty set is a subset of each set, so my question is: Is it proper to write f(∅)=∅? analysis · elementary-set-theory...
Read more >Analysis of images in folder by macro stops if image is empty
I am trying to analyze (morphology,skeletal and fractal dimension) multiple images (about 500) containing particles.
Read more >Check if the image is empty using Python - OpenCV
In this article, we'll try to check if the opened image is empty or not by using OpenCV (Open Source Computer Vision).
Read more >Error: !_img.empty() in function 'imwrite' - python - Stack Overflow
The cause may be that image is empty, so, You should check weather video is opened correctly before read frames by: cap.isOpened() ....
Read more >Built-in Macro Functions - ImageJ
Returns the directory that the current image was loaded from, or an empty string if the directory is not available. getInfo("image.filename")
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It depends on your preference, but what will happen functionally is this. Let’s say I put
filename=test.png
.pcv.analyze_object
will output two images,test_shapes.jpg
andtest_mask.jpg
, into the current working directory. If you run this analysis on multiple images this is probably not desirable because all the output images will have the same name. So as you said, I would generally use thefilename
variable that is output by thepcv.readimage
function because you can then link the output image names to the input image name. The same goes for the output directory. You can either code this directly into your script or you can use an input variable to set the output directory. In your case you could setoutfile = "C:\Users\Dominik Schneider\Downloads\" + filename
to put all the output files in Downloads with the original image name plus the new suffix.@dschneiderch, no worries, this is awesome! In order to make the function available after import you have to add it to the
__init__.py
file one directory up: https://github.com/dschneiderch/plantcv/blob/readbayer/plantcv/plantcv/__init__.py