# Covert Image to matrix

**URL:** <https://forums.openmv.io/t/covert-image-to-matrix/536>\
**Category:** OpenMV Boards\
**Created:** [December 29, 2017, 2:29am UTC](https://forums.openmv.io/t/covert-image-to-matrix/536 "2017-12-29T02:29:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skylin008](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@skylin008](https://forums.openmv.io/u/skylin008)\
**Post date:** [December 29, 2017, 2:29am UTC](https://forums.openmv.io/t/covert-image-to-matrix/536/1 "2017-12-29T02:29:30Z")

</div>

Hello everyone! I want Image to dehazing processing,need covert image pixel value to matrix .But when run the script,the error information as show,had any method to finish this function.Thanks kindly support!  
 ![%(2JQYGJOFV_T~NC(YJW1X8.png](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/1X/02168b0b3d7cacb612e179dd0921ae80caff2bd1.png)  
![5Q(`H8DFOX9[MWWPZ\_13KJ7.png|382x436](https://forums.openmv.io/uploads/short-url/x3HRwApDVPvs0MvJqXUneYUHUUl.png)

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [December 29, 2017, 3:09am UTC](https://forums.openmv.io/t/covert-image-to-matrix/536/2 "2017-12-29T03:09:49Z")

</div>

Hi, the python interface isn’t really meant for pixel level manipulation. You should write your code in C instead. There’s no way you can fit an image in the small heap space available in C. Most of the memory on the MCU is not accessible in Python world.

What algorithm are you trying to do by the way? Dehazing? Does that mean image sharpening? We have that built-in already.

---

<div class="post-metadata">

**Author:** ![skylin008](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@skylin008](https://forums.openmv.io/u/skylin008)\
**Post date:** [December 29, 2017, 6:27am UTC](https://forums.openmv.io/t/covert-image-to-matrix/536/3 "2017-12-29T06:27:15Z")

</div>

Thanks K kwagyeman,I will be try.
