If your already at the point of pulling your hairs out, you are just getting started.
If you did this sort of thing with a microprocessor like an STM32F, it would be really difficult. Implementing the hardware would be challenging, the software would worse (in my opinion). even if you were a proficient programmer it could take you weeks to months.
Stick with the Raspi and use the camera module provided, there are numerous examples for beginners (you can google them). I believe the resolution would be sufficient, it's not the best camera but you could teach yourself some python and it would be a good learning experience. You wouldn't have to mess with the hardware either, just plug the module in.
One thing you might notice is more often than not, making things on your own is not cheaper than buying a ready made thing. Especially if you take into consideration the cost in time it takes to make something. It takes time to:
- Buy all the items (plus you have to pay shipping each time you buy from a different supplier)
- Put the items together
- Design other itmes and order them if needed (like PCB's)
- Write the software
You also are penalized heavily for only making one, you don't get any discounts like a manufacturer in china that is going to make thousands of them. But if you want to do it to learn something or as a hobby then by all means go for it. I do this all the time. I have a CNC machine, for each part I probably spend an hour more than an experienced machinist would. And if I took the 3000$ that it cost to buy it (and the software) and amortized it for the cost of each part that I'd make on it, it would cost me much much more than I could get it made by a machinist or at a shop. The material costs me more because I don't buy it it quantity. The quality of the work isn't as good because I don't do thousands of parts and I don't know the best way to make one. But I love doing it, and I've learned a lot. And that's why I do it.