The existing object detection algorithms are divided into neural network and non-neural network based methods. Both of them require sufficient training data samples and the consistent environment with the training data to work stably and efficiently. However, they are not able to work if i) there is no object image sample, and/or ii) the working viewports are different from those of the object sampling. To address the above problems, we propose a new method, which includes point-cloud projection (PCP), and equivalent-radius (ER), and the feature-points calibration (FPC) algorithms based on the optical imaging principle. The new PCP algorithm provides a general method to project the point cloud of the object to different viewports for detection. The new ER algorithm uses the output of the PCP algorithm to detect objects. The new FPC algorithm uses markers of a known size to calibrate the viewport parameters of any visual system for the PCP algorithm. Different from the conventional object detection methods and the rendering methods in computer graphics, the new method does not need training samples and thus has less computation. Moreover, it has better generality since it is independent of the viewport locations and angles. Simulation results show that the proposed method works effectively and its object detection accuracy on a standard dataset is above 99.7%, demonstrating that the new method works well without training data, and has a high accuracy even if the working viewports are different from those for object sampling.