2024-06-13 08:30 AM - edited 2024-06-13 08:31 AM
Hello there,
I want to recognize the digital and character written by hand with STM32F429BI.
I think there must be split into the following steps:
1. user input(write something in the screen by finger); (what widget I can use?)
2. transfer the screen pixel data to MCU from touchGFX; (How to get the partial pixel data in certain areas?)
3. MCU recognizes the content with some lib; (Can some Lib be used from ST?)
4. MCU sends the result to the screen for display; (I know how to do this only :face_with_tears_of_joy:)
Any advice and links are expected.
Thanks for your help.
Solved! Go to Solution.
2024-06-17 03:12 AM
Hello @Junde ,
In your project you are using a single line.
When you click "Generate line" you are actually changing your current line.
Therefore, when you set the new position of the line to be 100-0 and 200-300, you invalidate that area.
If you also do line.invalidate() at the beginning of the addline method, you will see only one line a the time.
Same thing for the delete line.
You are actually resizing the line and then invalidating. But since you set the since to be 0, when you invalidate, you invalidate an area of 0 pixels so nothing appears to change.
Regards,
2024-06-17 03:18 AM
Can you share the last project please?
2024-06-17 04:35 AM
Thanks for your help, see the project in the attachment.
2024-06-17 05:01 AM
You might want to have a look at this thread (and especially my last answer) : adding-containers-widgets-not-declared-in-screenview-hpp
Another option would be to avoid adding widgets completely by using a bitmap instead.
The advantage is that you would not add a single widget at runtime and therefore won't risk memory problems.
On the other hand, you will have to directly change the data of the bitmap which is not hard to do but you will have to track the last finger position and the most recent one (as I mentioned earlier) to create a custom line which will have to be your own code.
2024-06-17 06:01 AM
When you use one line object and change start end, image forget old line info and draw only new. Result is as your, but isnt overwriten. Right steps is set line to invisible invalidate change start end and back visible invalidate.
2024-06-18 11:38 AM
Many thanks for your pieces of advice and support.
Finally, I get the way!
The canvas line needs too much RAM, so I give it up.
I returned to the LTDC second layer(I think it's similar to the TouchGFX bitmap)
After some tries, it finally worked well.
I uploaded the project HERE for anyone wanting to have a reference.