# All functions related to the camera in picar-x are not functioning properly

**URL:** <https://forum.sunfounder.com/t/all-functions-related-to-the-camera-in-picar-x-are-not-functioning-properly/678>\
**Category:** Robotic kit for Raspberry Pi\
**Created:** [December 1, 2023, 4:36pm UTC](https://forum.sunfounder.com/t/all-functions-related-to-the-camera-in-picar-x-are-not-functioning-properly/678 "2023-12-01T16:36:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kwon](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kwon](https://forum.sunfounder.com/u/kwon)\
**Post date:** [December 1, 2023, 4:36pm UTC](https://forum.sunfounder.com/t/all-functions-related-to-the-camera-in-picar-x-are-not-functioning-properly/678/1 "2023-12-01T16:36:11Z")

</div>

Hello.  
I have a question about the camera used in picar-x.  
All functions related to the camera, such as computer vision, color detection, face detection, and video car, are not working in the picar-x document.

It does not work and outputs an error as shown below.

I wonder why this error occurs.

I think I did the installation right as you said, but I wonder if I did something wrong.

Please run under desktop environment (eg: vnc) to display the image window  
vilib 0.2.0 launching …  
picamera2 0.3.12  
Traceback (most recent call last):  
File “/usr/local/lib/python3.9/dist-packages/numpy/core/ **init**.py”, line 24, in   
from . import multiarray  
File “/usr/local/lib/python3.9/dist-packages/numpy/core/multiarray.py”, line 10, in   
from . import overrides  
File “/usr/local/lib/python3.9/dist-packages/numpy/core/overrides.py”, line 8, in   
from numpy.core.\_multiarray\_umath import (  
ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/usr/local/lib/python3.9/dist-packages/numpy/ **init**.py”, line 130, in   
from numpy. **config** import show as show\_config  
File “/usr/local/lib/python3.9/dist-packages/numpy/ **config**.py”, line 4, in   
from numpy.core.\_multiarray\_umath import (  
File “/usr/local/lib/python3.9/dist-packages/numpy/core/ **init**.py”, line 50, in   
raise ImportError(msg)  
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for  
many reasons, often due to issues with your setup or how NumPy was  
installed.

We have compiled some common reasons and troubleshooting tips at:

```
https://numpy.org/devdocs/user/troubleshooting-importerror.html

```

Please note and check the following:

- The Python version is: Python3.9 from “/usr/bin/python3”
- The NumPy version is: “1.26.2”

and make sure that they are the versions you expect.  
Please carefully study the documentation linked above for further help.

Original error was: libopenblas.so.0: cannot open shared object file: No such file or directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):  
File “/usr/local/lib/python3.9/dist-packages/numpy/ **init**.py”, line 135, in   
raise ImportError(msg) from e  
ImportError: Error importing numpy: you should not try to import numpy from  
its source directory; please exit the numpy source tree, and relaunch  
your python interpreter from there.  
Traceback (most recent call last):  
File “/home/pi/picar-x/example/video\_car.py”, line 7, in   
from vilib import Vilib  
File “/usr/local/lib/python3.9/dist-packages/vilib-0.2.0-py3.9.egg/vilib/ **init**.py”, line 2, in   
from .vilib import Vilib  
File “/usr/local/lib/python3.9/dist-packages/vilib-0.2.0-py3.9.egg/vilib/vilib.py”, line 16, in   
import cv2  
ImportError: numpy.core.multiarray failed to import

---

<div class="post-metadata">

**Author:** ![goose](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.sunfounder.com/goose/32/478_2.png) [@goose](https://forum.sunfounder.com/u/goose)\
**Post date:** [December 1, 2023, 10:10pm UTC](https://forum.sunfounder.com/t/all-functions-related-to-the-camera-in-picar-x-are-not-functioning-properly/678/2 "2023-12-01T22:10:43Z")

</div>

I have the same issue. I hope this gets fixed immediately.

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [December 4, 2023, 9:43am UTC](https://forum.sunfounder.com/t/all-functions-related-to-the-camera-in-picar-x-are-not-functioning-properly/678/3 "2023-12-04T09:43:35Z")

</div>

It is recommended that you update your code base as follows:  
cd ~/robot-hat  
git pull  
sudo python3 setup.py install

cd ~/vilib  
git pull  
sudo python3 install.py

cd ~/picar-x  
git pull  
sudo python3 setup.py install

cd ~/picar-x  
sudo bash i2samp.sh

After updating the above codebase, go back and execute the example to see how it works.  
If you still can’t solve the problem, we recommend you to reinstall the Raspberry Pi system and install all the code libraries again.

---

<div class="post-metadata">

**Author:** ![kwon](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kwon](https://forum.sunfounder.com/u/kwon)\
**Post date:** [December 4, 2023, 10:14am UTC](https://forum.sunfounder.com/t/all-functions-related-to-the-camera-in-picar-x-are-not-functioning-properly/678/4 "2023-12-04T10:14:51Z")

</div>

Do you want me to delete all the folders vilib, robot\_hat, and picar-x and install them again? I am asking because I think it would be better to install a new one rather than an update.

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [December 4, 2023, 10:23am UTC](https://forum.sunfounder.com/t/all-functions-related-to-the-camera-in-picar-x-are-not-functioning-properly/678/5 "2023-12-04T10:23:23Z")

</div>

This is a direct instruction to update the code base, you can also uninstall and remove all the libraries and reinstall them.  
Both methods are available.

If neither method works, you will need to format the SD card and go back to reinstall the Raspberry Pi system and install all of our libraries again.

---

<div class="post-metadata">

**Author:** ![kwon](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kwon](https://forum.sunfounder.com/u/kwon)\
**Post date:** [December 5, 2023, 7:36am UTC](https://forum.sunfounder.com/t/all-functions-related-to-the-camera-in-picar-x-are-not-functioning-properly/678/6 "2023-12-05T07:36:11Z")

</div>

What you said works well.  
But I think I have to make a suggestion.  
Example 13 The source code for app\_controller needs to be modified.  
Line 144 and below it are set\_camera\_tilt\_angle, but an error occurs in this area.  
So, I need to change it to set\_cam\_tilt\_angle to make it work normally, so I think you need to change it before another question comes.

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [December 5, 2023, 10:28am UTC](https://forum.sunfounder.com/t/all-functions-related-to-the-camera-in-picar-x-are-not-functioning-properly/678/7 "2023-12-05T10:28:27Z")

</div>

What error did you report when executing the 13 app\_controller code?  
Please provide us with a screenshot of the problem so that we can analyze and resolve it.  
We recommend that you run the 13 app\_controller code using the command:  
cd ~/picar-x/example  
sudo python3 13.app\_control.py  
If you use Thonny to run the 13 app\_controller code, you will get an error because you do not have administrator privileges.  
You need to add sudo before executing the code.
