Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using QGIS to georeference B&W images. I have now done this and would like to set the black surround of the image (as a result of the georeferencing) to transparent but this does not work as bands 1,2 and 3 have the same values. I have noticed there is now a band 4 after georeferencing and would use this to drop out the black surround but I can only do this to bands 1,2 and 3.

I am not super experienced with rasters in QGIS so I am having difficulty determining if this question has been addressed.

This is a screen grab of the image I have, I am trying to remove the black triangles: This is a screen grab of the image I have, I am trying to remove the black triangles

These are the values of the black surround:

These are the values of the black surround[][2]

These are the values of the black text and lines I would like to keep:

These are the values of the black text and lines I would like to keep

For anyone who reads this who might find this usefull I just worked out how to do it. I can set a band to be transparent. So I just set Band 4 to be transparent and it worked perfect.

enter image description here

share|improve this question

1 Answer 1

This is more of a strategy than a proven answer.

This assumes that the black triangles are part of a rectified image. Can you save the image file in a format that supports transparency such as png format. That would enable you to set the white to transparent as well as manually select and delete the black triangles using an image editor. Deleted parts of the image become transparent.

If the black triangles are produced on the fly, I would try this. Zoom in to the part of the plan you need, use the make image in the file menu to make a georeferenced screen clip of the screen. This clip will not have the black triangles. Open the screen clip in an image editor and select and delete the pixels you do not want (i.e. make the pixels transparent). Do not crop the image as this will break the georeferencing information. Save the image as a type that supports transparency.

If you don't want to save the image as a type that supports transparency, open the image in an image editor and increase the contrast until the white areas are maximum white and the black areas a maximum black. If you want to keep the black line work, select these areas and increase the brightness, that makes the lines very dark grey which is still black to the eye. In QGIS you can set the transparent colour to maximum black. This will hide the black triangles only.

These are simple kludges that I use on other GIS systems.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.