Linux Media Controller development
 help / color / mirror / Atom feed
* Re: Power frequency detection.
@ 2010-12-19 18:21 Andy Walls
  2010-12-19 20:24 ` Andy Walls
  2010-12-19 20:51 ` Theodore Kilgore
  0 siblings, 2 replies; 15+ messages in thread
From: Andy Walls @ 2010-12-19 18:21 UTC (permalink / raw)
  To: Theodore Kilgore, Paulo Assis; +Cc: Linux Media Mailing List

Theodore,

Aside from detect measurment of the power line, isn't a camera the best sort of sensor for this measurment anyway?

Just compute the average image luminosity over several frames and look for (10 Hz ?) periodic variation (beats), indicating a mismatch.

Sure you could just ask the user, but where's the challenge in that. ;)

Regards,
Andy

Theodore Kilgore <kilgota@banach.math.auburn.edu> wrote:

>
>
>On Sun, 19 Dec 2010, Paulo Assis wrote:
>
>> Hi,
>> 
>> 2010/12/18 Theodore Kilgore <kilgota@banach.math.auburn.edu>:
>> >
>> > Does anyone know whether, somewhere in the kernel, there exists a scheme
>> > for detecting whether the external power supply of the computer is using
>> > 50hz or 60hz?
>> >
>> > The reason I ask:
>> >
>> > A certain camera is marketed with Windows software which requests the user
>> > to set up the option of 50hz or 60hz power during the setup.
>> >
>> > Judging by what exists in videodev2.h, for example, it is evidently
>> > possible to set up this as a control setting in a Linux driver. I am not
>> > aware of any streaming app which knows how to access such an option.
>> >
>> 
>> Most uvc cameras present this as a control, so any v4l2 control app
>> should let you access it.
>> If your camera driver also supports this control then this shouldn't
>> be a problem for any generci v4l2 app.
>> here are a couple of ones:
>> 
>> v4l2ucp (control panel)
>> guvcview ("guvcview --control_only" will work along side other apps
>> just like v4l2ucp)
>> uvcdynctrl from libwebcam for command line control utility .
>> 
>> Regards,
>> Paulo
>
>Thank you. 
>
>I still think that it would be even more clever to detect the line 
>frequency automatically and then just to set the proper setting, if needed 
>or desirable. That was one of the parts of my question about it, after 
>all. But if nobody has ever had a reason to do such detection already it 
>would perhaps be much more trouble than it is worth just do support a 
>cheap camera.
>
>Theodore Kilgore
>--
>To unsubscribe from this list: send the line "unsubscribe linux-media" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Power frequency detection.
@ 2010-12-18 22:10 Theodore Kilgore
  2010-12-19 15:32 ` Paulo Assis
  0 siblings, 1 reply; 15+ messages in thread
From: Theodore Kilgore @ 2010-12-18 22:10 UTC (permalink / raw)
  To: linux-media


Does anyone know whether, somewhere in the kernel, there exists a scheme 
for detecting whether the external power supply of the computer is using 
50hz or 60hz?

The reason I ask:

A certain camera is marketed with Windows software which requests the user 
to set up the option of 50hz or 60hz power during the setup.

Judging by what exists in videodev2.h, for example, it is evidently 
possible to set up this as a control setting in a Linux driver. I am not 
aware of any streaming app which knows how to access such an option.

Information about which streaming app ought to be used which could take 
advantage of a setting for line frequency would be welcome, too, of 
course. As I said, I do not know of a single one and would therefore have 
trouble with testing any such control setting unless I could find the 
software which can actually present the choice to the user.

But my main question is whether the kernel already does detect the line 
frequency anywhere else, for whatever reason. For, it occurs to me that a 
far more elegant solution -- if the camera really does need to have the 
line frequency detected -- would be do do the job automatically and not to 
bother the user about such a thing.

In other news, in case anyone has any children who are in love with Lego, 
the "Lego Bionicle" camera which is currently on sale has an SQ905C type 
chip in it. I just added its Product number to the Gphoto driver last 
night. And it works perfectly in webcam mode if one adds its product 
number in gspca/sq905c.c. I will get around to doing that formally, of 
course, when I get time. But if anyone wants just to add the number and 
re-compile the Vendor:Product number for the new camera is 0x2770:0x9051.

Merry Christmas.

Theodore Kilgore

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-12-20  1:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-19 18:21 Power frequency detection Andy Walls
2010-12-19 20:24 ` Andy Walls
2010-12-19 21:28   ` Theodore Kilgore
2010-12-19 20:51 ` Theodore Kilgore
2010-12-19 22:00   ` Andy Walls
2010-12-19 22:43     ` Andy Walls
2010-12-20  0:13     ` Theodore Kilgore
2010-12-20  0:21       ` Andy Walls
2010-12-20  1:40         ` Theodore Kilgore
2010-12-19 23:32   ` Adam Baker
2010-12-20  0:21     ` Theodore Kilgore
2010-12-20  0:04       ` Andy Walls
  -- strict thread matches above, loose matches on Subject: below --
2010-12-18 22:10 Theodore Kilgore
2010-12-19 15:32 ` Paulo Assis
2010-12-19 18:23   ` Theodore Kilgore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox