# Image processing with opencv and python on raspberry pi

**URL:** <https://forum.farmbot.org/t/image-processing-with-opencv-and-python-on-raspberry-pi/2671>\
**Category:** Raspberry Pi\
**Created:** [October 4, 2017, 4:00am UTC](https://forum.farmbot.org/t/image-processing-with-opencv-and-python-on-raspberry-pi/2671 "2017-10-04T04:00:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ritesh](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/r/4af34b/32.png) [@ritesh](https://forum.farmbot.org/u/ritesh)\
**Post date:** [October 4, 2017, 4:00am UTC](https://forum.farmbot.org/t/image-processing-with-opencv-and-python-on-raspberry-pi/2671/1 "2017-10-04T04:00:33Z")

</div>

hi First of thanks for making farmbot opensource.Now my questions

1. Can I use python code locally on raspberry pi for image processing ?
2. Is it possible to send command bot, it run python script which contain image processing algorithm and run on farmbot??
3. farmware software if i make for other then weed detection than is it run on server or run frambot raspberry pi ?

---

<div class="post-metadata">

**Author:** ![Gabriel](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/g/9de0a6/32.png) [@Gabriel](https://forum.farmbot.org/u/Gabriel)\
**Post date:** [October 4, 2017, 5:05am UTC](https://forum.farmbot.org/t/image-processing-with-opencv-and-python-on-raspberry-pi/2671/2 "2017-10-04T05:05:06Z")

</div>

Yes, you can use the **Farmware** page _Camera Calibration_ and _Weed Detector_ widgets to run the weed detection software, which is written in Python using OpenCV, and runs on the Raspberry Pi. You can also run plant detection (after camera calibration) using the `Run Farmware` step in the Sequence builder.

If you would like to run your own python code, you would package and install it as a [Farmware](https://software.farmbot.io/docs/farmware-dev) and it would run on the Raspberry Pi.

---

<div class="post-metadata">

**Author:** ![ritesh](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/r/4af34b/32.png) [@ritesh](https://forum.farmbot.org/u/ritesh)\
**Post date:** [October 4, 2017, 2:18pm UTC](https://forum.farmbot.org/t/image-processing-with-opencv-and-python-on-raspberry-pi/2671/3 "2017-10-04T14:18:20Z")

</div>

thanks for this fast reply. as per your answer I have to package my algo python script on farmware and send command through server to run that script right ?

---

<div class="post-metadata">

**Author:** ![Klimbim](https://forum.farmbot.org/user_avatar/forum.farmbot.org/klimbim/32/1240_2.png) [@Klimbim](https://forum.farmbot.org/u/Klimbim)\
**Post date:** [October 4, 2017, 9:09pm UTC](https://forum.farmbot.org/t/image-processing-with-opencv-and-python-on-raspberry-pi/2671/4 "2017-10-04T21:09:09Z")

</div>

> [@ritesh](#):
>
> I have to package my algo python script on farmware and send command through server to run that script right ?

First part yes, second part you would need to install your farmware packge from a form of an internet url I guess; At the moment I don`t know how you can distribute farmware packages or how you could only install them “locally”…

@Gabriel I just saw that there are packages like camera calibration etc. in the dropdown list on the farmwares page; What is that exactly, nothing happens if I click run, when did you introduce them and do they work?

---

<div class="post-metadata">

**Author:** ![Gabriel](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/g/9de0a6/32.png) [@Gabriel](https://forum.farmbot.org/u/Gabriel)\
**Post date:** [October 4, 2017, 9:30pm UTC](https://forum.farmbot.org/t/image-processing-with-opencv-and-python-on-raspberry-pi/2671/5 "2017-10-04T21:30:02Z")

</div>

Yes, you can follow the documentation for the [Camera Calibration](https://software.farmbot.io/docs/farmware#section-camera-calibration) and [Weed Detector](https://software.farmbot.io/docs/farmware#section-weed-detector) to use the farmwares in the widgets.
