# Maximizing FOV with "Deploy to luconis OAK"

**URL:** <https://discuss.roboflow.com/t/maximizing-fov-with-deploy-to-luconis-oak/5125>\
**Category:** 🤝  Community Help\
**Tags:** feature-request\
**Created:** [April 4, 2024, 1:38am UTC](https://discuss.roboflow.com/t/maximizing-fov-with-deploy-to-luconis-oak/5125 "2024-04-04T01:38:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hugo\_Misael\_Barajas\_Hernandez](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/hugo_misael_barajas_hernandez/32/4173_2.png) [@Hugo\_Misael\_Barajas\_Hernandez](https://discuss.roboflow.com/u/Hugo_Misael_Barajas_Hernandez)\
**Post date:** [April 4, 2024, 1:38am UTC](https://discuss.roboflow.com/t/maximizing-fov-with-deploy-to-luconis-oak/5125/1 "2024-04-04T01:38:12Z")

</div>

Hi im new with roboflow, i already trained a succesfull model that work for my robotics proyect. The problem comes when im taking this model and I deploy it to my oak 1 device, when I do this the fov of my camera is getting quite smaller.

I understand why this is happening but I need the full fov, so I searched and I found a post that talks how to take the full fov by losing _accuracy_.

[https://docs.luxonis.com/projects/api/en/latest/tutorials/maximize\_fov/](https://docs.luxonis.com/projects/api/en/latest/tutorials/maximize_fov/)

Is there any way I can take that " Letterboxing" feature and make it work on my oak 1 with my roboflow model.

Im using this basic code to upload my model:

from roboflowoak import RoboflowOak  
import cv2  
import time  
import numpy as np  
from depthai\_sdk import OakCamera

from depthai\_sdk import OakCamera

if **name** == ‘ **main** ’:  
# instantiating an object (rf) with the RoboflowOak module  
rf = RoboflowOak(model=“”, confidence=0.5, overlap=0.5,  
version=“”, api\_key=“”, rgb=True,  
depth=False, device=None, blocking=True)  
# Running our model and displaying the video output with detections  
while True:  
t0 = time.time()  
# The rf.detect() function runs the model inference  
result, frame, raw\_frame, depth = rf.detect()  
predictions = result[“predictions”]  
# {  
# predictions:  
# [ {  
# x: (middle),  
# y:(middle),  
# width:  
# height:  
# depth: ###-\>  
# confidence:  
# class:  
# mask: {  
# ]  
# }  
# frame - frame after preprocs, with predictions  
# raw\_frame - original frame from your OAK  
# depth - depth map for raw\_frame, center-rectified to the center camera

```
    # timing: for benchmarking purposes
    t = time.time() - t0
    print("FPS ", 1 / t)
    print("PREDICTIONS ", [p.json() for p in predictions])

    # setting parameters for depth calculation
    # comment out the following 2 lines out if you're using an OAK without Depth
    #max_depth = np.amax(depth)
    #cv2.imshow("depth", depth / max_depth)
    # displaying the video feed as successive frames
    cv2.imshow("frame", frame)

    # how to close the OAK inference window / stop inference: CTRL+q or CTRL+c
    if cv2.waitKey(1) == ord('q'):
        break

```

---

<div class="post-metadata">

**Author:** ![trevorhlynn](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/trevorhlynn/32/1690_2.png) [@trevorhlynn](https://discuss.roboflow.com/u/trevorhlynn)\
**Post date:** [April 4, 2024, 7:14pm UTC](https://discuss.roboflow.com/t/maximizing-fov-with-deploy-to-luconis-oak/5125/2 "2024-04-04T19:14:45Z")

</div>

You can use the advanced config which allows for full video frame fov. you can do that by passing the following into RoboflowOak

advanced\_config = {“wide\_fov”: true}

---

<div class="post-metadata">

**Author:** ![Hugo\_Misael\_Barajas\_Hernandez](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/hugo_misael_barajas_hernandez/32/4173_2.png) [@Hugo\_Misael\_Barajas\_Hernandez](https://discuss.roboflow.com/u/Hugo_Misael_Barajas_Hernandez)\
**Post date:** [April 4, 2024, 10:35pm UTC](https://discuss.roboflow.com/t/maximizing-fov-with-deploy-to-luconis-oak/5125/3 "2024-04-04T22:35:39Z")

</div>

thats so much Trevorhlynn, I am really greatfull.

Is there any document where I could search for more useful configurations?

---

<div class="post-metadata">

**Author:** ![trevorhlynn](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/trevorhlynn/32/1690_2.png) [@trevorhlynn](https://discuss.roboflow.com/u/trevorhlynn)\
**Post date:** [April 5, 2024, 5:34pm UTC](https://discuss.roboflow.com/t/maximizing-fov-with-deploy-to-luconis-oak/5125/4 "2024-04-05T17:34:29Z")

</div>

Mostly you will want to be very knowledgable within the Luxonis documentation! If you run into more issues, please let us know

---

<div class="post-metadata">

**Author:** ![Hugo\_Misael\_Barajas\_Hernandez](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/hugo_misael_barajas_hernandez/32/4173_2.png) [@Hugo\_Misael\_Barajas\_Hernandez](https://discuss.roboflow.com/u/Hugo_Misael_Barajas_Hernandez)\
**Post date:** [April 5, 2024, 11:53pm UTC](https://discuss.roboflow.com/t/maximizing-fov-with-deploy-to-luconis-oak/5125/5 "2024-04-05T23:53:57Z")

</div>

there is one more issue I just encounter, if I use wide fov config (1920x1080) the code is getting around 4 times slower in comparison with the normal configuration (614x614), is there any way of taking the big fov but reducing the operational cost?, im thinking in something like keeping the 16:9 ratio but with a smaller resolution. 🤨

---

<div class="post-metadata">

**Author:** ![trevorhlynn](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/trevorhlynn/32/1690_2.png) [@trevorhlynn](https://discuss.roboflow.com/u/trevorhlynn)\
**Post date:** [April 8, 2024, 2:12pm UTC](https://discuss.roboflow.com/t/maximizing-fov-with-deploy-to-luconis-oak/5125/6 "2024-04-08T14:12:31Z")

</div>

@Maxwell do you have any ideas here?

---

<div class="post-metadata">

**Author:** ![Maxwell](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/maxwell/32/115_2.png) [@Maxwell](https://discuss.roboflow.com/u/Maxwell)\
**Post date:** [April 8, 2024, 4:54pm UTC](https://discuss.roboflow.com/t/maximizing-fov-with-deploy-to-luconis-oak/5125/7 "2024-04-08T16:54:01Z")

</div>

Yes, the slow down is expected. In order to utilize the full FPV, frames must be resized to the model dimensions which requires another step in the Depth AI pipeline. You might want to experiment with lower sensor resolution modes to improve this speed but unfortunately there isn’t much more we can do. For full control over the cv pipeline you should use the DepthAI SDK with its built in Roboflow integration [Roboflow Integration — DepthAI SDK Docs 1.13.1 documentation](https://docs.luxonis.com/projects/sdk/en/latest/samples/NNComponent/sdk_roboflow_integration/). Here is all the advanced configuration options for your reference.

```auto
advanced_config = {"wide_fov": True, "sensor_mode": "THE_720_P", "night_vision": True}

```

Also be aware that when using the advanced config, because of the extra step we have to match frames across different pipeline timings which sometimes results in empty frames and we recommend a safe guard such as below:

```auto
if frame.any():
            cv2.imshow("frame", frame)
            cv2.imshow("raw frame", raw_frame)
        else:
            print("no frame")

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)\
**Post date:** [April 29, 2024, 11:41pm UTC](https://discuss.roboflow.com/t/maximizing-fov-with-deploy-to-luconis-oak/5125/9 "2024-04-29T23:41:17Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
