Laex / Delphi-OpenCV-Class

Experimental Delphi binding for OpenCV 4.XX
Apache License 2.0
87 stars 26 forks source link

some questions about the OpenCV components #46

Open HR1959 opened 1 month ago

HR1959 commented 1 month ago

Dear Laentir,

after some time I come back to my approach to use OpenCV in my application. I changed now to this version because it support also 64 Bit. So I am not continuing to work with the version 2.4.13. One reason is also the component packages you made: dclVCLOpenCV.dpk and rclFMXOpenCV.dpk.

It is very nice to just put two blocks as source (TCVCaptureSource) and sink (TCVView) together and things work.

But what is missing is a block in between for e. g. image processing (filtering, edge detection, etc.).

My questions are now:

  1. Do you plan to make such an open block where you can put in all image processing steps? If so for when?
  2. If not are you willing to support me to make such component?

Regards Harald

Laex commented 1 month ago
  1. In this project it was planned to develop components as an extension of Delphi-OpenCV (https://github.com/Laex/Delphi-OpenCV). Including components that perform transformation of pictures (matrices). Lack of time does not allow to deal with the project constantly
  2. The project is open to all developers, and I welcome offers to participate in the development of the project. This will help me to pay more attention to the project.
  3. From my side I am ready to devote more time to the part of the project - Delphi interface to C++ OpenCV functions.
HR1959 commented 4 weeks ago

Dear Laentir,

thank you for your quick reply. I am more than pleased to support you. But you should know that I am far from the level of knowledge you have about the matter and coding techniques. At least this is what I derive out of your code. I am just an old retired electrical engineer (65) who enjoys still learning new things and I have the advantage that I can no dedicate some time to things what I had no time during my professional life. Just to let you know I stopped generating code at the time of Delphi 5. Now we are at Delphi 12.2 I will continue to study your work more deeply. E. g. I want to understand the interface structure between the output of TCVCaptureSource and the input of TCView and TVVideoWriter. Once understood I hope I am able to generate what I call "the block in between". Another subject I am curious in is the event driven procedure always when a new frame arrives. It would be a simple task just to hang into this procedure the image processing functions. But the nicer (more elegant) approach would be this "block in between" because I like your concept of the components that exist so far which are “connected” via the property Source.

So let me know what I can do for you in bringing this forward. At least I will try my very best.

Regards Harald

HR1959 commented 4 weeks ago

Dera Leantir,

I am struggling to find the definition / declaration of TMat in the version for OpenCV 4.XX like I found it in the version 2.4.13 in the file ocv.cls.core.pas.

The background for my search is that I want to built two functions for TMat to TBitmap and vice versa for using the Canny edgedetector in my current application where i have a variable of the type TBitmap to work with.

Can you give me a hint?

Regards Harald

Laex commented 4 weeks ago

The definition of TMat is in the file "source\core\mat.inc" How to convert TMat to BITMAP (Windows format) can be found in the ipDraw function in "packages\CVClass.pas" ipDraw - as an example, it is very simple and does not support all possible image encoding options