From Paola.Salmona at unige.it Thu Jul 4 09:23:54 2024 From: Paola.Salmona at unige.it (Paola Salmona) Date: Thu, 4 Jul 2024 16:23:54 +0000 Subject: [GRASS-user] Classification of greyscale images Message-ID: Hi everybody, I'm trying to classify some photograms from a Royal Air Force flight in 1944. They are in greyscale and when I import them into grass using r.in.gdal I get only one band and I can't use image processing command such as i.cluster or i.gensig. I have tried to cheat by assigning to an image a color table, exporting it, converting in RGB in an external software, then importing it again into grass. It "worked" with some alerts, but, beside being a cumbersome method, I am not sure about the quality of the re-imported image. Does anybody know a better way? Thank you very much!!! Paola -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlennert at club.worldonline.be Fri Jul 5 00:18:55 2024 From: mlennert at club.worldonline.be (Moritz Lennert) Date: Fri, 5 Jul 2024 09:18:55 +0200 Subject: [GRASS-user] Classification of greyscale images In-Reply-To: References: Message-ID: Hi Paola, Automatically classifying monochrome images is not easy. If you really want to use classical methods, your best bet is probably to create a series of pseudo-bands based on indicators such as texture (e.g. using r.texture, or possibly also r.neighbors). Another approach would be object-oriented, first segmenting the image into coherent segments and then calculating indicators for each of these segments, but segmentation generally also works much better on multiband imagery, so if you use, e.g., i.segment, then you would probably also have to create a series of pseudo-bands. Or you can try with r.clump. When I've worked on such images in the past, neural network approaches seemed to actually work best. Here's an example on (fairly bad quality) historic images: https://dipot.ulb.ac.be/dspace/bitstream/2013/312410/3/FCN_for_historical_images_AUTHOR_VERSION.pdf. Since we've done that work, networks have evolved very rapidly, and you should probably be able to get better results nowadays. Moritz Le 4/07/24 ? 18:23, Paola Salmona via grass-user a ?crit?: > Hi everybody, > I'm trying to classify some photograms from a Royal Air Force flight > in 1944. They are in greyscale and when I import them into grass using > r.in.gdal I get only one band and I can't use image processing command > such as i.cluster or i.gensig. > I have tried to cheat by assigning to an image a color table, > exporting it, converting in RGB in an external software, then > importing it again into grass. > It "worked" with some alerts, but, beside being a cumbersome method, I > am not sure about the quality of the re-imported image. > Does anybody know a better way? > Thank you very much!!! > Paola > > _______________________________________________ > grass-user mailing list > grass-user at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/grass-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From tea3rd at gmail.com Wed Jul 31 12:26:29 2024 From: tea3rd at gmail.com (Thomas Adams) Date: Wed, 31 Jul 2024 15:26:29 -0400 Subject: [GRASS-user] Status of ITZI in GRASS? In-Reply-To: <211ce4c7-14c6-4e2e-a180-a66f011be5c8@gmail.com> References: <211ce4c7-14c6-4e2e-a180-a66f011be5c8@gmail.com> Message-ID: Hi all; I have tried both approaches suggested by Venka and Markus and keep getting errors; I have: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 and I get this: cython -3 itzi/swmm/swmm_c.pyx itzi/flow.pyx /usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 2.0.0 I also have to use python3 not python in... python setup.py build Also, when I tried the approach suggested by Venka using conda, this messed up my GRASS installation with wxpython and the GUI would not launch. So, I had to remove conda and install wxpython A couple of years ago with a different Linux system and Itzi installed fine, so this is quite frustrating Tom On Thu, Jun 13, 2024 at 8:19?PM Venka via grass-user < grass-user at lists.osgeo.org> wrote: > Hi, > > Thanks to Markus and Song for their feedback. > > We succeeded in installing ITZI on Ubuntu 22.04 > > Steps to install GRASS and ITZI are as below; > > -------------------------------------- > > ############ Install GRASS > #adding GRASS repository into ubuntu22.04 > #https://grass.osgeo.org/download/linux/#GRASS-GIS-current > sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable > sudo apt update > > #installing GRASS 8.3.2 > sudo apt-get install grass > sudo apt-get install grass > #check grass well-done? > grass -v > grass -h > > > ########### Python virtual environment > conda info --envs > #conda create --name py38venka python=3.8 > conda create --name py310venka python=3.10 > conda activate py310venka > conda info --envs > > > ############installing itzi > # > https://itzi.readthedocs.io/en/latest/installation.html#installation-on-gnu-linux > > #numpy required > conda install -c conda-forge pysal rioxarray cartopy > > #cython, setuptools required > conda install -c conda-forge setuptools cython > > #Compiling itzi first > unzip itzi-20.5.zip > cd itzi-master > > cython -3 itzi/swmm/swmm_c.pyx itzi/flow.pyx > python setup.py build > python setup.py install > > -------------------------------------- > > Best, > > Venka > > > > > On 6/14/2024 1:55 AM, Markus Neteler via grass-user wrote: > > Hi, > > > > FWIW, I was able to compile ITZI today on Fedora 39 (gcc version > > 13.3.1 20240522; Python 3.12.3), using > > > > # install dependencies > > pip install numpy setuptools cython > > > > # generate some needed C files > > cython -3 itzi/swmm/swmm_c.pyx itzi/flow.pyx > > > > # build > > python setup.py build > > > > # install > > python setup.py install --user > > > > # test if it starts > > itzi version > > 20.5 > > > > # pytest (see docs/prog_manual.rst) > > pytest -v > > [...] > > > > Due to lack of time I could not continue yet. > > > > Perhaps I can try these days during the > > https://grasswiki.osgeo.org/wiki/GRASS_Community_Meeting_Prague_2024 > > > > Best > > Markus > > > > -- > > Markus Neteler, PhD > > https://www.mundialis.de - company > > https://grass.osgeo.org - FOSS > > https://neteler.org - freelancing & blog > > _______________________________________________ > > grass-user mailing list > > grass-user at lists.osgeo.org > > https://lists.osgeo.org/mailman/listinfo/grass-user > > _______________________________________________ > grass-user mailing list > grass-user at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/grass-user > -- -------------- next part -------------- An HTML attachment was scrubbed... URL: