Announcement

Collapse
No announcement yet.

Help me, please!

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help me, please!

    Dear Colleagues, I have to build a system that records the sequence of handwriting characters, of a short text in a DIN A4 format.

    Normally they are around 8-9 lines for a total of 50-60 words. writing is performed with a smartpen that has an infrared micro-camera which, using special patterns, almost invisible to the naked eye (NCODE® Technology), printed on the A4 sheet, locates on a digital Cartesian-Plane, the position of each pixel (on the x,y axis) and the value of intensity of the pressure exerted by the person writing . This smartpen has its own system for Windows to visualize what is written by the smartpen. It also has its own sdk for developers that I should use to intercept the smartpen action.

    What I have to do is record this writing sequence so that it can be relived and analyzed as each single character has been written. I omit the details of the analysis that relates to a specific use in the field of employer profiling.


    I don't have the experience to be able to evaluate the feasibility in Powerbasic and for this I ask the friends of the forum (which is the only thing that survives the sad events of some years ago).

    Now, I try to unfold better.
    What I would like to do in PBCC6 or PBWIN10 is a window where the pen action is dynamically displayed until the short text is completed. It is necessary to be able to save this writing sequence in the window, so that a human operator can observe (and verify) the result written by a specific software for Handwriting Recognition and Analysis.

    I would like to be able to do what described entirely in Powerbasic without any third-party resource, taking advantage of the Windows10 API, in the Powerbasic SDK style coding|environment (no DDT). The most difficult problem for me is to obtain, a form of "video" that can be seen and reviewed numerous times, it doesn't have to be a "video", it can also be a sequence of bitmapped images, saved and read in rapid succession, with the possibility of being able to vary the display speed of the image sequences.

    Is it possible to do it with Powerbasic?
    Which Windows10 API should I study to implement this system to integrate into the rest of the application? I thank in advance those who want to dedicate their time to show me their possible way forward. Right now I have so many ideas that have no legs to go further than where I arrived.

    Maybe it's the sign of the time that wants to tell me, pull the plug, and retire. Life is only one, even if life, in a nutshell, is always a continuous solution of problems and choices that must be made. I chose to continue but ... I can't see how to go on staying in the powerbasic world ...

    I don't ask code in pb, just tips and suggestions how to think about the system...


    Post Scriptum

    I hope I was able to explain my request for help. Unfortunately I am not good enough in English and therefore I apologize to those who find it difficult to understand my request.
    Last edited by Mimmo Labate; 15 Jun 2019, 09:47 AM.

  • #2
    Hi Mimmo

    You could try using Powerpaint.bas which provided in the PB sample, as attached here.
    Select the Freehand option to draw the hand writing using the mouse instead of smartpen or camera.

    Then click on save button to save the image as a BMP file, which you can analyze later?

    Attached Files

    Comment


    • #3
      to me the video part is the easy one.

      https://forum.powerbasic.com/forum/u...-from-pb-s-dib

      sll version here:

      https://forum.powerbasic.com/forum/u...i-code?t=59995
      BASIC shampoo - DO:LATHER:RINSE:LOOP UNTIL CLEAN <>0

      Comment


      • #4
        Hi Anne, thanks for your suggestion. It will be very useful to understand how to proceed in writing the pixels inside the window to monitor the writing sequence. The theme here is to understand how the text is written. It doesn't matter what is written. The meaning of the text must not be analyzed. But only the dynamics of writing in space and the pressure exercised in writing. It is based on the concept that writing represents an encelophalogram relative to the moment of writing. There are not two completely identical scriptures. Like fingerprints.

        I found a short video on the internet that shows what I have to record. The dynamic sequence to save is possibile to see between minute 1.03 and 1.50. In this video the handwriting is obtained writing directly on the screen. Here is simplier...

        Here is the link to the short video shown:

        https://m.youtube.com/watch?v=QUrfb0ur8Tk
        Last edited by Mimmo Labate; 16 Jun 2019, 08:44 AM.

        Comment


        • #5
          Hi Frank, I looked at your code and your kitten and I think this is the way to go!
          In a nutshell, I need to make a video through a screen-capture sequence done every tenth of a second. By progressively assembling these images incrementally, you get the video. All I need to do is see how much the maximum file size can be saved.
          Thank you very much for your illuminating example. I will study it carefully to learn your technique, because I find it simple and clever.

          Thank you very much for directing me in the right direction of my journey.

          Comment


          • #6
            Thanks to the generous contributions of the friends of this forum, I am now able to understand the right direction for the development of the writing monitoring window.
            The next step is a really arduous task: to discover how to represent (i.e. how to model, in an analytical sense, to compare) the concepts of roundness and angularity of the handwriting in the memory of the computer.

            Any idea is welcome!

            So far I have studied the algorithms of Bezier, de Casteljau and Chaikin to reconstruct, through formulas of analytical geometry in the plane, the shapes of handwritten letters. This serves, I hope, to be able to compare the handwriting to be analyzed with the prototypes of the letters reference model...
            Last edited by Mimmo Labate; 16 Jun 2019, 08:40 AM.

            Comment


            • #7
              Mimmo

              There are examples in the forum which can be used to draw spline curves over salient points (assuming they were derived from handwriting analysis?)
              With these generated spline curves you can analyze further whether the hand writing was genuine or not as written by the same person.

              Please look at Jose's codes

              for closed spline curves
              https://forum.powerbasic.com/forum/j...736#post607736

              for best fit spline curve
              https://forum.powerbasic.com/forum/j...738#post607738


              and linear regression by Erik

              http://forum.powerbasic.com/forum/us...bwin10?t=53149




              Comment


              • #8
                Also Beziar curve by Jose

                https://forum.powerbasic.com/forum/j...amples?t=49983

                Comment


                • #9
                  Hi Anne, I apologize for the delay to say thank you for your time and I hope I can help you when (and if) you need in the near future.
                  Thank you very much, Anne!

                  After careful reflections made together with the whole group (we are seven people, 4 very young and 3 quite old, I am the oldest, I wrote code for 42 years, since I was 15) who collaborates on this important project strongly desired by an important Italian university that has a degree course in the field of handwriting analysis in various fields.

                  We have designed all 5 parts of the project

                  - Word segmentation,
                  - Character Segmentation
                  - Hashing for shape similarity
                  - Recognition and Analysis
                  - Classification and Final Report


                  and unfortunately for me, we have decided to use a C / C ++ framework for cross-platform development!

                  At this point, I would like to expressly ask Adam J. Drake and his company, when is it expected to release something tangible, assessable to avoid having to make really hard and painful choices like this?

                  We need a language developed by a community of people that do not depend on a single mind and can be financed by their sales and donations. We need a compiler in the state of the art, without compromises (for the moment 32 bits are fine, but the future arrives and arrives early) which allows us to develop with vectors and matrices, efficiently exploiting every single core of the new and powerful processors (intel, amd, nvidia) to create sophisticated and powerful algorithms, such as SIFT [1] or SURF [2], which allow us to enter the world of recognizing shapes and objects even in 3D

                  Adam, honestly, do you think this is just a wonderful utopia, a wonderful dream? Anyway, I thank you and your company for giving us more hope. It is said to my little country that "hope is always the last to die". And I, in my soul, hope that Powerbasic will continue to grow so as to exceed the sales value of Drake Enterprise.

                  Unfortunately now, I find myself in the situation where Mark Twain's words sound perfect. "Twenty years from now you will be disappointed by the things you did not by the ones you did. I know throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails ".

                  And I hope to arrive, sailing, with slow but relentless navigating, in my new (may be the last) harbor... It was necessary to make Decision that are Convinced and to Implement Concrete Actions.

                  It was no longer possible wait for Godot (i.e. Samuel Beckett's book)...



                  [1] Scale Invariant Feature Transform
                  [2] Speeded Up Robust Features
                  Last edited by Mimmo Labate; 23 Jun 2019, 04:43 AM.

                  Comment


                  • #10
                    Using PBCC 4 and PBWin 8 it was possible to make a movie by rapidly displaying a sequence of pictures See for example here (PBCC 4). But this is not possible in the versions that followed, PBCC 5 & 6 and PBWin 9 & 10. If you compile the same source code in the later versions the resulting executable makes movies that are slow and flickery.

                    The following forum threads might indicate the problem – I did a quick search but don’t have time to make sure they’re relevant:

                    Graphic drawing speed and window dragging

                    Programs run faster while holding down the mouse

                    Why does process priority change

                    Graphics slow until you grab & hold the title bar



                    Politically incorrect signatures about immigration patriots are forbidden. Googling “immigration patriots” is forbidden. Thinking about Googling ... well, don’t even think about it.

                    Comment


                    • #11
                      The third one. “Why does process priority change,” might be the most helpful, especially its post #19. In post #24 I make the point about something having changed in the latest compilers.
                      Politically incorrect signatures about immigration patriots are forbidden. Googling “immigration patriots” is forbidden. Thinking about Googling ... well, don’t even think about it.

                      Comment

                      Working...
                      X