In terms of image quality, reliability and flexibility (not to mention ease of installation) there should be no comparison between a dedicated IP camera and a raspberry Pi with a camera board (which I think were £15 when I bought mine but there are now Chinese knockoffs available for even less)...