473,382 Members | 1,657 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Reading data from webcam

Hi.
I'm sorry for my bad english, but it's not my motherlanguage.
I need to read data from a webcam and display the images on DOS . So, how
can i show this images?
i have to translate the data received to a bitmap, to display it on the
screen in DOS, mut i don't know how to do....can u give me some help or
piece of advices?
Thank you very much!
Mark
Nov 14 '05 #1
10 13736
aceto <ac*****@tin.it> scribbled the following:
Hi.
I'm sorry for my bad english, but it's not my motherlanguage.
I need to read data from a webcam and display the images on DOS . So, how
can i show this images?
i have to translate the data received to a bitmap, to display it on the
screen in DOS, mut i don't know how to do....can u give me some help or
piece of advices?
Thank you very much!
Mark


This has nothing to do with C. Ask in an MS-DOS newsgroup, please.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"'I' is the most beautiful word in the world."
- John Nordberg
Nov 14 '05 #2
yes, it has...
i can read the data in the same mode with win, dos, unix.

"Joona I Palaste" <pa*****@cc.helsinki.fi> ha scritto nel messaggio
news:bt**********@oravannahka.helsinki.fi...
aceto <ac*****@tin.it> scribbled the following:
Hi.
I'm sorry for my bad english, but it's not my motherlanguage.
I need to read data from a webcam and display the images on DOS . So, how can i show this images?
i have to translate the data received to a bitmap, to display it on the
screen in DOS, mut i don't know how to do....can u give me some help or
piece of advices?
Thank you very much!
Mark


This has nothing to do with C. Ask in an MS-DOS newsgroup, please.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"'I' is the most beautiful word in the world."
- John Nordberg

Nov 14 '05 #3
ciro <ac*****@tin.it> scribbled the following:
yes, it has...
i can read the data in the same mode with win, dos, unix.


You are using a system-specific extension to read the data, not the C
programming language. Programming languages usually do not define
system-specific extensions.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"I wish someone we knew would die so we could leave them flowers."
- A 6-year-old girl, upon seeing flowers in a cemetery
Nov 14 '05 #4

On Sun, 11 Jan 2004, ciro wrote:
Because it's annoying as hell.
Why not?
Rearranged. Please don't top-post.

"Joona I Palaste" <pa*****@cc.helsinki.fi> ha scritto nel messaggio
news:bt**********@oravannahka.helsinki.fi...
aceto <ac*****@tin.it> scribbled the following:
Hi.
I'm sorry for my bad english, but it's not my motherlanguage.
I need to read data from a webcam and display the images on DOS . So, how can i show this images?
i have to translate the data received to a bitmap, to display it on the
screen in DOS, mut i don't know how to do....can u give me some help or
piece of advices?
Thank you very much!
Mark


This has nothing to do with C. Ask in an MS-DOS newsgroup, please.


yes, it has...
i can read the data in the same mode with win, dos, unix.


By the way, Joona, weren't we going to handle this sort of
OT request with Ben Pfaff's "topicality guidance" message? For
the benefit of 'aceto', or 'ciro', or whoever the OP is, Ben
has put it on the Web here:
http://www.msu.edu/~pfaffben/writing...off-topic.html

Finally, some clarification for the OP. Your program will
almost certainly follow this rough algorithm:

1. Get the data from the webcam.
2. Make that raw data into an array of pixels.
3. Display those pixels on the screen.
4. Go back to step 1.

Here in comp.lang.c, we can help you with steps 2 and 4, because
they can be done in pure portable C. We cannot help you with
steps 1 or 3, not only because you haven't given us sufficient
information about your platform, but because even if you had,
you couldn't do them in C anyway. You'll need some sort of
third-party library code, most likely. Ask in a newsgroup
dedicated to webcam programming, or whatever OS or compiler you're
using. [Use Google to find one.]

HTH,
-Arthur

Nov 14 '05 #5
i'm really sorry
where can i search? i have no idea :(
tnx

"Joona I Palaste" <pa*****@cc.helsinki.fi> ha scritto nel messaggio
news:bt**********@oravannahka.helsinki.fi...
ciro <ac*****@tin.it> scribbled the following:
yes, it has...
i can read the data in the same mode with win, dos, unix.


You are using a system-specific extension to read the data, not the C
programming language. Programming languages usually do not define
system-specific extensions.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"I wish someone we knew would die so we could leave them flowers."
- A 6-year-old girl, upon seeing flowers in a cemetery

Nov 14 '05 #6
aceto wrote:
Hi.
I'm sorry for my bad english, but it's not my motherlanguage.
I need to read data from a webcam and display the images on DOS . So, how
can i show this images?
i have to translate the data received to a bitmap, to display it on the
screen in DOS, mut i don't know how to do....can u give me some help or
piece of advices?
Thank you very much!


Let's assume you've managed to trick the filesystem into thinking the webcam
is a file, perhaps with the name "/dev/webcam". Then you can display a
bitmap as follows:

#include <stdio.h>
#include <limits.h>

#define SCRWIDTH 72 /* adjust to taste */

int main(void)
{
FILE *fp = fopen("/dev/webcam", "rb");
if(fp != NULL)
{
int count = 0;
int ch;
int i;
while((ch = getc(fp)) != EOF)
{
++count;
putchar(' '); /* optional - included for clarity */
for(i = 1 << (CHAR_BIT - 1); i > 0; i /= 2)
{
++count;
putchar((ch & i) ? '0' : '1');
}
if(count >= SCRWIDTH)
{
count = 0;
putchar('\n');
}
}
putchar('\n');
fclose(fp);
}
return 0;
}

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #7
ciro wrote:
"Joona I Palaste" <pa*****@cc.helsinki.fi> ha scritto nel messaggio
aceto <ac*****@tin.it> scribbled the following:

I'm sorry for my bad english, but it's not my motherlanguage.
I need to read data from a webcam and display the images on
DOS . So, how can i show this images?
i have to translate the data received to a bitmap, to display
it on the screen in DOS, mut i don't know how to do....can u
give me some help or piece of advices?


This has nothing to do with C. Ask in an MS-DOS newsgroup, please.


yes, it has...
i can read the data in the same mode with win, dos, unix.


No it doesn't. The standard C language knows nothing about
screens, webcams, images, bitmaps, DOS. Look for a newsgroup
dealing with your particular system.

Also, don't toppost, and don't change your name between postings.
Your answer belongs after (or intermixed with) the properly
snipped quoted material.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #8
[ top posting and snippage failure repaired ]

ciro wrote:
"Joona I Palaste" <pa*****@cc.helsinki.fi> ha scritto nel
messaggio news:bt**********@oravannahka.helsinki.fi...
aceto <ac*****@tin.it> scribbled the following:
Hi. I'm sorry for my bad english, but it's not my
motherlanguage. I need to read data from a webcam and
display the images on DOS . So, how can i show this
images? i have to translate the data received to a bitmap,
to display it on the screen in DOS, mut i don't know how
to do....can u give me some help or piece of advices?
Thank you very much! Mark


This has nothing to do with C. Ask in an MS-DOS newsgroup,
please.

yes, it has... i can read the data in the same mode with win,
dos, unix.


No, Joona was absolutely correct. Standard C knows nothing of
webcams, webcan interfaces, image formats and/or transmission,
screens, or pixel-writing.

The redirection to an MS-DOS forum was completely correct.

Top-posting is considered bad manners in comp.lang.c; and failure
to trim appropriately is considered an indication of clueless
behavior.
--
Morris Dovey
West Des Moines, Iowa USA
C links at http://www.iedu.com/c
Read my lips: The apple doesn't fall far from the tree.

Nov 14 '05 #9
ciro <ac*****@tin.it> spoke thus:
i'm really sorry
where can i search? i have no idea :(


The below text has some suggestions. If that isn't as helpful as you
need, try Google.

(The below text was originally written by Ben Pfaff)

For your convenience, the list below contains topics that are not
on-topic for comp.lang.c, and suggests newsgroups for you to explore
if you have questions about these topics. Please do observe proper
netiquette before posting to any of these newsgroups. In particular,
you should read the group's charter and FAQ, if any (FAQs are
available from www.faqs.org and other sources). If those fail to
answer your question then you should browse through at least two weeks
of recent articles to make sure that your question has not already
been answered.

* OS-specific questions, such as how to clear the screen,
access the network, list the files in a directory, or read
"piped" output from a subprocess. These questions should be
directed to OS-specific newsgroups, such as
comp.os.ms-windows.programmer.misc, comp.unix.programmer, or
comp.os.linux.development.apps.

* Compiler-specific questions, such as installation issues and
locations of header files. Ask about these in
compiler-specific newsgroups, such as gnu.gcc.help or
comp.os.ms-windows.programmer.misc. Questions about writing
compilers are appropriate in comp.compilers.

* Processor-specific questions, such as questions about
assembly and machine code. x86 questions are appropriate in
comp.lang.asm.x86, embedded system processor questions may
be appropriate in comp.arch.embedded.

* ABI-specific questions, such as how to interface assembly
code to C. These questions are both processor- and
OS-specific and should typically be asked in OS-specific
newsgroups.

* Algorithms, except questions about C implementations of
algorithms. "How do I implement algorithm X in C?" is not a
question about a C implementation of an algorithm, it is a
request for source code. Newsgroups comp.programming and
comp.theory may be appropriate.

* Making C interoperate with other languages. C has no
facilities for such interoperation. These questions should
be directed to system- or compiler-specific newsgroups. C++
has features for interoperating with C, so consider
comp.lang.c++ for such questions.

* The C standard, as opposed to standard C. Questions about
the C standard are best asked in comp.std.c.

* C++. Please do not post or cross-post questions about C++
to comp.lang.c. Ask C++ questions in C++ newsgroups, such
as comp.lang.c++ or comp.lang.c++.moderated.

* Test posts. Please test in a newsgroup meant for testing,
such as alt.test.

news.groups.questions is a good place to ask about the appropriate
newsgroup for a given topic.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #10
nrk
Christopher Benson-Manica wrote:
ciro <ac*****@tin.it> spoke thus:


<snip OT question>

<snip on-topic redirection>

Your reply is very much on topic. No need to flag it as OT.

-nrk.
Nov 14 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kelowna | last post by:
Yes... Its a server os... i kno! i hav xp yea but tis system is for screwing with.. Im sure theres alot of ppl here tat kno tis stuff inside-out! im doing this for educational purposes so dont give...
4
by: Joakim Rylander | last post by:
Hi all, I need to create a public booth where people can look at themselves in a webcam and snap a picture which will be seen on a webpage. The backend is easy, it's the webcam part that I have...
0
by: Elp | last post by:
Hi, We have developped an client application in C#. Among other things, this application should display in 4 different windows (or 4 different panels in the same window), 4 webcam streams (web...
0
by: Steve | last post by:
Hi Can anyone please tell me how to use a webcam on a form. I have done an app that uses a webcam, but I have used the drivers for that webcam. Now I need to use a different camera on a...
3
by: DillonCzerny | last post by:
Hello Many times I see a lot of people post webcam videos on google video or youtube. I wonder how do they record it from those people’s webcam? I have a fake webcam and I want to record some...
2
by: =?Utf-8?B?d29vZHliZWFy?= | last post by:
I just bought a new Dell, so I'm sorry if this is a stupid question. There is a built-in webcam. Im using the disc provided by Dell (Dell Webcam Software), however during the installation, a...
1
by: Fleets422 | last post by:
Hi, new kid on the block... Hope I am posting this in the proper forum as it involves HTML, JAVA as well as PHP. A little background... I have been writing PC apps using Borland's C++ Builder for...
13
by: Berco Beute | last post by:
I've been trying to access my webcam using Python, but I failed miserably. The camera works fine under Ubuntu (using camora and skype), but I am unable to get WebCamSpy or libfg to access my...
0
by: =?Utf-8?B?U2F2aW5nIFdlYmNhbSBEYXRhIHRvIEhhcmREaXNr | last post by:
Hi, Using C# I am abl;e to capture the data from the webcam and display the same on the picture box. Bit now I want to save the captured data from webcam into hard-disk in avi / wma format. Could...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.