Suppose I have an image of a geographical region. I want to extract a triangle from that region that covers a certain features (knowing that the image is RGB).
I assume you have a monochrome image in which there is one or more triangles. You can use Hough transform to detect all straight lines and then be determining the angle between lines that intersect each other you can find out if the shape is a triangle.
In this approach, the size and orientation of triangle is not important.
its very simple, I don't know which tool you have at disposal to do what you are trying to do, but:
If you are using ENVI: just do masking in ENVI to get the triangular area by defining the traingle, Trainagular area is 1 and rest of the image will be zero
You could also use polygon feature selection both in ENVI and GIS to crop the triangular area, you can draw the polygon in the shape and size of your triangle.
I realized from your question that you need to extract a triangle shape from RGB image. For that the easy solution is to use ArcGIS, ERDAS or any other imager processing or GIS solution.
For that you just need to create a shape file which area you want to extract from that image. The triangle which you want to extract must be co-registered with the RGB image.
After that you just need to use extraction tool which is available in geoprocessing tool of arc toolbox.
or you can use the MATLAB as well!
If you need any help please let me know what I can do for you.
I assume you have a monochrome image in which there is one or more triangles. You can use Hough transform to detect all straight lines and then be determining the angle between lines that intersect each other you can find out if the shape is a triangle.
In this approach, the size and orientation of triangle is not important.