Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Video in DB

Author
Message
Jmock
17
Years of Service
User Offline
Joined: 6th Dec 2007
Location:
Posted: 7th Dec 2007 01:56
First, How would I get live video from a webcam in DB? After I accomplish that, I want the computer to find areas over a certain RGB level, shades of white. Is this possible? I want to get the coordinates of the white area, and then put a dot on them or something. Is this stretching DB too far? How would I do this? Thanks!
Jmahmood
18
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 7th Dec 2007 06:04
Quote: "First, How would I get live video from a webcam in DB?"


As far as i know there is no such command that records a video from webcam.

Quote: "Is this stretching DB too far?"

DB is not good at this..try c++ or c#

Visit http://eternity.freeweb7.com for product demonstration,Downloads,Screenshots and Public forum
Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 7th Dec 2007 07:09
actually , I aggree with bat this time . If you want that type of application I think you should probably use c#.

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 7th Dec 2007 15:55
Like Blue and Bat said, the speed you'd need for a live feed and the calculations for color in real time would be better suited in c .

If it doesn't have to be live capture, you could save the file as an avi. You could load the avi into DB and attempt to draw your dot map while it is playing - however, DB would be a bit slow. I was able to simulate this by capturing the playing avi as an image,
pasting the image and then using the mouse coordinates and the point command to read the color under the mouse. A little clunky but it worked.

Another method if it doesn't have to be live capture, if you can save your video file as an avi or something or even as a series of jpegs (there are many utilities to break the captured video into a series of jpegs) you could load each jpeg into DB and then map the dot chart according to color with something as simple as the point command (though point is EXTREMELY slow - memblocks would be faster). You then have to reconstitute the jpegs into an avi.

Also depending on how hard you want to accomplish this, you may be able to use a twain dll or create you own that can be called from DB for the live streaming. The slow part again would be managing the dot chart live in DB.

Enjoy your day.
Jmahmood
18
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 7th Dec 2007 16:01
Latch, these are some great idea..But DBC is not made to do this kind of stuff. c# is the language he needs.

Visit http://eternity.freeweb7.com for product demonstration,Downloads,Screenshots and Public forum
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 7th Dec 2007 16:42
DB is a programming language and you should be able to write anything you want to. But don't forget, it is aimed firmly at writing DirectX games - not applications.

As such, it's naturally going to have some limitations.

You might look at Delphi too as an alternative language to write such an application - it's a little closer to Basic and easier to learn than C and it's derivatives (if you have no experience with any of them).

TDK_Man

Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 8th Dec 2007 17:41
Is Delphi free? I want to try it out.

Seriously, how do you make the little blue text come up below your message?
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 9th Dec 2007 00:27
The fun I have with DB is trying to find ways to push it beyond its limits!

Enjoy your day.
Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 9th Dec 2007 10:29
@Sinani201
you can either buy it from borland or download the free one from
www.freepascal.org

tha_rami
19
Years of Service
User Offline
Joined: 25th Mar 2006
Location: Netherlands
Posted: 9th Dec 2007 10:42
Quote: "The fun I have with DB is trying to find ways to push it beyond its limits! "

Heh, I'm still at the point where I have to push myself beyond my own limits .


A mod has been erased by your signature because it was larger than 600x120
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 9th Dec 2007 15:16
Quote: "Heh, I'm still at the point where I have to push myself beyond my own limits "


Me too... you should see how much time I can spend trying to get Hello World to work...

Jmahmood
18
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 9th Dec 2007 19:23
Quote: "you can either buy it from borland or download the free one from"


Dont support software piracy..

Visit http://eternity.freeweb7.com for product demonstration,Downloads,Screenshots and Public forum
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 9th Dec 2007 20:38
Quote: "Me too... you should see how much time I can spend trying to get Hello World to work..."




I just meant it's fun to try crazy stuff and see if it'll work...

Enjoy your day.
Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 10th Dec 2007 02:49
@bat
Quote: "Dont support software piracy"

me either. I believe if you check out the site you would be pleased to find that its not pirated - its open source and released under GNU so the only thing you have to do is include or make available your source code with anything you release.

Jmahmood
18
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 10th Dec 2007 03:49
Then i guess i should give delphi a try!!

Visit http://eternity.freeweb7.com for product demonstration,Downloads,Screenshots and Public forum
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 20th Dec 2007 21:30
DELPHI = Not Free

FreePascal IS Free. 99.99% Compatible - PLUS you can write apps for Windows, Linux, and apple - with one source code base (DirectX aside)

http://www.freepascal.org

So much easier to read then C/C++ and its faster and object oriented contrary to popular belief. It's actually better suited for parallel processing then C/C++ could ever be.

Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 22nd Dec 2007 00:07
yeah , delphi is the borland version of pascal for windows. pascal is actually the original that was later made free. in comparison to c+ and db, it has units in place of headers, procedures in place of gosubs but the language itself is geared toward being procedural instead of functional that said you can expect your coding in pascal to be a bit longer and more tedious than most other languages. coding in C+ on the other hand which is fully object orientated can be quite nice because its syntax allows for fairly short code - to increment a variable its as easy as
cake++; My personal favorite of all the various languages is C# and dark basic.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Dec 2007 01:00
BlueStar - Don't Get me Started!

FreePascal has all the goodies and reads more like english - is Oop and you can use c "Style" constructs with a simple flag - and operator overloading so things like:

a+=1; // Work

MyString+="More Text"; // Works Too

100% Object Oriented etc. You should take a peek - it hasn't been standing still

Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 22nd Dec 2007 09:51 Edited at: 22nd Dec 2007 09:55
@jason I am aware of its good points , and bad points - cant point out one without the other and to not point out how strong the syntax is wouldn't be fair. I didn't say it didn't have oop , just that it wasn't geared toward it. now about the flag , its all good if you have already mastered c+ , but if your a beginner at pascal and dont know c+ it can possibly be difficult. In any event, Every individual is signifficantly different, some will like pascal and some wont and although I used it for many years My personal favorite of them all other than DB is C#
as the old saying goes .... some swear by pascal , others curse by it
(although this could be said about any language)

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Dec 2007 19:10
C# is elegant - just not as fast... I'm really into Speed - when I can get it - but take into account this is to a fault - as I used to write Operating systems for a hobby - before Intel started making it harder to get the "Secret" assemly language commands without signing away your first born child.

I used to have ALL the books from 286 and up - Design Specs, Hardware etc... Plus the OpCode Reference Manuals etc. To - when I hear things like JIT - and Scripted over compiled - I usually Cringe.

But for work - where customers don't care - they just want it to work - and get it done in a short period of time - then C# is the way to go! It's like C++ and Pascal without worrying about destructors and stuff (99% of the time...sometimes you do need to destroy in C# depending on what you're doing)

C#: It's definately faster to create with. It's no wonder you love it! It's a great Language.

One of my beefs I guess to is that if you learn C# and put all your efforts learnign and practicing it - then you are hit when you want to code on other platforms besides Microsoft. If you know C++, Pascal, Basic, Java - things like that ... its simply more portable that way.

Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 22nd Dec 2007 20:43
@jason p sage
I like c# because its not only easy to create with , but function calls seem a lot easier to remember. I've never used java so dont know much about it. Eventually I'll get around to doing another project in pascal, but probably not for a while.

Login to post a reply

Server time is: 2025-06-02 10:18:38
Your offset time is: 2025-06-02 10:18:38