srturner:
Have you considered using a Raspberry Pi for this? These come standard with a ready-to-go camera connector, and the cameras are small and readily available. They have a fairly wide field of view which will generally translate to greater depth of field. If I were doing this project, that is definitely the direction I'd try first. A lot depends on the focal length and level of detail that you want.
S.
The original Idea was to use Arduino to control the servos and a Raspberry Pi to detect the images. But, before detecting, It's necessary to train my neural network which needs a really powerfull PC, which needs at least some hundreds of pictures.
I've never considered using the Raspberry Pi for both servo control and data analyse, does the Raspberry capable of controlling two servos at once? I had the impression that it is way more "fragile" than the Arduino and servo-controlling was quite demanding. If possible, it would be easier as I wouldn't need to make them work together.
DrDiettrich:
Why not connect the camera to the PC for further processing?
The pictures shall be taken from the image capturing device and loaded into a PC for further processing, The neural network training is a really demanding process, but, after the model is trained, a raspberry PI model 3 can detect images with over 1 FPS which is way better than I need.
Etemenanki:
I don't know about Arduino programming (and doubt it can be done with Arduino, at least the image management part) ... but about the camera itself, you say it must rotate, this exclude the bare camera modules from cellphones (too much wires), but there is some 8mm dia boroscope / endoscope 1080p cameras with 8 leds around with USB interface, and a piece of surface-coated mirror will turn 90 degrees the direction of sigh, and havin only 4 wires you can made the support in a way that it contain enough cable for rotate without rip ... or as alternative, use a slipring unit for transfer the signal , this way the camea can rotate all the turns you want ... just use a slipring unit with 8 or 12 contacts (so you can use 2 or 3 contacts for each cable ... redundance is always a good thing, and multiple contacts in parallel reduces the risk of disturbs too
)
We have an endoscope, It was able to take some good pictures but I couldnt padronize it, as It's a quite expensive equipament and I cant "modify" it.
I tought of having a hollow shaft with the camera on its end, "filled" with cable to not rip as the motion is 0-360 at most, there's no need for multiple revolutions. Maybe a Cellphone camera might be an option then, they have auto focus, doesn't they? The problem would be the FOV and If they are able to focus in a curved and reflective surface 20mm away.
The idea for the sliping unit is quite intersting for an final product, which isn't the case, I need only to capture some images to get to prove that my neural network "works". If it does work and (hopefully) someone notice it, I might suggest using this aproach for a more robust option.
DrDiettrich:
You do not mean a real combustion engine in action, do you? Then you can make the engine move a bit for each single exposure, and move the camera to whatever place at whatever route. Have a left half and a right half of the cylinder with no obstacle between the camera and the hardware.
Wouldn't it be easier then to use a CAD program for the construction of the views to take?
No, not at all. I got a bunch of engine cylinders that "Failed" at some point, and most of them are brand new, but due some manufacturing problems they didn't meet the standards for real usage. So, my undergrad final essay is to analyze the cylinder using a neural network to indentify potential manufacturing defects and classify them, so, with enough data, aprove or reprove a cylinder during the manufacture (If a company see potential on that).
Railroader:
Forget about the usual Arduinos. They are not fit for handling pictures. A picture is built from a lot more pixels then the memory of a "toy Arduino" can handle.
I had the impression we could attach a "camera shield" to it to be able to capture an save images on a SD card or smth. I might have gotten the wrong idea.