plantcv
plantcv copied to clipboard
Autocrop Objects Needs Attention
Describe the bug Autocrop object currently requires indexing otherwise does not work. Works: crop_img = pcv.auto_crop(img=img, objects=roi_objects[0], padding_x=20, padding_y=20, color='black')
To Reproduce Steps to reproduce the behavior (including sample data and code really help):
- Starting with image '...'
- Run function(s) '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Local environment (please complete the following information):
- OS: [e.g. Linux, macOS, Windows]
- Environment [e.g. conda, virtualenv, pip, docker, etc.]
- PlantCV Version [e.g. 3.6.0]
Additional context Add any other context about the problem here.
One solution could be to check number of contours and add a loop if more than one.