c# - Is there a way to crop and deskew a quadrilateral from an image in a Windows Store (WinRT) application? -
i'm writing application windows store uses canny edge detection find borders of document on image. need able crop image once corners found. can use writeablebitmapextension methods crop rectangle, problem rectangle, rather quadrilateral.
i read called aforge may able it, doesn't support silverlight/winrt looks like. know should possible opengl, require change large portion of application. there alternatives?
you implement writeablebitmapex using blit , n alpha mask region want crop. create mask dynamically result canny edge detection. make sure pixels want keep have alpha value of 255 , ones want crop have alpha value of 0 in mask bitmap. use blit method on original image, supply generated alpha mask bitmap parameter , blendmode.alpha well. won't reduce size of original image @ least unwanted pixels gone. before alpha masking crop rectangular using min, max of x , y edge detection result. way size reduced , alpha masking should faster bonus.
Comments
Post a Comment