Body: <p>Objective :  <strong>To find the nearest object (closer distance object)  in the single camera image. But Image Contains multiple objects shown below:</strong> </p>
  
  <p><a href="https://i.sstatic.net/N9bA8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/N9bA8.png" alt="Multiple Object in a Image"></a></p>
  
  <p>I searched in the net and found this formula to calculate the distance of object from camera </p>
  
  <p><strong>F = (P x  D) / W</strong> <a href="https://www.pyimagesearch.com/2015/01/19/find-distance-camera-objectmarker-using-python-opencv/" rel="nofollow noreferrer">Further Detail click on the Link</a></p>
  
  <p>Is there any other better approach to find the nearest object in a image?</p>
  
  <p>Thanks in Advance!!!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-26T14:06:38.913Z
Comments.Text: What components are you able to work with, and how much time/resources can you spend on this problem? If you are hoping to use an existing pre-trained YOLO model, and don't have any training data, just want to guess at nearest object, then something like your link is going to be best you can do. If you have time and ability to train a new model, you may be able to do better, but it could take a *lot* of effort to do so.
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-26T14:10:44.430Z
Comments.Text: Also, do you have a specific use case that limits what types of object and their possible locations? If your camera is above ground level, with a horizontal horizon plus reasonable to assume all detected objects are on the ground (not the case in the image shown, but also not unusual assumption), then you could just rank objects by lowest point of bounding box. Other simplifications may apply in your case.
Comments.UserDisplayName: Neil Slater
Tags: <machine-learning><computer-vision><object-detection><image-processing><image-segmentation>
Title: Find the nearest object in a image which is captured from camera?
UserDisplayName: DRV
ThreadText: # Find the nearest object in a image which is captured from camera?
  
  (Asked by: username_0 on 2019-12-26)
  
  Objective : **To find the nearest object (closer distance object) in the single camera image. But Image Contains multiple objects shown below:**
  
  [![Multiple Object in a Image](https://i.sstatic.net/N9bA8.png)](https://i.sstatic.net/N9bA8.png)
  
  I searched in the net and found this formula to calculate the distance of object from camera
  
  **F = (P x D) / W** [Further Detail click on the Link](https://www.pyimagesearch.com/2015/01/19/find-distance-camera-objectmarker-using-python-opencv/)
  
  Is there any other better approach to find the nearest object in a image?
  
  Thanks in Advance!!!
  
  **Tags:** machine-learning, computer-vision, object-detection, image-processing, image-segmentation
  > **Comments:**
  > **username_1**: What components are you able to work with, and how much time/resources can you spend on this problem? If you are hoping to use an existing pre-trained YOLO model, and don't have any training data, just want to guess at nearest object, then something like your link is going to be best you can do. If you have time and ability to train a new model, you may be able to do better, but it could take a *lot* of effort to do so.  
  > **username_1**: Also, do you have a specific use case that limits what types of object and their possible locations? If your camera is above ground level, with a horizontal horizon plus reasonable to assume all detected objects are on the ground (not the case in the image shown, but also not unusual assumption), then you could just rank objects by lowest point of bounding box. Other simplifications may apply in your case.  
  
  ---
  
  ## 0 answers
  
  