Hello! I'm actually unable to follow your requirement here. My understanding is that you want to recognize any 3D object. Sorry, but here are some thoughts:
1) Every object (almost) is 3D in real world
2) We do not have anything till date that can recognize any object from images, not even humans
So, I think I've seriously erred in understanding your requirement here.
Anyway
1) Detection of any object, foreground and background separation is one thing
2) Recognizing that that object is a car or a building and not just any object is another
Basically, we can have multiview of same image with photographs to tell something about the 3d object in the scene, sometimes we use feature based methods like in image processing explicitly and find objects of interest. However, the problem statement is ill posed here, so first let's verify it, and then think about next steps.
Finally, having just 1 .m file, I think you meant, one main file that needs to be run.
Thanks for making MATLAB available remotely. That's a great advantage which we usually face when the client is unable to run install it on their system, after the delivery etc etc. Yes, I do work on Linux, so that's not a problem at all.
About me:
Working as research student in image processing and computer vision. Thank you! If I'm not online, leave your queries and messages, and I shall revert ASAP.