473,396 Members | 1,879 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,396 software developers and data experts.

capture a photo

BH
how can I capture a photo in C++ via a video cam?
Jul 22 '05 #1
3 1739
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(string& container, const string& contained);

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

video_cam(s, "photo");

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

return 0;
}
void
video_cam(string& container, const string& contained)
{
string::size_type mid = container.size() / 2;
container.insert(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
"GetMeAPictureAutomatically()" 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
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...
2
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...
10
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...
1
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...
1
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...
1
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...
1
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...
0
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....
1
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...
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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.