473,770 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

capture a photo

BH
how can I capture a photo in C++ via a video cam?
Jul 22 '05 #1
3 1754
BH wrote:
how can I capture a photo in C++ via a video cam?

I believe the following code fits your requirements:

----------------------------------------
// capture.cpp
#include <string>
#include <iostream>

using std::string;

void video_cam(strin g& container, const string& contained);

int
main()
{
string s = "C++";

video_cam(s, "photo");

std::cout << '\'' << s << '\'' << '\n';

return 0;
}
void
video_cam(strin g& container, const string& contained)
{
string::size_ty pe mid = container.size( ) / 2;
container.inser t(mid, contained);
}
----------------------------------------------

- Adam

--
Reverse domain name to reply.

Jul 22 '05 #2

"BH" <bb*@cc.com> wrote in message news:bt******** **@www.csis.hku .hk...
how can I capture a photo in C++ via a video cam?


You´ll have to write an application for this as there is no
"GetMeAPictureA utomatically()" function available in C++ and any other
language that I know of. Check out any OS specific libraries and APIs that
allow you to control your video cam.

Chris
Jul 22 '05 #3

"BH" <bb*@cc.com> wrote in message news:bt******** **@www.csis.hku .hk...
how can I capture a photo in C++ via a video cam?

Push the button.

Jul 22 '05 #4

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

Similar topics

2
9558
by: Eric McDaniel | last post by:
I am trying to read in a bunch of images and manipulate them using Image::Magick, then display them using Tk::Photo. I would like to do this without creating a temp file for each image, since there can be quite a few of them. However, I can't make Tk::Photo understand the data returned by Image::Magick's ImageToBlob() function. Here is the way I had hoped it would work: #!perl
2
1975
by: Tony WONG | last post by:
i am not sure that this subject can be discussed here. i have many photos. they are stored according to the name of the EVENT and YEAR. i will set up a database (sql or access) to store information of the photo and set up a folder to store the "PHOTOs". and design a web page to show. My question is how to put the photo on the web page.
10
17780
by: Rattanak Song | last post by:
Hi, I'm trying to build a database which can capture a still image from a digital camera or web cam and import to the database via an Object or something like that. Any help would be very appreciated. Rattanak
1
2187
by: Bill Strass | last post by:
I have a form showing the records of different people. I would like a photo to be displayed in the form, with each person's record. My digital photo > *.jpg type file and I change each photo to *.bmp format using SnagIt. I created an OLE type field in the table to store either the embedded photo or a link to the photo (I'll decide which method to use,
1
1578
by: erickwan88 | last post by:
I want to capture the input from a writing pad and apply in vb2005 but I don't know any programming codes about it. The writing pad is connected by a USB port. Before I run the writing pad program, it can be a mouse and move around double click = normal one click click twice = normal double click
1
2092
by: DBC User | last post by:
Hi Guys, I need help to identify a open source or a commerical software that I can embed in my web app to capture a photo using local web cam or a camera hooked up to the PC. Any comments or suggestions? I said, it has to be compact with web app since I need to store the image in a central ftp server for photo sharing. Thanks for your thoughts.
1
3606
by: cumupkid | last post by:
II am trying to create a form that will allow me to upload photos to a folder in the site root directory and add the information to the mysql db at the same time. I have created two forms, one that uploads to photo to the folder in the site root diorectory. One that uploads the info to mysql database. but... When I try to upload them both ways at the same time i cant get it. I am Including code for both pages i have working. Code for...
0
2037
by: tsarumugavel m | last post by:
hi, i am new in asp.net. my project specifiaction is caputre the image from webcam through asp.net coding. I want to capture the visitor photo. the web cam connect in the client system. i click the capture button in client system then photo want to take. Please help me urgent? thanks By Arumguavel M
1
3135
by: Steve | last post by:
Hi All I have a VB.net 2005 windows forms application which uses webcam to take photos of staff members etc for use within the application All works fine if an external webcam is used The problem I have is when clients have a laptop with built in webcam The first time I connect to the capture drivers all works well. If I try to
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10254
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10036
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,...
1
7451
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
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
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...
1
4007
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
3607
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
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.