FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Read info from webcam video
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Read info from webcam video [message #181850] Thu, 20 June 2013 09:35 Go to next message
Sarah is currently offline  Sarah
Messages: 30
Registered: December 2010
Karma: 0
Member
I've a video Wi-Fi Cam.

In the room there is a small light that can be flashing.

Is there a way for read image using PHP pages and know is this light is flashing or not?

Thanks
Re: Read info from webcam video [message #181851 is a reply to message #181850] Thu, 20 June 2013 12:30 Go to previous messageGo to next message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma: 0
Senior Member
On Thu, 20 Jun 2013 02:35:24 -0700 (PDT), dandi(dot)box(at)gmail(dot)com wrote:

> I've a video Wi-Fi Cam.
>
> In the room there is a small light that can be flashing.
>
> Is there a way for read image using PHP pages and know is this light
> is flashing or not?

Not easily and simply. I'll do the project for US$7500 plus travel
expenses, though.

--
8. After I kidnap the beautiful princess, we will be married
immediately in a quiet civil ceremony, not a lavish spectacle in
three weeks' time during which the final phase of my plan will be
carried out. --Peter Anspach's Evil Overlord list
Re: Read info from webcam video [message #181852 is a reply to message #181850] Thu, 20 June 2013 13:14 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 6/20/2013 5:35 AM, dandi(dot)box(at)gmail(dot)com wrote:
> I've a video Wi-Fi Cam.
>
> In the room there is a small light that can be flashing.
>
> Is there a way for read image using PHP pages and know is this light is flashing or not?
>
> Thanks
>

As Peter said, not easily. If this is an IP camera, you could connect
to the camera and read the stream. Depending on the format of the
stream (i.e is it H.264?), you may have to decode it. Then using the gd
functions, isolate the area containing the light and determine the
brightness of the pixels. Repeat for multiple frames and compare the
results.

As I said - not easy. It would be much easier to hook into whatever is
triggering the flashing light and sense that.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Read info from webcam video [message #181853 is a reply to message #181850] Thu, 20 June 2013 13:23 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 20/06/13 10:35, dandi(dot)box(at)gmail(dot)com wrote:
> I've a video Wi-Fi Cam.
>
> In the room there is a small light that can be flashing.
>
> Is there a way for read image using PHP pages and know is this light is flashing or not?
>
> Thanks
sure,. But an ardinio boards and profram it to sense the voltage across
te LED by attaching it to the camera, and send the result down a USB
portto a computer running linux, and then write a daemon on C to monitor
that and place the state in a temporary file or somewhere where PHP can
see it.

Though quite why PHP is involved, its hard to say.



--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Re: Read info from webcam video [message #181881 is a reply to message #181852] Thu, 20 June 2013 23:08 Go to previous messageGo to next message
Norman Peelman is currently offline  Norman Peelman
Messages: 126
Registered: September 2010
Karma: 0
Senior Member
On 06/20/2013 09:14 AM, Jerry Stuckle wrote:
> On 6/20/2013 5:35 AM, dandi(dot)box(at)gmail(dot)com wrote:
>> I've a video Wi-Fi Cam.
>>
>> In the room there is a small light that can be flashing.
>>
>> Is there a way for read image using PHP pages and know is this light
>> is flashing or not?
>>
>> Thanks
>>
>
> As Peter said, not easily. If this is an IP camera, you could connect
> to the camera and read the stream. Depending on the format of the
> stream (i.e is it H.264?), you may have to decode it. Then using the gd
> functions, isolate the area containing the light and determine the
> brightness of the pixels. Repeat for multiple frames and compare the
> results.
>
> As I said - not easy. It would be much easier to hook into whatever is
> triggering the flashing light and sense that.
>

I kinda thought that most IP type cameras offered this type of
operation onboard? I know my AXIS does...

--
Norman
Registered Linux user #461062
-Have you been to www.php.net yet?-
Re: Read info from webcam video [message #181882 is a reply to message #181853] Thu, 20 June 2013 23:14 Go to previous messageGo to next message
Norman Peelman is currently offline  Norman Peelman
Messages: 126
Registered: September 2010
Karma: 0
Senior Member
On 06/20/2013 09:23 AM, The Natural Philosopher wrote:
> On 20/06/13 10:35, dandi(dot)box(at)gmail(dot)com wrote:
>> I've a video Wi-Fi Cam.
>>
>> In the room there is a small light that can be flashing.
>>
>> Is there a way for read image using PHP pages and know is this light
>> is flashing or not?
>>
>> Thanks
> sure,. But an ardinio boards and profram it to sense the voltage across
> te LED by attaching it to the camera, and send the result down a USB
> portto a computer running linux, and then write a daemon on C to monitor
> that and place the state in a temporary file or somewhere where PHP can
> see it.
>


Ummm, really?!


> Though quite why PHP is involved, its hard to say.
>

As long as he can grab the images from the cam via php (requires that
the IP camera has an internal server) then it is quite easily done. As
Jerry's response dictates. Examine the images looking for the tell-tale
LED.

--
Norman
Registered Linux user #461062
-Have you been to www.php.net yet?-
Re: Read info from webcam video [message #181885 is a reply to message #181881] Thu, 20 June 2013 23:40 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 6/20/2013 7:08 PM, Norman Peelman wrote:
> On 06/20/2013 09:14 AM, Jerry Stuckle wrote:
>> On 6/20/2013 5:35 AM, dandi(dot)box(at)gmail(dot)com wrote:
>>> I've a video Wi-Fi Cam.
>>>
>>> In the room there is a small light that can be flashing.
>>>
>>> Is there a way for read image using PHP pages and know is this light
>>> is flashing or not?
>>>
>>> Thanks
>>>
>>
>> As Peter said, not easily. If this is an IP camera, you could connect
>> to the camera and read the stream. Depending on the format of the
>> stream (i.e is it H.264?), you may have to decode it. Then using the gd
>> functions, isolate the area containing the light and determine the
>> brightness of the pixels. Repeat for multiple frames and compare the
>> results.
>>
>> As I said - not easy. It would be much easier to hook into whatever is
>> triggering the flashing light and sense that.
>>
>
> I kinda thought that most IP type cameras offered this type of
> operation onboard? I know my AXIS does...
>

It depends on the camera. Some do, some don't (more of the professional
ones like Axis do - consumer grade often do not). But then you also
need to know the command interface to the camera (which may or may not
be public).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Read info from webcam video [message #181886 is a reply to message #181882] Thu, 20 June 2013 23:44 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 6/20/2013 7:14 PM, Norman Peelman wrote:
> On 06/20/2013 09:23 AM, The Natural Philosopher wrote:
>> On 20/06/13 10:35, dandi(dot)box(at)gmail(dot)com wrote:
>>> I've a video Wi-Fi Cam.
>>>
>>> In the room there is a small light that can be flashing.
>>>
>>> Is there a way for read image using PHP pages and know is this light
>>> is flashing or not?
>>>
>>> Thanks
>> sure,. But an ardinio boards and profram it to sense the voltage across
>> te LED by attaching it to the camera, and send the result down a USB
>> portto a computer running linux, and then write a daemon on C to monitor
>> that and place the state in a temporary file or somewhere where PHP can
>> see it.
>>
>
>
> Ummm, really?!
>
>
>> Though quite why PHP is involved, its hard to say.
>>
>
> As long as he can grab the images from the cam via php (requires that
> the IP camera has an internal server) then it is quite easily done. As
> Jerry's response dictates. Examine the images looking for the tell-tale
> LED.
>

Actually it doesn't require a server on the camera - just an IP stream
he can connect to. Most IP cameras don't contain a server - they just
spit out packets. Of course, PTZ (Pan-Tilt-Zoom) cameras also accept
data from a controller, but again that's typically a stream (of which
there are several non-compatible formats).

Others can accept commands to do things like detect motion in various
zones on the camera (again a camera-specific command format) and similar
functions.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Read info from webcam video [message #181887 is a reply to message #181853] Thu, 20 June 2013 23:45 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 6/20/2013 9:23 AM, The Natural Philosopher wrote:
> On 20/06/13 10:35, dandi(dot)box(at)gmail(dot)com wrote:
>> I've a video Wi-Fi Cam.
>>
>> In the room there is a small light that can be flashing.
>>
>> Is there a way for read image using PHP pages and know is this light
>> is flashing or not?
>>
>> Thanks
> sure,. But an ardinio boards and profram it to sense the voltage across
> te LED by attaching it to the camera, and send the result down a USB
> portto a computer running linux, and then write a daemon on C to monitor
> that and place the state in a temporary file or somewhere where PHP can
> see it.
>
> Though quite why PHP is involved, its hard to say.
>
>
>

Talk about using a sledge hammer to kill a gnat - this is more like a
steam roller!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Read info from webcam video [message #181888 is a reply to message #181882] Fri, 21 June 2013 02:31 Go to previous messageGo to next message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma: 0
Senior Member
On Thu, 20 Jun 2013 19:14:15 -0400, Norman Peelman wrote:
> As long as he can grab the images from the cam via php (requires that
> the IP camera has an internal server) then it is quite easily done. As
> Jerry's response dictates. Examine the images looking for the tell-tale
> LED.

And checking against previous images to see if they were off, and
selecting the appropriate image somehow to make the comparison with. And
it'll be especially fun if the camera's not set someplace where the LED
fills the entire sensor area...

--
31. All naive, busty tavern wenches in my realm will be replaced with
surly, world-weary waitresses who will provide no unexpected
reinforcement and/or romantic subplot for the hero or his sidekick.
--Peter Anspach's list of things to do as an Evil Overlord
Re: Read info from webcam video [message #181894 is a reply to message #181888] Fri, 21 June 2013 10:14 Go to previous messageGo to next message
Norman Peelman is currently offline  Norman Peelman
Messages: 126
Registered: September 2010
Karma: 0
Senior Member
On 06/20/2013 10:31 PM, Peter H. Coffin wrote:
> On Thu, 20 Jun 2013 19:14:15 -0400, Norman Peelman wrote:
>> As long as he can grab the images from the cam via php (requires that
>> the IP camera has an internal server) then it is quite easily done. As
>> Jerry's response dictates. Examine the images looking for the tell-tale
>> LED.
>
> And checking against previous images to see if they were off, and
> selecting the appropriate image somehow to make the comparison with. And
> it'll be especially fun if the camera's not set someplace where the LED
> fills the entire sensor area...
>

Well, since the op said it would be flashing, I imagine you only need
to find it 'on' at least once.

--
Norman
Registered Linux user #461062
-Have you been to www.php.net yet?-
Re: Read info from webcam video [message #181898 is a reply to message #181887] Fri, 21 June 2013 11:37 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
On Thu, 20 Jun 2013 19:45:38 -0400, Jerry Stuckle wrote:

> On 6/20/2013 9:23 AM, The Natural Philosopher wrote:
>> On 20/06/13 10:35, dandi(dot)box(at)gmail(dot)com wrote:
>>> I've a video Wi-Fi Cam.

>>> In the room there is a small light that can be flashing.

>>> Is there a way for read image using PHP pages and know is this light
>>> is flashing or not?

>> sure,. [Buy an arduino] .....

> Talk about using a sledge hammer to kill a gnat - this is more like a
> steam roller!

Yeah, just remove the flashing light and hook those contacts (suitably
buffered) on the other device to inputs on the Arduino / Pi / whatever. ;)

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
Re: Read info from webcam video [message #181899 is a reply to message #181888] Fri, 21 June 2013 14:53 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 6/20/2013 10:31 PM, Peter H. Coffin wrote:
> On Thu, 20 Jun 2013 19:14:15 -0400, Norman Peelman wrote:
>> As long as he can grab the images from the cam via php (requires that
>> the IP camera has an internal server) then it is quite easily done. As
>> Jerry's response dictates. Examine the images looking for the tell-tale
>> LED.
>
> And checking against previous images to see if they were off, and
> selecting the appropriate image somehow to make the comparison with. And
> it'll be especially fun if the camera's not set someplace where the LED
> fills the entire sensor area...
>

Of course. Any time you're looking for a change in any data, you must
compare old data against new. But if you know where in the frame the
LED is located, testing is easy. It does not need to fill the entire
frame - just a few pixels (theoretically 1 pixel would be enough, but I
suspect that would be more susceptible to falsing).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Read info from webcam video [message #181914 is a reply to message #181894] Sat, 22 June 2013 17:52 Go to previous messageGo to next message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma: 0
Senior Member
On Fri, 21 Jun 2013 06:14:25 -0400, Norman Peelman wrote:
> On 06/20/2013 10:31 PM, Peter H. Coffin wrote:
>> On Thu, 20 Jun 2013 19:14:15 -0400, Norman Peelman wrote:
>>> As long as he can grab the images from the cam via php (requires that
>>> the IP camera has an internal server) then it is quite easily done. As
>>> Jerry's response dictates. Examine the images looking for the tell-tale
>>> LED.
>>
>> And checking against previous images to see if they were off, and
>> selecting the appropriate image somehow to make the comparison with. And
>> it'll be especially fun if the camera's not set someplace where the LED
>> fills the entire sensor area...
>>
>
> Well, since the op said it would be flashing, I imagine you only need
> to find it 'on' at least once.

OP said "flashing" not "on". And I know plenty of things that use a
flashing power indicator to indicate an error condition, which is not
just plain "on" or "off".

--
67. No matter how many shorts we have in the system, my guards will be
instructed to treat every surveillance camera malfunction as a
full-scale emergency.
--Peter Anspach's list of things to do as an Evil Overlord
Re: Read info from webcam video [message #181915 is a reply to message #181898] Sat, 22 June 2013 22:55 Go to previous message
The Frog is currently offline  The Frog
Messages: 6
Registered: March 2013
Karma: 0
Junior Member
Just a passing thought, but some cameras have their own motion
detection built-in. Setting up the area of interest directly over the
flashing light, and adjusting the sensitivity threshold
appropriately, the camera may be able to generate a signal of sorts
such as SNMP or an email or even a structured data packet that you
could use. It might be worth investigating your cameras capabilities
or even investing in one that has such abilities.

Just a thought.

--
Cheers

The Frog
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: For loop not showing the entire array
Next Topic: deleted primary key can't be reused?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 08:36:34 GMT 2024

Total time taken to generate the page: 0.02501 seconds