# Processing Player Component Input Through Python

**URL:** <https://forum.rtmaps.com/t/processing-player-component-input-through-python/122>\
**Category:** EcoCAR EV Challenge\
**Tags:** how-to\
**Created:** [September 26, 2024, 10:57pm UTC](https://forum.rtmaps.com/t/processing-player-component-input-through-python/122 "2024-09-26T22:57:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manav\_Gurnani](https://forum.rtmaps.com/user_avatar/forum.rtmaps.com/manav_gurnani/32/67_2.png) [@Manav\_Gurnani](https://forum.rtmaps.com/u/Manav_Gurnani)\
**Post date:** [September 26, 2024, 10:57pm UTC](https://forum.rtmaps.com/t/processing-player-component-input-through-python/122/1 "2024-09-26T22:57:56Z")

</div>

I currently have a .rec file that I have extracted frames from. One of the outputs from this object is a stream of IPL Images. I’m looking to build a python component (through the Python bridge) that can process the image into a NumPy array for further processing. I have already tried passing the input image into the `.asarray()` function, but the shape of the new NumPy array seems to be empty. Looking to see if there is a way to process IPL Images coming from the Player component to process it as a NumPy array.

 ![image](https://forum.rtmaps.com/uploads/default/original/1X/c655080a88000ba7ebabf6f1f4173ad88f722781.png)

---

<div class="post-metadata">

**Author:** ![sperrin](https://forum.rtmaps.com/letter_avatar_proxy/v4/letter/s/c5a1d2/32.png) [@sperrin](https://forum.rtmaps.com/u/sperrin)\
**Post date:** [October 18, 2024, 6:34pm UTC](https://forum.rtmaps.com/t/processing-player-component-input-through-python/122/2 "2024-10-18T18:34:37Z")

</div>

Check out the Python Bridge image samples at

`RTMapsInstallLocation\packages\rtmaps_python_bridge\samples\Chapter4_Data_Processing\sample5_images_add.py`

```
    # Get inputs IOElt
    image1 = self.inputs["image1"].ioelt.data
    image2 = self.inputs["image2"].ioelt.data
    
    # We convert arrays to int32 to avoid overflows
    res = np.array(image1.image_data, dtype=np.int32) + np.array(image2.image_data, dtype=np.int32)
    np.clip(res, 0, 255, out=res)
    image1.image_data = np.array(res, dtype=np.uint8)

```
