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 Professional Discussion / Basic Motion Dectection

Author
Message
BlackChaos
16
Years of Service
User Offline
Joined: 2nd May 2010
Location: London
Posted: 12th Jun 2012 12:49
Hey everyone, I'm trying to work out how to detect changes between two static .jpeg images, whilst ignoring other minor changes in the background(noise).

I have a pixel colour match idea and calculating the changes of those pixels.

Also! I know this sounds a bit ambitious but I obsess when I get an idea.

Does anyone have any idea if something like this would be possible in DBPro?

AEngine 2012 Ameadus Project Feedback or Food o0
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 12th Jun 2012 13:19 Edited at: 12th Jun 2012 13:22
You can get pixel colour at a point with...

R = RGBR(POINT(mousex(),mousey()))
G = RGBG(POINT(mousex(),mousey()))
B = RGBB(POINT(mousex(),mousey()))

... or whatever X/Y you pick up from. Your project is possible. Point is slow, there are other ways.

BlackChaos
16
Years of Service
User Offline
Joined: 2nd May 2010
Location: London
Posted: 12th Jun 2012 13:57
Quote: "... or whatever X/Y you pick up from. Your project is possible. Point is slow, there are other ways."


What other ways would there be?

AEngine 2012 Ameadus Project Feedback or Food o0
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 12th Jun 2012 15:50 Edited at: 12th Jun 2012 15:57
col = POINT(mousex(),mousey())
R = RGBR(col)
G = RGBG(col)
B = RGBB(col)

well that reduces the point detection. I think that there are also mathematical ways to detect a change in a bitmap.. like XOR, but I don't know how to program that.

You might also find a faster point command in a plugin like MatrixUtils.

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 15th Jun 2012 12:47
I have an idea, you could try that!

SEE ATTACHED PICTURE

«It's the Pony, pony me this, pony me that» — Bronies
«I sell apples and apple accessories» — Applejack
Derpy delivers: watch?v=g4Kgz4Us_RI

Login to post a reply

Server time is: 2026-07-07 15:11:42
Your offset time is: 2026-07-07 15:11:42