473,657 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 13778
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.hel sinki.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.hel sinki.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.hel sinki.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.hel sinki.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.hel sinki.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.hel sinki.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.hel sinki.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.pow ernet.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.hel sinki.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********@yah oo.com) (cb********@wor ldnet.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.hel sinki.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.program mer.misc, comp.unix.progr ammer, or
comp.os.linux.d evelopment.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.program mer.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.x 86, embedded system processor questions may
be appropriate in comp.arch.embed ded.

* 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.programmin g 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++.m oderated.

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

news.groups.que stions 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)cybers pace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #10

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

Similar topics

1
3935
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 me that "Its intended for server" stuff... thanks! :-) Now that is out of the way lets get to it: I have Windows 2003 Server Enterprise and a Logitech Quickcam Web. I plugged it in and it loaded all the drivers automatically, yet I do not...
4
11981
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 problems with... Could you recommend the best way to capture a Webcam picture from .NET? Do I need device specific drivers or is there a standardized way to do it? Any recommended brand of Webcam?
0
2223
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 streaming) from different webcams. We would like to set up a Webcam server on which we would connect several webcams (at least 12) and stream the output of each webcam on the web. That way, our client application could choose which webcam streams...
0
2047
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 different site and obviously will have to reprogram for those drivers. Is there a generic webcam control that can be used I will only be using USB cameras
3
2753
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 webcams so that I can play them on my fake webcam. Does any one know about any good webcam recorder software? Thank you for your help. Newbie
2
4138
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 pop-up window says to make sure the webcam USB cable is connected to the computer. What does this mean? The webcam is already build-in to the computer? This is preventing the installation of the software. Thank you for you help
1
2587
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 many years and have written a couple WebCam utilities for my model airplane club. My utilities handle all the tasks of acquiring the images, FTPing them to the web site and handling via FTP image renaming replacing etc. What I don't know what I am...
13
7194
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 webcam. First I tried webcamspy (http://webcamspy.sourceforge.net/). That requires pySerial and pyParallel, and optionally pyI2C. Runing WebCamSpy results in: Exception exceptions.AttributeError: "Parallel instance has no attribute '_fd'" in...
0
1029
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 any one help on this. Thanks in Advance Regards -Pradeepp
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.