Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #212452 > unrolled thread

.uvc WebCam Data

Started by"Martin McCormick" <martin.m@suddenlink.net>
First post2019-08-08 19:10 +0200
Last post2019-08-12 20:30 +0200
Articles 9 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  .uvc WebCam Data "Martin McCormick" <martin.m@suddenlink.net> - 2019-08-08 19:10 +0200
    Re: .uvc WebCam Data Dan Ritter <dsr@randomstring.org> - 2019-08-08 21:20 +0200
      Re: .uvc WebCam Data "Martin McCormick" <martin.m@suddenlink.net> - 2019-08-08 22:30 +0200
        Re: .uvc WebCam Data deloptes <deloptes@gmail.com> - 2019-08-09 00:10 +0200
          Re: .uvc WebCam Data Dan Ritter <dsr@randomstring.org> - 2019-08-09 02:30 +0200
            Re: .uvc WebCam Data "Martin McCormick" <martin.m@suddenlink.net> - 2019-08-09 14:40 +0200
          Re: .uvc WebCam Data "Martin McCormick" <martin.m@suddenlink.net> - 2019-08-09 05:10 +0200
      Re: .uvc WebCam Data "Martin McCormick" <martin.m@suddenlink.net> - 2019-08-12 19:20 +0200
        Re: .uvc WebCam Data Dan Ritter <dsr@randomstring.org> - 2019-08-12 20:30 +0200

#212452 — .uvc WebCam Data

From"Martin McCormick" <martin.m@suddenlink.net>
Date2019-08-08 19:10 +0200
Subject.uvc WebCam Data
Message-ID<ysU5j-80i-1@gated-at.bofh.it>
	I am trying to fit all the pieces together in a project I
need to do which is to capture VGA video text screens and turn
them in to ASCII text via OCR.

	The OCR program is meant for people to feed in video from
a camera or flat-bed scanner which will process the images and
decode text from printed pages.

	I suspect that the image the OCR program is expecting to
see is a raster.

	The video capture device is an Epifan AVIO-HD video
digitizer and one of it's modes is VGA conversion with all video
sent in the  .uvc or webcam  format.

	The part I don't know yet is what needs to happen to
convert .uvc in to something that looks like it came from a
digital TV camera or flat-bed scanner?

	Thanks for any and all constructive ideas.

Martin McCormick

[toc] | [next] | [standalone]


#212459

FromDan Ritter <dsr@randomstring.org>
Date2019-08-08 21:20 +0200
Message-ID<ysW77-Nm-7@gated-at.bofh.it>
In reply to#212452
Martin McCormick wrote: 
> 	The video capture device is an Epifan AVIO-HD video
> digitizer and one of it's modes is VGA conversion with all video
> sent in the  .uvc or webcam  format.
> 
> 	The part I don't know yet is what needs to happen to
> convert .uvc in to something that looks like it came from a
> digital TV camera or flat-bed scanner?

UVC means USB Video Class. The Video For Linux 2 driver system
should recognize it as a V4L2 device.

fswebcam is a package that captures images from V4L2 devices.
It's command-line driven and has a few useful features like
resizing, averaging multiple frames, and skipping early frames
for devices that take a while to focus. It writes JPEG or PNG.

Remember to make yourself part of the video group.

-dsr-

[toc] | [prev] | [next] | [standalone]


#212465

From"Martin McCormick" <martin.m@suddenlink.net>
Date2019-08-08 22:30 +0200
Message-ID<ysXcS-1uq-29@gated-at.bofh.it>
In reply to#212459
Dan Ritter <dsr@randomstring.org> writes:
> UVC means USB Video Class. The Video For Linux 2 driver system
> should recognize it as a V4L2 device.
> 
> fswebcam is a package that captures images from V4L2 devices.
> It's command-line driven and has a few useful features like
> resizing, averaging multiple frames, and skipping early frames
> for devices that take a while to focus. It writes JPEG or PNG.
> 
> Remember to make yourself part of the video group.
> 
> -dsr-

	Thank you very much.  I started using unix-like OS's 30
years ago in June but the digital video field is new to me so I
still have a lot of learning to do.

	As an electronics and amateur radio enthusiast, I am
astounded at how fast that A/D converter has to work along with
the Nyquist filtering to properly digitize the video.

	With North American NTSC color video, the dot clock rate
is 3.7945 million plus a few more decimal places per second and
PAL along with SECAM are just above 4 MHZ.  The A/D converter has
to sample at twice that rate to keep Mr. Nyquist from haunting
anybody from his grave.

Martin McCormick

[toc] | [prev] | [next] | [standalone]


#212473

Fromdeloptes <deloptes@gmail.com>
Date2019-08-09 00:10 +0200
Message-ID<ysYLE-2xg-5@gated-at.bofh.it>
In reply to#212465
Martin McCormick wrote:

> Thank you very much.  I started using unix-like OS's 30
> years ago in June but the digital video field is new to me so I
> still have a lot of learning to do.
> 
> As an electronics and amateur radio enthusiast, I am
> astounded at how fast that A/D converter has to work along with
> the Nyquist filtering to properly digitize the video.
> 
> With North American NTSC color video, the dot clock rate
> is 3.7945 million plus a few more decimal places per second and
> PAL along with SECAM are just above 4 MHZ.  The A/D converter has
> to sample at twice that rate to keep Mr. Nyquist from haunting
> anybody from his grave.

I still don't get it how you want to capture and process video to text to
audio - perhaps deduplicate frame content etc. - how many frames per second
do you want to process, cause I did not get this with the 4Mhz and how it
is relevant. I was thinking your display is running at 60Hz, which is most
common nowdays. This means you have 60 images/sec .... hmmm how do you
process 60/sec?
I am really wondering.

[toc] | [prev] | [next] | [standalone]


#212479

FromDan Ritter <dsr@randomstring.org>
Date2019-08-09 02:30 +0200
Message-ID<yt0X7-3Nd-3@gated-at.bofh.it>
In reply to#212473
deloptes wrote: 
> 
> I still don't get it how you want to capture and process video to text to
> audio - perhaps deduplicate frame content etc. - how many frames per second
> do you want to process, cause I did not get this with the 4Mhz and how it
> is relevant. I was thinking your display is running at 60Hz, which is most
> common nowdays. This means you have 60 images/sec .... hmmm how do you
> process 60/sec?
> I am really wondering.

Martin was just sense-of-wondering at modern technology. I'm
guessing his eventual project will snap frames for OCR on
demand, then send the output through a braille terminal or
a speech synthesizer.

-dsr-

[toc] | [prev] | [next] | [standalone]


#212496

From"Martin McCormick" <martin.m@suddenlink.net>
Date2019-08-09 14:40 +0200
Message-ID<ytclA-2wZ-27@gated-at.bofh.it>
In reply to#212479
Dan Ritter <dsr@randomstring.org> writes:
> Martin was just sense-of-wondering at modern technology. I'm
> guessing his eventual project will snap frames for OCR on
> demand, then send the output through a braille terminal or
> a speech synthesizer.

	Our messages basically crossed due to the time lag here
between fetches of mail from our ISP but you said it much better
than I did.

	I have no idea at all what this project is going to look
like when it is done but it will be something like what you
describe.  Snap a picture.  Try to evaluate it as quickly as
possible.  Snap another and soforth.

	The ideal solution would make the person using it feel like
he or she is on a serial console without this layer of complexity
and is simply interacting with the screen.

	The reality is that it will more likely feel like what it
is, a work-around that barely solves the problem, better than
nothing but not much.

	If it lets me reconfigure the occasional wayward BIOS on
an old system without having to bother my dear wife or a friend,
I will call it good enough. If we let perfect kill good enough,
nothing ends up getting done.

Martin McCormick WB5AGZ

I will have been WB5AGZ for 50 years in October.

[toc] | [prev] | [next] | [standalone]


#212481

From"Martin McCormick" <martin.m@suddenlink.net>
Date2019-08-09 05:10 +0200
Message-ID<yt3rY-5vX-7@gated-at.bofh.it>
In reply to#212473
deloptes <deloptes@gmail.com> writes:
> I still don't get it how you want to capture and process video to text to
> audio - perhaps deduplicate frame content etc. - how many frames per 
> second
> do you want to process, cause I did not get this with the 4Mhz and how it
> is relevant. I was thinking your display is running at 60Hz, which is most
> common nowdays. This means you have 60 images/sec .... hmmm how do you
> process 60/sec?
> I am really wondering.

You have actually asked about the only questionI can
intelligently answer at this point and I am greatful for that.

	I was marveling at how fast the analog-to-digital A/D
converter has to work.

	I don't know yet whether I must run at 60 frames per
second all the time and simply grab one frame when ready or if I
can tell the video extraction application to just take one still
picture but I need at least 1 good full screen shot.

	After getting the shot, I should have a jpg or similar
digital image which will look like a freeze frame of the screen.

	It's not quite useful yet but the OCR engine turns it in
to ASCII text.

	Computer users who are blind either use text-to-speech or
text to Braille text applications to finally extract intelligence
from the text resulting from the OCR output.

	This "reading" of the ASCII dump will let the user of the
system know what is on the screen.

	One presses buttons to change a setting and then it's
time to take another picture and OCR that to see what one just
changed.

	I really won't need to take more than one picture every
couple of seconds as it probably takes that long to process each
still and listen to the output.

	Also, I am hoping to be able to compare the most recent
screen grab with the previous grab to see what changed rather than
read all the unchanged portions of the screen.

	Keep in mind that this is not motion video and a blinking
cursor is probably the only change over many seconds.

Martin

[toc] | [prev] | [next] | [standalone]


#212700

From"Martin McCormick" <martin.m@suddenlink.net>
Date2019-08-12 19:20 +0200
Message-ID<yum9b-77R-1@gated-at.bofh.it>
In reply to#212459
Dan Ritter <dsr@randomstring.org> writes:
> fswebcam is a package that captures images from V4L2 devices.
> It's command-line driven and has a few useful features like
> resizing, averaging multiple frames, and skipping early frames
> for devices that take a while to focus. It writes JPEG or PNG.
> 
> Remember to make yourself part of the video group.

Oh, yes.  Interestingly enough, I am part of that group.  I was
going to do that and first did groups martin and, what do you
know, I'm already in the group.  How I got there I do not know.

	So, here's what has happened and it's all good so far.

	After much soul-searching which should precede any outlay
of 400 US Dollars, I bit the bullet and bought an Epiphan
AVIO-HD.

	The linux kernel immediately recognized it and then the
fun started.

	I finally got fswebcam setup after some fumbling around
an plugged the VGA cable in to the appropriate socket on the
video card.

	I captured a picture and sent it to my wife's iPhone and
she said it was just a black screen.  I knew it should have
basically been a screen shot of my Linux box since I was logged
in via tty1, I think, but it's the first console anyway.

	That was yesterday afternoon when the AVIO arrived so
this morning, I moved the VGA connection to another Linux box
whose VGA card only has one output.

	Interestingly, the AVIO-HD generates frames of nothing
even when the VGA cable is disconnected and hanging in space or
lying on the table.  The JPG files are about 4 KB in size and
fswebcam says it harvested however many frames one asked for.

	I made this discovery the way I discover a lot of stuff,
sort of like oh  wow! It makes the same length file plugged in as
it is making with the end of the cable in my hand.

	When plugged in to the VGA socket on the other Linux box,
I was encouraged because the size of the captured frames always
showed about 10 K instead of 4 K.

	I also downloaded tesseract and several other utilities
such as sane plus a jpg from a site which has sample scans taken
with real cameras and paper pages.

	The tesseract utility flawlessly converted the sample jpg
in to ASCII text so I tried that
other Linux box's VGA port.  This certainly looks like not much
of anything but I was happy to get it:

Debian GNU/Linux 10 audios tty

audio3 login: [43431.294393] print_req_error: 1/0 error, dev fd0, sector 0
[43431.338633] print_reqerror: 1/0 error, dev fdo, sector 0

	I guess I may have stuck a blank disk in to the drive or
something as it looks like it is complaining about being unable
to read the floppy disk.  It also may be left over from booting
as the floppy is the first boot source and empty.

	I also have a small device that closely resembles an
infant-sized PC tower that I payed a whole Dollar for at a flea
market.  The back panel has two usb ports, two RS-232 DB9 ports,
audio jacks, a DB25 printer port , RJ45 Ethernet socket
and a VGA socket just like PC's of 15 or 20
years ago.  If you plug headphones in to the Line-out jack, you
get a short beep after pressing the power button.  What would
it's VGA jack say?

Acute Network Technologies

ThinCast 5000

	I looked that up and it is a client terminal-like device
that is meant as a work station in some institution.

	Depending on how many resources it has, one might be able
to load a Linux kernel but I am not holding my breath.

	Anyway, I want to thank everybody who supplied helpful
information.  The tesseract OCR, so far, exceeds my expectations
of it's ability to decode the VGA text from just 1 frame of
capture.  I think I can do BIOS setups, probably much more
slowly, but still it beats wasting other people's time especially
when one runs in to a situation where stuff isn't quite right and
one has to revisit the same task several times before things
shake out correctly.  It is also possible to save the screen
shots for posterity which is nice if you haven't done some task
in a year or so and are having to remind yourself what you did.

	By the way, the black screen on the first Linux system
was due to the fact that the video card has a VGA socket and
possibly a DVI socket.  The video is on the DVI socket most
likely and the VGA socket has no signal, explaining the black
screen of nothing.

	Thanks to all!

Martin McCormick

[toc] | [prev] | [next] | [standalone]


#212707

FromDan Ritter <dsr@randomstring.org>
Date2019-08-12 20:30 +0200
Message-ID<yuneV-7MA-5@gated-at.bofh.it>
In reply to#212700
Martin McCormick wrote: 
> 	The tesseract utility flawlessly converted the sample jpg
> in to ASCII text so I tried that
> other Linux box's VGA port.  This certainly looks like not much
> of anything but I was happy to get it:
> 
> Debian GNU/Linux 10 audios tty
> 
> audio3 login: [43431.294393] print_req_error: 1/0 error, dev fd0, sector 0
> [43431.338633] print_reqerror: 1/0 error, dev fdo, sector 0
> 
> 	I guess I may have stuck a blank disk in to the drive or
> something as it looks like it is complaining about being unable
> to read the floppy disk.  It also may be left over from booting
> as the floppy is the first boot source and empty.

...
 
> 	Anyway, I want to thank everybody who supplied helpful
> information.  The tesseract OCR, so far, exceeds my expectations
> of it's ability to decode the VGA text from just 1 frame of
> capture.  I think I can do BIOS setups, probably much more
> slowly, but still it beats wasting other people's time especially
> when one runs in to a situation where stuff isn't quite right and
> one has to revisit the same task several times before things
> shake out correctly.  It is also possible to save the screen
> shots for posterity which is nice if you haven't done some task
> in a year or so and are having to remind yourself what you did.

This is really cool, and I think you should write it up as an
article.

-dsr-

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web