Recent

Author Topic: WebCam question & an introduction...  (Read 11794 times)

Valter Fukuoka

  • New Member
  • *
  • Posts: 24
WebCam question & an introduction...
« on: June 24, 2015, 02:10:19 am »
Hi, 2 things here: a question and an introduction/invitation.

[WebCam Question]
I did some tests using OpenCV (SimpleCV) of capturing / recording frames from a USB WebCam, with success (28/29 frames per second).

Installing and setup is NOT an easy thing...

My question is, in Lazarus Free Pascal, is there an easy way to JUST capture and record individual frames from the USB WebCam?

The question is related to the following project that I like to introduce here.
I decide to use Lazarus on the PC side...


[The Introduction]
The Blink Bitloader - Simplest Microcontroller Programmer Ever,
and the $1 Computer Age that it allow us to have...

[Blink Bitloader]
https://sites.google.com/site/

[BBLD Video]
https://youtu.be/PFLfHPePDTA

[$1 Dollar Computer]
https://sites.google.com/site/


[WebCam and BBLD]
The WebCam will be used to transfer data from the device back to the PC...

Thanks all,
Valter

Valter Fukuoka

  • New Member
  • *
  • Posts: 24
Re: WebCam question & an introduction...
« Reply #1 on: June 24, 2015, 03:38:02 am »
Sorry all,
these are the correct links:

[Blink Bitloader]
https://sites.google.com/site/makerkittys/blinkbitloader

[BBLD Video]
https://youtu.be/PFLfHPePDTA

[$1 Dollar Computer]
https://sites.google.com/site/makerkittys/onedollarcomputer

Thanks again.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11453
  • FPC developer.
Re: WebCam question & an introduction...
« Reply #2 on: June 24, 2015, 10:46:44 am »
On Windows there is dspack, which is a directshow header.

Easy? No, and windows-only.


Older cameras (mostly not HD) can also be used with the much simpler vfw api.  I've used the Sony EyeToy (originally meant Playstation) for a while with it.

Valter Fukuoka

  • New Member
  • *
  • Posts: 24
Re: WebCam question & an introduction...
« Reply #3 on: June 24, 2015, 12:17:37 pm »
On Windows there is dspack, which is a directshow header.

Easy? No, and windows-only.


Older cameras (mostly not HD) can also be used with the much simpler vfw api.  I've used the Sony EyeToy (originally meant Playstation) for a while with it.

marcov, thanks for the msg.

One of the goals of my project is to try to have everything easy enough so that the user can install and make changes, even without having great knowledge... the OpenCV is a cool open source project but at the current stage is a little complex for the average user...

For audio, I already did in Pascal, reading the PC microphone and also mounting, byte by byte, wave files to achieve a better control of the timing (which is necessary), then playing them on PC and reading the electrical signals on the microcontroller side... I now hope to have some options also at the webcam level, since some notebook already have them onboard, and the vast majority of the users also have USB WebCams...

Valter
« Last Edit: June 24, 2015, 10:06:24 pm by Valter Fukuoka »

Brian_ch

  • Newbie
  • Posts: 5
Re: WebCam question & an introduction...
« Reply #4 on: June 29, 2015, 05:15:11 am »
I never tried it but I wonder if libvlc can do this, did you took a lot at it?
http://prog.olsztyn.pl/paslibvlc/

If you could achieve the results you want with it, the users would only need to install vlc in their computers.

benohb

  • Full Member
  • ***
  • Posts: 213
Re: WebCam question & an introduction...
« Reply #5 on: June 29, 2015, 12:32:03 pm »
What is the target platform??


Valter Fukuoka

  • New Member
  • *
  • Posts: 24
Re: WebCam question & an introduction...
« Reply #6 on: June 30, 2015, 01:57:12 am »
I never tried it but I wonder if libvlc can do this, did you took a lot at it?
http://prog.olsztyn.pl/paslibvlc/

If you could achieve the results you want with it, the users would only need to install vlc in their computers.

Thanks for the tip Brian, I will take a look at it...
I just started investigating the webcam issue, if vlc works I think the simplicity can be a good option...

Regards,
Valter

Valter Fukuoka

  • New Member
  • *
  • Posts: 24
Re: WebCam question & an introduction...
« Reply #7 on: June 30, 2015, 02:01:12 am »
What is the target platform??

Hi benobh, as much as possible, be able to run on the major 3 (Win, Lin, Mac)... not easy to think and do but, I want to try this direction...

There are portion of the code that, will necessarilly be specific to each environment, but I want to be as "portable" as possible...

But, for the current investigation, I am just "looking" for things, to know how much and what kind of things I can do with it...

Regards,
Valter

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11453
  • FPC developer.
Re: WebCam question & an introduction...
« Reply #8 on: June 30, 2015, 09:53:19 am »

One of the goals of my project is to try to have everything easy enough so that the user can install and make changes, even without having great knowledge... the OpenCV is a cool open source project but at the current stage is a little complex for the average user...

I see opencv mostly as analysis (I don't use it since it is generally slower than more specialized libs, at least for the simpler operations like blobs and edges)

on Windows dspack will deliver a simple app where you can select a webcam, connect to it, and hopefully get it in single shot mode (some cams can only deliver mpeg streams, but all recent ones that I tested can also do single frames, though with lower effective framerate). dspack is an interface to DirectShow, which is *THE* windows webcam api nowadays.

And dspack is DLLless, solution allows for EXE only result.

I have an older vfw app that I still must port to dspack (mostly shows the image using false colors)

Valter Fukuoka

  • New Member
  • *
  • Posts: 24
Re: WebCam question & an introduction...
« Reply #9 on: June 30, 2015, 11:27:00 am »
There is something I need to confess...

I was a Turbo Pascal 2, 3, 4, 5 ~ 7 fan... for reasons that is difficult to explain, NEVER did the jump to Delphi... THEN, did nothing in Pascal for a long, long period of time...

Around 3 years ago I did a small GUI interface using Lazarus FPC... and I was surprised to see a nice tool using my "old friend" (and first serious programming language, back then)...

Still need to accumulate more "hours of flight" to "go back" to some reasonable level again...

Since part of the goals that I have is to make some material for people to learn, I belive Lazarus/FPC, THE PROJECT and LANGUAGE TOOL (both) is a good choice to use...


Valter Fukuoka

  • New Member
  • *
  • Posts: 24
BLEEP (sound) VERSION...
« Reply #10 on: July 05, 2015, 05:27:30 am »
Hi everybody, just want to give an "update" to this topic...

This is the BLEEP (sound) BITLOADER Version, using PC headphones close to a microphone (picture in the link)...

http://sky.geocities.jp/nettozen/img/pskittys/bleep-bitloader-v2.jpg

Source Code is there...

To achieve what I think is a better finegrain control of timing, the Pascal code build "wave files" representing the bits (beeps) of the byte in serial protocol fashion (1 start bit, 8 data bits + 1 stop bit, all inside a short wave file)... save them to disk and them "play" then as "audio" files...

This is A STEP FURTHER into the "Age of $1 Computer" that I did mention before...

Infos here:
https://sites.google.com/site/makerkittys/bleepbitloader

Regards,
Valter

Valter Fukuoka

  • New Member
  • *
  • Posts: 24
Re: WebCam question & an introduction...
« Reply #11 on: July 10, 2015, 06:45:59 am »
Hi, I just want to say that I did test the “bit loading” with InfraRed, which in the future will be used to load data/programs from Android Devices... it is working fine...

Picture:
http://sky.geocities.jp/nettozen/img/ps/IR_Bitloader.jpg

[More about InfraRed Bitloader will be here]
https://sites.google.com/site/makerkittys/irbitloader

ALSO, and perhaps more important than the first, invite all people interested in Lazarus to think around the notion that we NOW HAVE 3 KINDS OF SOFTWARE (to play it)...

1) “Intellectual Soft”, on the desktop PC...
2) “Social Soft”, with smart-devices...
3) “Physical Soft”, based on microcontrollers...

Illustrated in this diagram:
http://sky.geocities.jp/nettozen/img/ps/3-kinds-of-soft.jpg

By doing this “invitation”, what I want to say is that, whatever we can do to “walk towards” the direction of the trends, it will probably affect us and the tools we use (Lazarus) in positive ways...

If it is a valid “notion”, then any effort we can do to make Lazarus a Tool for the “3 kinds of soft” will have a meaningful impact on its “healthy”...

Regards all,
Valter

benohb

  • Full Member
  • ***
  • Posts: 213
Re: WebCam question & an introduction...
« Reply #12 on: July 10, 2015, 08:13:04 am »
Good

Valter Fukuoka

  • New Member
  • *
  • Posts: 24
Re: WebCam question & an introduction...
« Reply #13 on: July 19, 2015, 07:06:23 pm »
Hi everybody... just an update...

ANDROID version of the Blink Bitloader programmer... and Lazarus Application to CREATE QRCODE from the binary microcontroller HEX file...

Now, we can consider it as "Post PC Era" microcontroller programmer... since it can go from paper QRCode to the Microcontroller without the use of PC...

https://sites.google.com/site/makerkittys/droidbbld

Source code of everything will be there soon...

Regards,
Valter

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: WebCam question & an introduction...
« Reply #14 on: July 19, 2015, 08:05:55 pm »

Hello Valter!

From link:
Quote
Kittys Deluxe Editions will have all the necessary parts ....

where to buy?

Thank you!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018