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.

AppGameKit Classic Chat / [Question] Caching Camera Images

Author
Message
JLM
9
Years of Service
User Offline
Joined: 21st Jul 2015
Location:
Posted: 21st Jul 2015 05:11
Picked AGK2 up recently and am catching on quickly(Thanks to previous experience in software development), but I'm failing to figure out if this is even possible.

The Idea:
In the interest of not setting off your "What are your motives?!" alarms (I've been on software development forums for about 15 years, that alarm goes off CONSTANTLY), I'll tell you what I'm trying to achieve.

The application will take a still from the camera every second or so (ideally, low res/poor quality if possible) and constantly compare each from its predecessor. Each comparison will result in the most differing area of said image being highlighted or pointed to (Dont even know if this is possible). Kind of like a motion detection system.

That "Pointer" will be a sprite that will follow motion in front of the device. The sprite can be anything, An eye, a crosshair, whatever, it's beside the point, for now.

So I have two hurdles;
1 - Is it even possible to capture an image without forcing the user to interact with the dialog (Such as ShowImageCaptureScreen)?
2 - Comparing the two images (Which I havent even bothered looking into yet, since hurdle 1 is fast proving impossible)

For now, is there a solution to Hurdle 1 within AGK2?

-Writing programs for years, new to AGK2
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Jul 2015 10:40
No, it isn't possible with the commands available. The user has to interact.

In Tier 2 (C++), it may be possible to add additional functionality, but I'm not a Tier 2 expert.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Jul 2015 22:02
I suppose it would be possible in Tier 2 (and I do work in Tier 2, with 20+ years experience in C and C++).

But I doubt that it could be done every second.

If there are commands that let you use the camera without user interaction (this might be the thing that makes it not possible), I think it might work something like this:
- Make a memory block of each image (agk::CreateMemblockFromImage)
- Use simple array indexing to compare the pixels in the image (agk::GetMemblockInt)
- Do something with the information

Cheers,
Ancient Lady
JLM
9
Years of Service
User Offline
Joined: 21st Jul 2015
Location:
Posted: 26th Jul 2015 13:44
Yeah I figured if there were any chance of it being possible it would only be tier 2. If I ever make any progress I'll be sure to post details here

Thanks for the responses!

J

-Writing programs for years, new to AGK2

Login to post a reply

Server time is: 2024-11-25 19:46:55
Your offset time is: 2024-11-25 19:46:55