It is possible with the Image Processing Toolbox and/or Computer Vision Toolbox.
Please refer to the following document to decide which tool is the best one for your specific need.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!