How can i crop image using C#

二次信任 提交于 2019-12-05 01:34:10

问题


I have a picture of document taken from camera. Now what i have to do is crop only document from that image . Please can anyone suggest me how best it can be done or first is it possible or not

Edit

For more information .. my next question How to get edge coordinates of a image?


回答1:


If you know the area that contains the image data you would like to crop, you could use this article from MSDN:
http://msdn.microsoft.com/en-us/library/ms752345.aspx

If you need to find the relevant area before cropping, you need to investigate some image processing techniques. e.g. Corner Detection




回答2:


In the assumption you are performing preprocessing for OCR, I would look into using the Aforge Framework if possible.

There is a specific set of functions in the Imaging classes for preforming crops and any other related manipulations(image rotation, hue adjustment, brightness/contrast adjustment, filter noise, etc) that you might need.




回答3:


Two links for you

http://google.com/search?q=c%23+crop+bitmap and http://www.nerdydork.com/crop-an-image-bitmap-in-c-or-vbnet.html



来源:https://stackoverflow.com/questions/1889306/how-can-i-crop-image-using-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!