本人现在做一个学籍管理系统:
想做到:在一个JSP页面中,有个小窗口可以使用摄像头看到学生,并在学生摆正姿势后,点击一个按钮,把他(她)的照片拍下,点击保存保存在该学生的学籍中。
(就像计算机一级考试那个现场数码照像)
请问:怎么解决?
谢谢!!!
------解决方案--------------------
关注。。。。。
------解决方案--------------------
不知道
------解决方案--------------------
我估计,要通过JNI去调
------解决方案--------------------
不会,帮up
------解决方案--------------------
从Java来做这个, 我觉得有难度...
应该是从驱动下手吧
------解决方案--------------------
http://community.csdn.net/Expert/topic/5425/5425514.xml?temp=.311886
看看这个里面
------解决方案--------------------
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Runtime.InteropServices;
using System.Drawing.Imaging;
namespace CapTureMovie
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button BtnCapTure;
private System.Windows.Forms.Panel panel_Vedio;
private int hHwnd;
private System.Windows.Forms.Button BtnStop;
private System.Windows.Forms.Label LbSysMsg;
private System.Windows.Forms.Button button1;
public struct videohdr_tag
{
public byte[] lpData;
public int dwBufferLength;
public int dwBytesUsed;
public int dwTimeCaptured;
public int dwUser;
public int dwFlags;
public int[] dwReserved;
}
public delegate bool CallBack(int hwnd, int lParam);
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
[DllImport( "avicap32.dll ", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
public static extern int capCreateCaptureWindowA([MarshalAs(UnmanagedType.VBByRefStr)] ref string lpszWindowName, int dwStyle, int x, int y, int nWidth, short nHeight, int hWndParent, int nID);
[DllImport( "avicap32.dll ", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
public static extern bool capGetDriverDescriptionA(short wDriver, [MarshalAs(UnmanagedType.VBByRefStr)] ref string lpszName, int cbName, [MarshalAs(UnmanagedType.VBByRefStr)] ref string lpszVer, int cbVer);
[DllImport( "user32 ", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
public static extern bool DestroyWindow(int hndw);
[DllImport( "user32 ", EntryPoint= "SendMessageA ", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
public static extern int SendMessage(int hwnd, int wMsg, int wParam, [MarshalAs(UnmanagedType.AsAny)] object lParam);
[DllImport( "user32 ", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
public static extern int SetWindowPos(int hwnd, int hWndInsertAfter, int x, int y, int cx, int cy, int wFlags);