Click here to Skip to main content
15,891,607 members
Home / Discussions / C#
   

C#

 
QuestionList problem ! Pin
_Q12_3-Nov-13 15:18
_Q12_3-Nov-13 15:18 
AnswerRe: List problem ! Pin
Abhinav S3-Nov-13 19:13
Abhinav S3-Nov-13 19:13 
GeneralRe: List problem ! Pin
_Q12_3-Nov-13 19:47
_Q12_3-Nov-13 19:47 
AnswerRe: List problem ! Pin
OriginalGriff3-Nov-13 22:04
mveOriginalGriff3-Nov-13 22:04 
AnswerRe: List problem ! Pin
Richard MacCutchan3-Nov-13 22:10
mveRichard MacCutchan3-Nov-13 22:10 
AnswerRe: List problem ! Pin
Paulo Augusto Kunzel4-Nov-13 3:02
professionalPaulo Augusto Kunzel4-Nov-13 3:02 
AnswerRe: List problem ! Pin
Pete O'Hanlon4-Nov-13 3:24
mvePete O'Hanlon4-Nov-13 3:24 
Questionalways black screen Pin
josephdalebert2-Nov-13 23:33
josephdalebert2-Nov-13 23:33 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Cv;
using CxCore;
using OtherLibs;

namespace sampleWebcam
{
public partial class Form1 : Form
{
private CvCapture VideoCapture;

private IplImage frame;
private IplImage imgMain;

public Form1()
{
InitializeComponent();
}

private void btnVideo_Click(object sender, EventArgs e)
{
double vidWidth, vidHeight;

if (btnVideo.Text.Equals("Start Video"))
{
VideoCapture = highgui.CvCreateCameraCapture(0);

if (VideoCapture.ptr == IntPtr.Zero)
{
MessageBox.Show("badtrip ah!!!");
return;
}

btnVideo.Text = "Stop Video";

highgui.CvSetCaptureProperty(ref VideoCapture, highgui.CV_CAP_PROP_FRAME_WIDTH, 640);
highgui.CvSetCaptureProperty(ref VideoCapture, highgui.CV_CAP_PROP_FRAME_HEIGHT, 320);

highgui.CvQueryFrame(ref VideoCapture);

vidWidth = highgui.cvGetCaptureProperty(VideoCapture, highgui.CV_CAP_PROP_FRAME_WIDTH);
vidHeight = highgui.cvGetCaptureProperty(VideoCapture, highgui.CV_CAP_PROP_FRAME_HEIGHT);

picBoxMain.Width = (int)vidWidth;
picBoxMain.Height = (int)vidHeight;

timerGrab.Interval = 42;
timerGrab.Enabled = true;
}

else
{
btnVideo.Text = "Start Video";
timerGrab.Enabled = false;

if (VideoCapture.ptr == IntPtr.Zero)
{
highgui.CvReleaseCapture(ref VideoCapture);
VideoCapture.ptr = IntPtr.Zero;
}
}
}

private void timerGrab_Tick(object sender, EventArgs e)
{
frame = highgui.CvQueryFrame(ref VideoCapture);

if (frame.ptr == IntPtr.Zero)
{
timerGrab.Stop();
MessageBox.Show("Wrong");
return;
}

imgMain = cxcore.CvCreateImage(cxcore.CvGetSize(ref frame), 8, 3);

cxcore.CvCopy(ref frame, ref imgMain);
cxcore.CvFlip(ref imgMain, 0);

picBoxMain.Image = highgui.ToBitmap(imgMain, false);

cxcore.CvReleaseImage(ref imgMain);
}
}
}

i have this code. but when i run this. the screen when running is always black. it does not view any picture but always black screen.

i need your help masters. i dont know what to do. Cry | :(( (
AnswerRe: always black screen Pin
Richard Andrew x643-Nov-13 13:20
professionalRichard Andrew x643-Nov-13 13:20 
QuestionC# Generic Dictionary ordered by Value: is it really ordered ? Pin
BillWoodruff2-Nov-13 8:05
professionalBillWoodruff2-Nov-13 8:05 
AnswerRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
harold aptroot2-Nov-13 8:23
harold aptroot2-Nov-13 8:23 
GeneralRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
BillWoodruff2-Nov-13 18:43
professionalBillWoodruff2-Nov-13 18:43 
AnswerRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
TnTinMn2-Nov-13 17:28
TnTinMn2-Nov-13 17:28 
GeneralRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
BillWoodruff2-Nov-13 18:48
professionalBillWoodruff2-Nov-13 18:48 
GeneralRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
TnTinMn3-Nov-13 10:50
TnTinMn3-Nov-13 10:50 
AnswerRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
jschell4-Nov-13 8:05
jschell4-Nov-13 8:05 
AnswerRe: C# Generic Dictionary ordered by Value: is it really ordered ? Pin
Keith Barrow5-Nov-13 2:22
professionalKeith Barrow5-Nov-13 2:22 
QuestionBurning open file to CD/DVD Pin
Member 103095672-Nov-13 1:34
Member 103095672-Nov-13 1:34 
AnswerRe: Burning open file to CD/DVD Pin
Dave Kreskowiak2-Nov-13 9:20
mveDave Kreskowiak2-Nov-13 9:20 
GeneralRe: Burning open file to CD/DVD Pin
Member 103095672-Nov-13 9:45
Member 103095672-Nov-13 9:45 
AnswerRe: Burning open file to CD/DVD Pin
TnTinMn3-Nov-13 11:58
TnTinMn3-Nov-13 11:58 
QuestionComparing a name inputted against a database of names Pin
JacksonVF1-Nov-13 22:56
JacksonVF1-Nov-13 22:56 
AnswerRe: Comparing a name inputted against a database of names Pin
Mycroft Holmes2-Nov-13 1:21
professionalMycroft Holmes2-Nov-13 1:21 
GeneralRe: Comparing a name inputted against a database of names Pin
JacksonVF2-Nov-13 2:45
JacksonVF2-Nov-13 2:45 
AnswerRe: Comparing a name inputted against a database of names Pin
jschell2-Nov-13 6:49
jschell2-Nov-13 6:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.