Any camera component with image frames? lazarus / 43-Android ---------------------------------------------------------------------- Michael Collier · 2022-03-16 15:22 I'd like to turn on the phone camera and grab each frame (i.e. 10 frames per second), maybe from some kind of callback event from the camera. Ideally I could then copy the frame data to a bitmap so I can process it, does anything like this exist already? ---------------------------------------------------------------------- Thaddy · 2022-03-16 15:35 libvlc - supported by Freepascal - can do that, but it is complex. AFAIK there are no easy solutions. And no: no components. I will see if I can come up with the least complex example. That will not be today or next week, though.... ---------------------------------------------------------------------- jmpessoa · 2022-03-16 16:51 Hi, Michael! Can you provide any java/android example/link ? If yes then I can try to build a LAMW wrapper component.... ---------------------------------------------------------------------- loaded · 2022-03-16 17:03 Can't the sample be modified for this job? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ...\lazandroidmodulewizard-master\demos\GUI\AppCustomCameraDemo1 ---------------------------------------------------------------------- Michael Collier · 2022-03-17 09:02 Quote from: loaded on March 16, 2022, 06:03:59 pmCan't the sample be modified for this job? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ...\lazandroidmodulewizard-master\demos\GUI\AppCustomCameraDemo1 Possibly, thanks.. I tried to get image out of the jCustomCamera1 component and into a jImageView1 that I placed on the form. But nothing worked for me, and worse case the app crashed. Any help on the appropriate function calls would be great ( I used things like ImageView1.SetImage() and jCustomCamera1.GetImage() ).. ---------------------------------------------------------------------- loaded · 2022-03-17 10:42 I think you can do what you want by examining other camera samples. (\AppCameraDemo or AppCameraDemo2) By the way, I would like to share an experience that came to my mind on the subject; A few years ago, I went to the field and wrote an application to take pictures of the buildings and parcels requested from me with coordinates from my mobile phone, save them in the database and associate them with the parcels on which they are located. I wanted to do this work with LAMW first, but I had serious problems with resolution and stability. In addition to these, I had to write the project entirely on Eclips when I had different problems on different phones in the team. Maybe it was because of my incompetence. I am not sure. If you want, you can download and test the related camera application from the play store. https://play.google.com/store/apps/details?id=com.cadplugin.fotoemlak& hl=tr&gl=US ---------------------------------------------------------------------- Michael Collier · 2022-03-17 12:30 On my system AppCameraDemo crashes the IDE and AppCameraDemo2 doesn't update the image as it is meant to (I guess). But I copied the source code over to my own test project and tried with jView and jCanvas components but remains blank. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   jView1.Canvas.DrawBitmap  (    jCustomCamera1.GetImage    (      jView1.Width    , jView1.Height    )  , jView1.Width  , jView1.Height  ) ;   I think the issue is that jCustomCamera1.GetImage isn't returning any image data? I can write text to the canvas as per demo, so I'm pretty certain my components are configured correctly.. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i jView1.Canvas.drawText('Hello People!', 30, 30); I don't think the camera component / TakePhoto option is any good for me as I need to grab frames at 10FPS, or maybe even 30FPS later. ---------------------------------------------------------------------- Michael Collier · 2022-03-18 06:37 Quote from: jmpessoa on March 16, 2022, 05:51:54 pmCan you provide any java/android example/link ? Maybe this might help? https://developer.android.com/reference/android/hardware/Camera.Previe wCallback ---------------------------------------------------------------------- Michael Collier · 2022-03-18 06:40 And this old example kind of explains what I'm already partly doing in a different set of dev tools. https://github.com/fyhertz/libstreaming