I'm working with a raster map that looks like this:
Do you know any way to select the red/blue spots or ideally put a points on them? I've been browsing web and qgis help for a while now, but I haven't found anything useful as of yet.
Best Answer
Sometimes I face similar issues, though I do need to get polygons from the images. My current solution is as follows:
Use the info tool to get the specific RGB values of the areas of interest
Use the raster calculator to change the value of all areas of interest to 1 while the rest of the image is 0 (e.g. image@1=255 AND image@2=167 - this gives all pixels with RGB 255,167,xxx out as 1 while the rest becomes 0).
Use the contour dialogue to convert the black-and-white image to contourlines.
You can use a Majority Filter followed by Polygonize for this type of operation. QGIS has a majority filter in the SAGA toolbox. Polygonize is found in the Raster tab > Conversion > Polygonize (Raster to Vector...). For more cartographically pleasant vector features, use Simplify Geometry to smooth the rough vector edges: Vector > Geometry Tools > Simplify Geometries...
Another option is to use a Guassian Filter in the SAGA toolbox and then threshold that output using the Raster Calculator. In this second example, I used a double pass circular Guassian Filter with a stdev of 3 and a search radius of 30. I then thresholded the resulting image using the following syntax in the raster calculator:
"Filtered Grid@1" > 0.7
The resulting output is overlaid in transparent blue on the original:
Best Answer
Sometimes I face similar issues, though I do need to get polygons from the images. My current solution is as follows:
info tool
to get the specific RGB values of the areas of interestraster calculator
to change the value of all areas of interest to 1 while the rest of the image is 0 (e.g.image@1=255 AND image@2=167
- this gives all pixels with RGB 255,167,xxx out as 1 while the rest becomes 0).contour
dialogue to convert the black-and-white image to contourlines.centroids
of the polygons.