Hi list, here is a question on how to extract spatial features from a RGB raster with the raster calculator.
Here's the situation: - I am using QGIS 2.12.3 Lyon - The goal is to extract a feature from an aerial photo as a binary map (e.g. a winding clearly yellow colored linear feature) - A RGB-raster was imported from PNG. - The raster can be properly displayed. - A object-query on the yellow colored feature gives a RGB value of channel1:255 channel2:255 channel3:0 - A first naive approach was to calculate (("image@1"=255)AND("image@2"=255))AND("image@3"=0). This resulted in a raster of 0s. - Multiples trials showed that also the calculation of individual raster layers of image@1=255 ,image@2=255 and image@3=0 also result in empty rasters. - More trial and error showed that individual calculation of image@1 > 200 , image@2 > 200 and image@3 < 30 give reasonable results each. Chaining these binary maps (again) with AND leads yet gain to an empty result. I have a bit of a GRASS background so probably I'm thinking too much along the lines of r.mapcalc. Any comments on what I am doing wrong would be much appreciated. best, Peter _______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user