# ValueError: Expected a mutable image

**URL:** <https://forums.openmv.io/t/valueerror-expected-a-mutable-image/9044>\
**Category:** OpenMV Boards\
**Created:** [December 28, 2023, 2:09pm UTC](https://forums.openmv.io/t/valueerror-expected-a-mutable-image/9044 "2023-12-28T14:09:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MauricioDias](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@MauricioDias](https://forums.openmv.io/u/MauricioDias)\
**Post date:** [December 28, 2023, 2:09pm UTC](https://forums.openmv.io/t/valueerror-expected-a-mutable-image/9044/1 "2023-12-28T14:09:18Z")

</div>

Hello,

I want to know why this code:

import sensor  
import time  
import machine

sensor.reset() # Reset and initialize the sensor.  
sensor.set\_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)  
sensor.set\_framesize(sensor.HD) # Set frame size to QVGA (320x240)  
sensor.skip\_frames(time=2000) # Wait for settings take effect.

while(True):  
img = sensor.snapshot()  
img.find\_circles()

Generates this error:

![image](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/2X/2/25d8a3e5a3c5d170696d75c8e4f692a316c05a3f.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 28, 2023, 2:52pm UTC](https://forums.openmv.io/t/valueerror-expected-a-mutable-image/9044/2 "2023-12-28T14:52:07Z")

</div>

Hi, which board are you using? Does it have SDRAM? If not, then there’s not enough RAM to store the image and we converted it to bayer which is a format we primarily use for just viewing. However, most of our functions cannot process it.

You need to lower your resolution.

---

<div class="post-metadata">

**Author:** ![MauricioDias](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@MauricioDias](https://forums.openmv.io/u/MauricioDias)\
**Post date:** [December 28, 2023, 4:24pm UTC](https://forums.openmv.io/t/valueerror-expected-a-mutable-image/9044/3 "2023-12-28T16:24:20Z")

</div>

Thank you for the explanation.

Im using Nicla Vision and I think that is exactly the problem.

---

<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 28, 2023, 6:11pm UTC](https://forums.openmv.io/t/valueerror-expected-a-mutable-image/9044/4 "2023-12-28T18:11:04Z")

</div>

Yeah, you need to stay at 320x240 or lower.

---

<div class="post-metadata">

**Author:** ![MauricioDias](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@MauricioDias](https://forums.openmv.io/u/MauricioDias)\
**Post date:** [December 28, 2023, 6:47pm UTC](https://forums.openmv.io/t/valueerror-expected-a-mutable-image/9044/5 "2023-12-28T18:47:47Z")

</div>

> [@kwagyeman](#):
>
> 320x240

in fact using HVGA 480x320 is also possible to apply some methods.

Thank you again for the fast response
