Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-02

5dpo components last update

11 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Paulo Costa

Hi,

The last update for the 5dpo components:
http://wiki.lazarus.freepascal.org/5dpo#About

can be found here:
https://sourceforge.net/p/sdpo-cl/mercurial/ci/default/tree/ or
https://sourceforge.net/projects/sdpo-cl/files/latest/download

The most important changes are:
- TSdpoSerial tested and working on the Raspberry Pi 2.

- TSdpoFreenect can read the RGB and depth images from the original Xbox Kinect. It works in Linux and uses the OpenKinect driver.

  - TDMatrix now supports element access like an array: A[r, c] := B[r,
c] + 1.0;

An example:

uses dynmatrix;

...

function DoSomething(A, B: TDMatrix): TDMatrix;
begin
   A := Meye(4);   // 4 x 4 Identity matrix
   B := MZeros(4, 4);  // 4 x 4 zeros matrix
   A := 2 * A + B;
   A[1, 2] := B[2, 2] + 3.0;
   result := A;
end;

Regards,

Paulo Costa

Reply by email

Paulo Costa
to Michael Van Canneyt
Michael Van Canneyt wrote 5 lines
> The most important changes are: > - TSdpoSerial tested and working on the Raspberry Pi 2. > Question: can these components be used to work with the pi's camera ?

I have not tested yet (is in my to do list) but the UVC component should work if the camera V4L driver does what is expected. In the beginning, a V4L driver didn't exist. Then, there was a user space driver and now, I have read that a proper kernel driver exits. As soon as I can test it, I'll let you know.

Regards,

Paulo Costa

Reply by email

Michael Van Canneyt
to Paulo Costa
Paulo Costa wrote 13 lines
On 11-Feb-16 21:48, Michael Van Canneyt wrote: >> The most important changes are: >> - TSdpoSerial tested and working on the Raspberry Pi 2. >> > > Question: can these components be used to work with the pi's camera ? I have not tested yet (is in my to do list) but the UVC component should work if the camera V4L driver does what is expected. In the beginning, a V4L driver didn't exist. Then, there was a user space driver and now, I have read that a proper kernel driver exits. As soon as I can test it, I'll let you know.

Great, I am eagerly awaiting the result of your tests !

Michael.

Reply by email

Paulo Costa
to Michael Van Canneyt
Michael Van Canneyt wrote 10 lines
On Thu, 11 Feb 2016, Paulo Costa wrote: > On 11-Feb-16 21:48, Michael Van Canneyt wrote: >>> The most important changes are: >>> - TSdpoSerial tested and working on the Raspberry Pi 2. >>> >> >> Question: can these components be used to work with the pi's camera ?

Now I can answer:

Yes! The UVC component (TSdpoVideo4L2) works with the native V4L2 driver!

With a raspberry pi 2, I've captured and displayed a 640x480 image at 30 fps.
I can send you the code if you want.

The supplied example does not work out of the box because the gtk based form viewer component isn't working with the raspberry pi. I had to replace it with a bgrabitmap based one. That adds one more dependency. Do you have any suggestion for a fpc "native" alternative?

Paulo Costa

Reply by email

Michael Van Canneyt
to Paulo Costa
Paulo Costa wrote 15 lines
On 11-Feb-16 23:33, Michael Van Canneyt wrote: > > > On Thu, 11 Feb 2016, Paulo Costa wrote: > >> On 11-Feb-16 21:48, Michael Van Canneyt wrote: >>>> The most important changes are: >>>> - TSdpoSerial tested and working on the Raspberry Pi 2. >>>> >>> >>> Question: can these components be used to work with the pi's camera ? Now I can answer: Yes! The UVC component (TSdpoVideo4L2) works with the native V4L2 driver!

Great news.

With a raspberry pi 2, I've captured and displayed a 640x480 image at 30 fps. I can send you the code if you want.

Yes, please !!

Can you also send me the complete configuration you used ? (model pi, raspbian version, fpc, laz etc.)

I would like to write an article for Blaise Pascal magazine, the editor will be very pleased to hear this, he has been asking for it since a long time :)

The supplied example does not work out of the box because the gtk based form viewer component isn't working with the raspberry pi. I had to replace it with a bgrabitmap based one. That adds one more dependency. Do you have any suggestion for a fpc "native" alternative?

You mean an image component ? What is missing in the ones in fpImage ?

Michael.

Reply by email

Paulo Costa
to Michael Van Canneyt
Michael Van Canneyt wrote
Can you also send me the complete configuration you used ?

The setup:

Raspberry Pi 2 Model B
Raspbian Jessie (Debian version 8.0)
Lazarus 1.2.4+dfsg2-1 (It is the version available on their repository. Call me lazy :)
fpc 2.6.4+dfsg-4+rpi1 (Again, it is the version available on their repository.)

I have update the repository to include the Raspberry Pi example.

I would like to write an article for Blaise Pascal magazine, the editor will be very pleased to hear this, he has been asking for it since a long time :)

Nice :)

Show quoted text 6 lines
> The supplied example does not work out of the box because the gtk > based form viewer component isn't working with the raspberry pi. I had > to replace it with a bgrabitmap based one. That adds one more > dependency. Do you have any suggestion for a fpc "native" alternative? You mean an image component ? What is missing in the ones in fpImage ?

When I was investigating fpImage, in the wiki
(ttp://wiki.freepascal.org/fcl-image) came across with this: "fcl-image is written for maximal portability and maintainability and is quite slow. The main storage type is 16-bit RGBA, storing always 64-bit per pixel, and a function is called to get each pixel."

That does not seem good for showing a 640x480 image 30 times per second. If the problem was only showing the image, the native overlay capabilities could take of that, but usually we want to show also the processed image.
For the bgrabitmap I need only to do a direct copy of the acquired buffer to its internal storage.

Regards,

Paulo Costa

Reply by email

Michael Van Canneyt
to Paulo Costa
Paulo Costa wrote 13 lines
On 12-Feb-16 16:04, Michael Van Canneyt wrote: > Can you also send me the complete configuration you used ? The setup: Raspberry Pi 2 Model B Raspbian Jessie (Debian version 8.0) Lazarus 1.2.4+dfsg2-1 (It is the version available on their repository. Call me lazy :) fpc 2.6.4+dfsg-4+rpi1 (Again, it is the version available on their repository.) I have update the repository to include the Raspberry Pi example.

Thank you.

Show quoted text 20 lines
> I would like to write an article for Blaise Pascal magazine, the editor > will > be very pleased to hear this, he has been asking for it since a long > time :) Nice :) >> The supplied example does not work out of the box because the gtk >> based form viewer component isn't working with the raspberry pi. I had >> to replace it with a bgrabitmap based one. That adds one more >> dependency. Do you have any suggestion for a fpc "native" alternative? > > You mean an image component ? What is missing in the ones in fpImage ? When I was investigating fpImage, in the wiki (ttp://wiki.freepascal.org/fcl-image) came across with this: "fcl-image is written for maximal portability and maintainability and is quite slow. The main storage type is 16-bit RGBA, storing always 64-bit per pixel, and a function is called to get each pixel."

That information is old and outdated.
You can perfectly have other storage formats in any buffer you like.

But a dependency on bgrabitmap is not the end of the world.

Michael.

Reply by email

Marc Santhoff
to Paulo Costa: I have not tested yet (is in my to do list) but the UVC component should work if the…
Paulo Costa wrote 13 lines
On 11-Feb-16 21:48, Michael Van Canneyt wrote: >> The most important changes are: >> - TSdpoSerial tested and working on the Raspberry Pi 2. >> > > Question: can these components be used to work with the pi's camera ? I have not tested yet (is in my to do list) but the UVC component should work if the camera V4L driver does what is expected. In the beginning, a V4L driver didn't exist. Then, there was a user space driver and now, I have read that a proper kernel driver exits. As soon as I can test it, I'll let you know.

Is that code for the user space driver open? Can you give a pointer, repository link or similar?

Working on FreeBSD the V4L implementation is somewhat behind. From my last tests only working at level of 4VL1 and having a user space driver would give some mor possibilities for testing.

Marc

Marc Santhoff

Reply by email