# Debayering images from cameras

**URL:** <https://discourse.processing.org/t/debayering-images-from-cameras/41520>\
**Category:** Libraries\
**Created:** [March 29, 2023, 8:43pm UTC](https://discourse.processing.org/t/debayering-images-from-cameras/41520 "2023-03-29T20:43:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![animalfrommars](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/animalfrommars/32/18060_2.png) [@animalfrommars](https://discourse.processing.org/u/animalfrommars)\
**Post date:** [March 29, 2023, 8:43pm UTC](https://discourse.processing.org/t/debayering-images-from-cameras/41520/1 "2023-03-29T20:43:10Z")

</div>

Hello,  
I’ve got to cameras from “Imaging Source”.  
I’ve just resolved the problem of connection but i receive raw images and need to Debayer it but don’t know how to do that…

I’ have also a problem with the video Library… cf. image attached.

 ![Capture d’écran du 2023-03-29 22-40-36](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/c/6/c6459956a97fe74f0ee40a450b2959f63c87679d.png)

Any advice is welcome.  
Thanks a lot.

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [March 29, 2023, 10:46pm UTC](https://discourse.processing.org/t/debayering-images-from-cameras/41520/2 "2023-03-29T22:46:57Z")

</div>

Hi again @animalfrommars,

Can you please post the logs in the console as a text block using the `</>` button when editing a message? (you can also put ``` around the text)

You can find more information on algorithms for demosaicing a raw input image:

> **[Demosaicing | Algorithms](https://en.wikipedia.org/wiki/Demosaicing#Algorithms)**
>
> These algorithms are examples of multivariate interpolation on a uniform grid, using relatively straightforward mathematical operations on nearby instances of the same color component. The simplest method is nearest-neighbor interpolation which simply copies an adjacent pixel of the same color channel. It is unsuitable for any application where quality matters, but can be useful for generating previews given limited computational resources. Another simple method is bilinear interpolation, whereb...

Maybe there’s already a library that does that but I don’t know much about it…

---

<div class="post-metadata">

**Author:** ![animalfrommars](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/animalfrommars/32/18060_2.png) [@animalfrommars](https://discourse.processing.org/u/animalfrommars)\
**Post date:** [April 12, 2023, 3:52pm UTC](https://discourse.processing.org/t/debayering-images-from-cameras/41520/3 "2023-04-12T15:52:29Z")

</div>

Hello Joseph,

Finally I bought two USB cameras (Mac/PC/Linux): SVPRO 4K Ultra HD USB Webcam and everything works.  
For the moment I continue to code on my Mac because I do not master Linux enough.

 ![Capture](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/d/f/dfb01db85c7a50295bdf17b9930a60842d2ecafb.jpeg)  
two video streams 1 blue and 1 white mapped on fragments

Thanks for everything !  
AnimalFromMars.
