Your main problem is likely to be that most usb webcams spit out their image data as yuv422 in yuyv mode. That is not widely supported on the Gpu as most stuff wants yuv420. Check first by using "v4l2-ctl --list-formats-ext" (install v4l-utils first if necessary) to list the formats it supports.
Whilst others are correct in pointing you at Openmax IL, there is an alternative in MMAL which was written due to the complexities of IL. There is a component under MMAL called vc.ril.isp that wraps the camera image sensor pipeline and will do format conversion and resizing from yuyv efficiently.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.