# Composable Overlay not working on PYNQ-ZU

**URL:** <https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821>\
**Category:** Support\
**Created:** [March 10, 2022, 8:34am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821 "2022-03-10T08:34:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZI-YIN\_Hong](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/zi-yin_hong/32/2915_2.png) [@ZI-YIN\_Hong](https://discuss.pynq.io/u/ZI-YIN_Hong)\
**Post date:** [March 10, 2022, 8:00am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/1 "2022-03-10T08:00:35Z")

</div>

Moderator edit: moved to support category

I run 08\_webcam\_pipeline.ipynb on PYNQ\_ZU  
([http://localhost:9090/notebooks/composable-pipeline/custom\_pipeline/08\_webcam\_pipeline.ipynb](http://localhost:9090/notebooks/composable-pipeline/custom_pipeline/08_webcam_pipeline.ipynb))

and I encounter below error:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/8/89977ca3ba97966e2bb0be6e382ed04c9fa991ab.png)  
why is this happen? and how can I fix it?

---

<div class="post-metadata">

**Author:** ![ZI-YIN\_Hong](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/zi-yin_hong/32/2915_2.png) [@ZI-YIN\_Hong](https://discuss.pynq.io/u/ZI-YIN_Hong)\
**Post date:** [March 10, 2022, 8:34am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/2 "2022-03-10T08:34:21Z")

</div>

also, when I am running /composable-pipeline/custom\_pipeline/09\_mipi\_pipeline.ipynb,  
below error occurs…

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/2/23e84d272f424ee4893c4a97616ab5e6fb10bdba.png)

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [March 10, 2022, 8:37am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/3 "2022-03-10T08:37:56Z")

</div>

Hi @ZI-YIN_Hong,

What PYNQ SD Card image are you using?  
I would suggest you use the SD Card image 2.7 and follow the steps to install the composable overlay 1.0.0 [GitHub - Xilinx/PYNQ\_Composable\_Pipeline: PYNQ Composabe Overlays](https://github.com/Xilinx/PYNQ_Composable_Pipeline#install-composable-pipeline-on-your-board)

The second error about the PCam 5C, did you connect the PCam 5C camera into the MIPI connector?

Mario

---

<div class="post-metadata">

**Author:** ![ZI-YIN\_Hong](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/zi-yin_hong/32/2915_2.png) [@ZI-YIN\_Hong](https://discuss.pynq.io/u/ZI-YIN_Hong)\
**Post date:** [March 21, 2022, 3:05am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/4 "2022-03-21T03:05:02Z")

</div>

yes, the PYZQ version I’m using is 2.7 and I installed the composable overlay 1.0.0 as you said  
(my board is PYNQ-ZU)  
and I run [PYNQ\_Composable\_Pipeline/08\_webcam\_pipeline.ipynb at main · Xilinx/PYNQ\_Composable\_Pipeline · GitHub](https://github.com/Xilinx/PYNQ_Composable_Pipeline/blob/main/pynq_composable/notebooks/custom_pipeline/08_webcam_pipeline.ipynb)

however I got below error:  
**cv2.error: OpenCV(4.2.0) …/modules/imgcodecs/src/loadsave.cpp:730: error: (-215:Assertion failed) !buf.empty() in function ‘imdecode\_’**

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/0/0bb0becb5c1ab1e7b481bb83fc2f7c0400696373.png)

---

<div class="post-metadata">

**Author:** ![ZI-YIN\_Hong](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/zi-yin_hong/32/2915_2.png) [@ZI-YIN\_Hong](https://discuss.pynq.io/u/ZI-YIN_Hong)\
**Post date:** [March 21, 2022, 4:10am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/5 "2022-03-21T04:10:18Z")

</div>

for the second question, yes I did connect the PCAM 5C camera  
and I tried below notebook, and can run successfully

> <https://github.com/Xilinx/PYNQ_Composable_Pipeline/blob/main/boards/Pynq-ZU/notebooks/custom_pipeline/09_mipi_pipeline.ipynb>

so, what is the problem here, is it because binary file “…/overlay/ **cv\_dfx\_4\_pr.bit** ” I used has bugs,  
(and it’s the old version? v1.0?)  
or because that **HDMIVideo** function is deprecated.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/7/7c28b6a4061191b5dd1e612fffd07b52dc828e9f.png)

and how can I probably fix it?

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [March 21, 2022, 8:43am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/6 "2022-03-21T08:43:38Z")

</div>

I am confused now, what notebook is not working? It seems that you could run the one with the MIPI camera but not the webcam.

> so, what is the problem here, is it because binary file “…/overlay/ **cv\_dfx\_4\_pr.bit** ” I used has bugs,  
> (and it’s the old version? v1.0?)

Not that I am aware of, however you do have the bitstream in two different places, did you copy this manually?

Mario

---

<div class="post-metadata">

**Author:** ![ZI-YIN\_Hong](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/zi-yin_hong/32/2915_2.png) [@ZI-YIN\_Hong](https://discuss.pynq.io/u/ZI-YIN_Hong)\
**Post date:** [March 21, 2022, 8:59am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/7 "2022-03-21T08:59:16Z")

</div>

I just fixed the MIPI notebook, so let’s forget about it.  
(I use the URL in setup.py in your repo and download the newest overlay for PYNQ-ZU, and adjust my code, now it’s working properly, thanks for your code and resource. 🙂)

However, I am running your notebook file for webcam, and it has below error, how can I fix it?

> <https://github.com/Xilinx/PYNQ_Composable_Pipeline/blob/57af006048d2932d94b80a0eb0965a30d873f1a5/pynq_composable/notebooks/custom_pipeline/08_webcam_pipeline.ipynb>

(Is it anything to do with my device?)

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/5/5fa0ed3b6c577073a90fbc90cbdf5edbf0eea29c.png)

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [March 21, 2022, 9:01am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/8 "2022-03-21T09:01:59Z")

</div>

Is the webcam connected?  
Did you try the notebooks in common that use the webcam?

---

<div class="post-metadata">

**Author:** ![ZI-YIN\_Hong](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/zi-yin_hong/32/2915_2.png) [@ZI-YIN\_Hong](https://discuss.pynq.io/u/ZI-YIN_Hong)\
**Post date:** [March 21, 2022, 9:06am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/9 "2022-03-21T09:06:29Z")

</div>

yes, it’s connected.  
notebooks/common/usb\_webcam.ipynb?  
I just tried notebooks/common/usb\_webcam.ipynb, and it was working properly.

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [March 21, 2022, 9:12am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/10 "2022-03-21T09:12:18Z")

</div>

Hi,

Can you please run these commands in a [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/user/terminal.html) terminal and report the output?

```nohighlight
lsusb

```

and

```nohighlight
lsusb -t

```

What USB camera are you using?

Mario

---

<div class="post-metadata">

**Author:** ![ZI-YIN\_Hong](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/zi-yin_hong/32/2915_2.png) [@ZI-YIN\_Hong](https://discuss.pynq.io/u/ZI-YIN_Hong)\
**Post date:** [March 21, 2022, 9:21am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/11 "2022-03-21T09:21:30Z")

</div>

webcam is on USB3.0 port3

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/8/87493ac0be6f5085d6d9cadc3ff28986354404f7.png)  
I am not sure the webcam resolution, I will check later.  
(are there any command line that I can check?)

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [March 21, 2022, 9:47am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/12 "2022-03-21T09:47:24Z")

</div>

Try to run this

```nohighlight
v4l2-ctl --list-devices

```

My feeling is that the camera is not device 0, hence the error. But, we need to run this command to make sure

---

<div class="post-metadata">

**Author:** ![ZI-YIN\_Hong](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/zi-yin_hong/32/2915_2.png) [@ZI-YIN\_Hong](https://discuss.pynq.io/u/ZI-YIN_Hong)\
**Post date:** [March 24, 2022, 2:58am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/13 "2022-03-24T02:58:56Z")

</div>

> [@marioruiz](#):
>
> `v4l2-ctl --list-devices`

Hi @marioruiz :  
So I can run the webcam notebook from your repo when I start-up the PYNQ-ZU board,

> <https://github.com/Xilinx/PYNQ_Composable_Pipeline/blob/main/pynq_composable/notebooks/custom_pipeline/08_webcam_pipeline.ipynb>

However, when I want to run it second time, it cause error at below cell

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/0/070bce127148ad52d598d91ede00d998a4e87740.png)

and seem that it can only run once successfully after starting-up the board,  
what is the problem here?

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [March 24, 2022, 8:49am UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/14 "2022-03-24T08:49:47Z")

</div>

Is the previous notebook still running?  
Did you release the resources in the previous notebook?

Can you provide the exact steps to reproduce this?

---

<div class="post-metadata">

**Author:** ![cking](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/cking/32/5476_2.png) [@cking](https://discuss.pynq.io/u/cking)\
**Post date:** [February 8, 2023, 5:03pm UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/15 "2023-02-08T17:03:46Z")

</div>

Hi ZI-YIN\_Hong

I also get the same issue (using an e-con systems see-3cam usb camera attatched to the Kria Kv260 running Pynq3.0.1 with Ubuntu 22.04).  
When running the compsable overlay examples (08\_webcam\_pipeline or common-\>usb\_webcam) the camera works upon first attempt after booting the board, but presents either this error:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/8/828d45481760c2140c7d7eef8f5f4e63234b39c1.jpeg)  
or this error:  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/f/fe2fd78be5f49edfa83d81458e22dd9467444aca.png)

very strange behaviour, even resetting the kernel or disconnecting and reconnecting jupyter connection doesn’t work, only a hard reset on the board.

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [February 8, 2023, 5:33pm UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/16 "2023-02-08T17:33:44Z")

</div>

Hi Cameron,

You can try to unplug the camera and plug it back.  
This issue should be fixed on Composable 1.1.0 (beta), but it seems that you are still on Composable 1.0.0

Mario

---

<div class="post-metadata">

**Author:** ![cking](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/cking/32/5476_2.png) [@cking](https://discuss.pynq.io/u/cking)\
**Post date:** [February 9, 2023, 12:03pm UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/17 "2023-02-09T12:03:13Z")

</div>

Hi Mario,

Thanks for the feedback, I am using the pynq composable overlay that came pre installed on the PYNQ 3.0.1 image (note: the images in my last post were copied and pasted from the original post not my jupyter nb, but messages are the same).  
How would I go about updating to composable 1.1.0 (beta), do I clone the repo?

Thanks,  
Cameron

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [February 9, 2023, 1:32pm UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/18 "2023-02-09T13:32:00Z")

</div>

Hi Cameron,

> I am using the pynq composable overlay that came pre installed on the PYNQ 3.0.1 image (note: the images in my last post were copied and pasted from the original post not my jupyter nb, but messages are the same).

Then you should have the latest version of the composable overlay.

Mario

---

<div class="post-metadata">

**Author:** ![cking](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/cking/32/5476_2.png) [@cking](https://discuss.pynq.io/u/cking)\
**Post date:** [February 9, 2023, 1:39pm UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/19 "2023-02-09T13:39:23Z")

</div>

Hi Mario,

Yeah I’m not sure why it’s happening. Seems to corrupt the display port output as even after running the stop webcam block, the display port output doesnt return to ubuntu (in my case command line ubuntu 22.04) but remains black. It still can be communicated to through the root terminal notebook within jupyter however.

Cameron

---

<div class="post-metadata">

**Author:** ![cking](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/cking/32/5476_2.png) [@cking](https://discuss.pynq.io/u/cking)\
**Post date:** [February 9, 2023, 4:04pm UTC](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821/20 "2023-02-09T16:04:28Z")

</div>

Hi Mario,

Update: changed usb webcam to a logitech C920 from the e-con systems see3CAM\_CU30 and it seems to be more stable. Does not crash the display port output with every execution like before.

Thanks,  
Cameron

[Next page](https://discuss.pynq.io/t/composable-overlay-not-working-on-pynq-zu/3821.md?page=2)
