Can I calculate the size of a real object by just looking at the picture taken by a Camera? (I think people do that) i dont understand how? (from physics point of view)
If you know the specifics of the camera (lens system, aperture settings, etc.), then you can make a direct relationship between the size of the image and the angular size.
But without a distance measurement (something the camera does not do), you can't turn that into an absolute size.
If there is other information in the photograph that gives the distance, then the size can be calculated.
If all you have is the image (and not the information about the specifics of the camera), then even the angular size cannot be calculated.
You will need a reference scale next to the object and only then you can estimate the size relative to that reference scale.
That why you see many pictures of small items next to a Lincoln penny (and why one was sent to Mars).