# Find\_number function problem

**URL:** https://forums.openmv.io/t/find-number-function-problem/680
**Category:** OpenMV Boards
**Created:** [May 8, 2018, 4:46am UTC](https://forums.openmv.io/t/find-number-function-problem/680 "2018-05-08T04:46:46Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![yocheng](https://avatars.discourse-cdn.com/v4/letter/y/90ced4/32.png) [@yocheng](https://forums.openmv.io/u/yocheng)
#### Post date: [May 8, 2018, 4:46am UTC](https://forums.openmv.io/t/find-number-function-problem/680/1 "2018-05-08T04:46:46Z")

</div>

When I test the find\_number function, can I only set the length and width to 28 fixed? What if I want to change this value?

---

<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: [May 8, 2018, 5:19am UTC](https://forums.openmv.io/t/find-number-function-problem/680/2 "2018-05-08T05:19:08Z")

</div>

That method is just experimental. It’s not really usable right now since it doesn’t scale the image to the right size.

We plan to have full CNN support soon.

That said, if you are handy in C, we’d appreciate a PR to fix the code for find\_number so it can accept multiple scales.

---

<div class="post-metadata">

### Author: ![yocheng](https://avatars.discourse-cdn.com/v4/letter/y/90ced4/32.png) [@yocheng](https://forums.openmv.io/u/yocheng)
#### Post date: [May 8, 2018, 9:31am UTC](https://forums.openmv.io/t/find-number-function-problem/680/3 "2018-05-08T09:31:28Z")

</div>

> [@](#):
>
> That method is just experimental. It’s not really usable right now since it doesn’t scale the image to the right size.
> 
> We plan to have full CNN support soon.
> 
> That said, if you are handy in C, we’d appreciate a PR to fix the code for find\_number so it can accept multiple scales.

I will Ç language, can I change the code to adapt to my application size?  
What am I going to do?

---

<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: [May 9, 2018, 5:14am UTC](https://forums.openmv.io/t/find-number-function-problem/680/4 "2018-05-09T05:14:05Z")

</div>

You just need to edit this method here: [https://github.com/openmv/openmv/blob/master/src/omv/img/lenet.c#L89](https://github.com/openmv/openmv/blob/master/src/omv/img/lenet.c#L89)

Right now, layer 0 is just 28x28. Scaling the input before the data comes in fixes the issue. I have plans to add a scaling method to the firmware. However, I do not have time right now.

---

<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: [May 9, 2018, 5:14am UTC](https://forums.openmv.io/t/find-number-function-problem/680/5 "2018-05-09T05:14:05Z")

</div>

You just need to edit this method here: [https://github.com/openmv/openmv/blob/master/src/omv/img/lenet.c#L89](https://github.com/openmv/openmv/blob/master/src/omv/img/lenet.c#L89)

Right now, layer 0 is just 28x28. Scaling the input before the data comes in fixes the issue. I have plans to add a scaling method to the firmware. However, I do not have time right now.

---

<div class="post-metadata">

### Author: ![yocheng](https://avatars.discourse-cdn.com/v4/letter/y/90ced4/32.png) [@yocheng](https://forums.openmv.io/u/yocheng)
#### Post date: [May 9, 2018, 10:47am UTC](https://forums.openmv.io/t/find-number-function-problem/680/6 "2018-05-09T10:47:53Z")

</div>

> [@](#):
>
> You just need to edit this method here: [https://github.com/openmv/openmv/blob/master/src/omv/img/lenet.c#L89](https://github.com/openmv/openmv/blob/master/src/omv/img/lenet.c#L89)
> 
> Right now, layer 0 is just 28x28. Scaling the input before the data comes in fixes the issue. I have plans to add a scaling method to the firmware. However, I do not have time right now.

I will study the code first, but still hope you can add this function in the new firmware, because reading the numbers, this application is very common. Thank you!

---

<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: [May 10, 2018, 2:25am UTC](https://forums.openmv.io/t/find-number-function-problem/680/7 "2018-05-10T02:25:36Z")

</div>

We plan to release a much more general purpose CNN framework that can do everything. Basically, you’ll be able to load a NN for any class you’d like to find. This will be the first of it’s kind and super easy to use with low power consumption.

Um, also, I will add image scaling to the firmware.
