Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes on clicking save #13

Closed
brookjason opened this issue Dec 6, 2022 · 2 comments
Closed

Crashes on clicking save #13

brookjason opened this issue Dec 6, 2022 · 2 comments

Comments

@brookjason
Copy link

brookjason commented Dec 6, 2022

Describe the bug
The software runs and allows me to get all the way through to the save section it doesn't matter which options I choose to save and continue or save and new as soon as I click either the software crashes. It does however write a folder and a CSV file and that's it.

                 Welcome to GRID Ver.1.2.24    
~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~
Author      : James Chen <niche@vt.edu>    
Last update : Aug 5, 2022              
User manual : https://poissonfish.github.io/GRID/
~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~
Recent update 
    - Upgrade the GUI framework from PyQt5 to PyQt6
    - Support images with huge dimensions (> 32767)
    - Add CRS to shapefiles (.prj) 
    - Support ESRI shapefile compatible in QGIS    
~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~*~~~~~~~~~
For Mac OS users, please ignore the messages below relating to duplicated implementations. 
It's due to the conflict of OpenCV and PyQt, but it won't affect the performance and the results.


GRID: Image was reshaped to (8940, 13890)
Traceback (most recent call last):
  File "/Users/jasonbrook/opt/anaconda3/lib/python3.8/site-packages/grid/gridGUI.py", line 165, in <lambda>
    self.btNext.clicked.connect(lambda: self.finalize())
  File "/Users/jasonbrook/opt/anaconda3/lib/python3.8/site-packages/grid/gridGUI.py", line 234, in finalize
    self.grid.save(path=path, prefix=prefix, simple=isSimple)
  File "/Users/jasonbrook/opt/anaconda3/lib/python3.8/site-packages/grid/grid.py", line 101, in save
    self.savePlotAndDT(path=path_f, prefix=prefix, simple=simple)
  File "/Users/jasonbrook/opt/anaconda3/lib/python3.8/site-packages/grid/grid.py", line 287, in savePlotAndDT
    savePlot(self, path, prefix, simple=simple)
  File "/Users/jasonbrook/opt/anaconda3/lib/python3.8/site-packages/grid/io.py", line 270, in savePlot
    pltSegPlot(grid.agents, grid.imgs.get("crop")[:, :, :3],
  File "/Users/jasonbrook/opt/anaconda3/lib/python3.8/site-packages/grid/lib.py", line 555, in pltSegPlot
    qimg = getIdx8QImg(plotBase, plotBase.max()+1)
  File "/Users/jasonbrook/opt/anaconda3/lib/python3.8/site-packages/grid/lib.py", line 668, in getIdx8QImg
    qImg.setColor(i, colormap[i])
IndexError: list index out of range
zsh: abort      python -m grid

**Desktop (please complete the following information):**
 - OS: MacOS Monterey 12.6
 
@Poissonfish
Copy link
Owner

Hi, thanks for the feedback, I think I fixed the bug. GRID did not handle well when the image was dark (low values). Would you check if the issue is resolved? (make sure you update GRID to version 1.2.25)

@brookjason
Copy link
Author

Yes that fixes the issue.

I'm in the UK and light levels are fairly low.

As a future feature request my bands are in a different order it might be nice to be able to select which bands are which in the GUI. Mine goes

ch_1 = Blue (RGB camera)
ch_2 = Green (RGB camera)
ch_3 = Red (RGB camera)
ch_4 = Red
ch_5 = Red Edge
ch_6 = Near IR

Currently I recalculate afterwards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants