videocapture mit wecam bzw wintvkarte
Übersicht

super_castleBetreff: videocapture mit wecam bzw wintvkarte |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hallo, ich habe diese dll mit einer exe gefunden "pbca3d2.dll" wo ein cambild im b3dfenster dargestellt wird. mir ist der autor ungekannt und würde gerne mal wissen, wie er das in b3d-source-code verwirklicht hat.
vielleicht hatten andere dieses auch mal vor und würde mich riesig über nachrichten über dieses thema freuen. mfg castle |
||
Dreamora |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
~VERSCHOBEN~ Wüsste nicht was das mit dem 3D Teil zu tun hätte. Bitte erst überlegen wohin es gehört, dann posten. Dreamora |
||
Ihr findet die aktuellen Projekte unter Gayasoft und könnt mich unter @gayasoft auf Twitter erreichen. |
super_castle |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hallo, es hat was mit 3d zu tun. ich möchte das in meine 3d-oberfläche mit einbinden.
mfg castle |
||
![]() |
d-bug |
![]() Antworten mit Zitat ![]() |
---|---|---|
Mag sein, aber der WebCam Part hat eindeutig nichts mit 3D zu tun.
Also habe ich den anderen Thread geschlossen. Zukünftig möchte ich dich bitten nicht jeden Thread 2x zu eröffnen. Ich hatte es dir ja eben schonmal nahegelegt. ![]() So, um deiner Frage etwas nachzugehen, solltest du dir diesen Thread hier mal ansehen, vielleicht hilft dir das weiter. cheers |
||
- Zuletzt bearbeitet von d-bug am Sa, März 18, 2006 14:24, insgesamt einmal bearbeitet
ke^kx |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Er hat das garnicht mit BB-Code verwirklicht sondern mit C, C++ oder einer anderen Sprache, die Fähig ist, dlls zu erstellen. Wenn du meinst, wie man das in BB einbindet, musst du entweder in der Readme der dll gucken oder dir eine andere suchen.
Jiriki |
||
http://i3u8.blogspot.com
Asus Striker II Intel Core2Quad Q9300 @ 2,5 GHz (aber nur zwei Kerne aktiv aufgrund der Instabilität -.-) Geforce 9800 GTX 2GB RAM |
super_castle |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hallo jungs, habe heute mit purebasic meine eigene videocapture-dll geschrieben für b3d. wenn man weiss wie es funktioniert ist es einfach. habe mich im visualbasicforum schlau gefragt hinsichtlich videocapture.
die dll für die wintv-karte heisst avicap32.dll, daraus werden die ganzen steuerbefehle herausgenommen für alle kameras include webcam. kann jetzt mit meiner dll das videobild-bmp aus der ablage herausgrabben (ca 14 bilder pro sec) und den standpunkt meines roboters im b3d windowsfenster sehen, die grösse und den ort des videobildes kann ich selber festlegen. gleichzeitig läuft ein 3d-modell meines robby im fenster der die daten über funk emfängt und so den kurs einschlägt wie der richtige roboter im raum. es lohnt sich für die b3d besitzer das purebasic anzuschaffen, schon wegen der dll erstellung. habe die rs323anbindung-dll auch mit purebasic für b3d geschrieben. damit kann ich über das b3d-fenster meinen robbosapien v1 fernsteuern (ir-diode mit avr zusammen auf einer platine). mfg castle |
||
ke^kx |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Brauch man für das erstellen von .dlls in Purebasic die Vollversion? Und muss man für z.B. VideoCapturing nicht auch eine dll bei Purebasic einsetzen?
Jiriki |
||
http://i3u8.blogspot.com
Asus Striker II Intel Core2Quad Q9300 @ 2,5 GHz (aber nur zwei Kerne aktiv aufgrund der Instabilität -.-) Geforce 9800 GTX 2GB RAM |
super_castle |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
du brauchst die vollversion.
die avicap32.dll der wintv-karte wird auch mit meiner puredll eröffnet und geschlossen. wenn du es nur mit pure machen(darstellen) tust, brauchst du auch die avicap32.dll. die userlib decls: .lib "pebi_.dll" pebi_cap_dll():"pebi_cap_dll" pebi_cap_open%(wert%):"pebi_cap_open" pebi_cap_close():"pebi_cap_close" pebi_cap_bild():"pebi_cap_bild" pebi_getclip():"pebi_getclip" der b3d-code : Code: [AUSKLAPPEN] AppTitle "Test" Graphics3D 800,600,16,2 SetBuffer BackBuffer() Global hwndHandle% hwndHandle= api_FindWindow("Blitz Runtime Class", "Test") pebi_cap_dll() pebi_cap_open(hwndHandle) pebi_cap_bild() pebi_getclip() Bild=LoadImage ("d:\capturebild\test.bmp") While Not KeyHit(1) If KeyDown(48) Then pebi_cap_bild() pebi_getclip() Bild=LoadImage ("d:\capturebild\test.bmp") EndIf RenderWorld SetBuffer FrontBuffer() MaskImage Bild,255,0,255 DrawImage Bild, 100, 100 Flip Wend End der dll-code für pure: Code: [AUSKLAPPEN] Global hRobby.l #WM_CAP_START = 1024 #WM_CAP_SET_CALLBACK_ERROR = #WM_CAP_START + 2 #WM_CAP_SET_CALLBACK_STATUS = #WM_CAP_START + 3 #WM_CAP_SET_CALLBACK_YIELD = #WM_CAP_START + 4 #WM_CAP_SET_CALLBACK_FRAME = #WM_CAP_START + 5 #WM_CAP_SET_CALLBACK_VIDEOSTREAM = #WM_CAP_START + 6 #WM_CAP_SET_CALLBACK_WAVESTREAM = #WM_CAP_START + 7 #WM_CAP_DRIVER_CONNECT = #WM_CAP_START + 10 #WM_CAP_DRIVER_DISCONNECT = #WM_CAP_START + 11 #WM_CAP_DRIVER_GET_CAPS = #WM_CAP_START + 14 #WM_CAP_DLG_VIDEOFORMAT = #WM_CAP_START + 41 #WM_CAP_DLG_VIDEOSOURCE = #WM_CAP_START + 42 #WM_CAP_DLG_VIDEODISPLAY = #WM_CAP_START + 43 #WM_CAP_SET_PREVIEW = #WM_CAP_START + 50 #WM_CAP_SET_PREVIEWRATE = #WM_CAP_START + 52 #WM_CAP_GET_STATUS = #WM_CAP_START + 54 #WM_CAP_FILE_SAVEDIB = #WM_CAP_START + 25 #WM_CAP_SET_SCALE = #WM_CAP_START + 53 #WM_CAP_SET_CALLBACK_CAPCONTROL = #WM_CAP_START + 85 #WM_CAP_EDIT_COPY = #WM_CAP_START + 30 #WM_CAP_GRAB_FRAME = #WM_CAP_START+60 #WM_CAP_GRAB_FRAME_NOSTOP = #WM_CAP_START + 61 ProcedureDLL pebi_getclip() hBitmap = GetClipboardData(#PB_ClipboardImage) ImageNumber=0 Protected *lptr.LONG, *wptr.WORD, BitmapData.BITMAP GetObject_(hBitmap, SizeOf(BITMAP), @BitmapData) !extrn _PB_Image_ObjectsArea !mov eax, [_PB_Image_ObjectsArea] !mov [esp+8], eax *lptr + ImageNumber * 14 *lptr\l = hBitmap *wptr = *lptr + 4 *wptr\w = BitmapData\bmWidth *wptr + 2 *wptr\w = BitmapData\bmHeight *wptr + 2 *wptr\w = BitmapData\bmBitsPixel *lptr = *wptr + 2 *lptr\l = BitmapData\bmBits SaveImage(0, "d:\capturebild\test.bmp") EndProcedure ProcedureDLL pebi_cap_dll() OpenLibrary(0, "AVICAP32.DLL") EndProcedure ; der videocapturebildschirm ist nur 1x1 pixel gross, weil ich das bild nach bedarf aus der ablage grabbe!! wer das originalbild habe möchte, kann das bild dementsprechend gross darstellen. (120,30 ist der linke eckpunkt zb und 1,1 sind die 1x1 pixel ProcedureDLL pebi_cap_open(zahl.l) hRobby.l = CallFunction(0, "capCreateCaptureWindowA", "Test", #WS_VISIBLE + #WS_CHILD, 120, 30, 1, 1, zahl.l, 0) SendMessage_(hRobby.l, #WM_CAP_DRIVER_CONNECT, 0 , 0) SendMessage_(hRobby.l, #WM_CAP_SET_SCALE , 1 , 0) EndProcedure ProcedureDLL pebi_cap_close() SendMessage_(hRobby.l, #WM_CAP_SET_PREVIEW, 0, 0) SendMessage_(hRobby.l, #WM_CAP_DRIVER_DISCONNECT, "Test", 0) EndProcedure ProcedureDLL pebi_cap_bild() SendMessage_(hRobby.l, #WM_CAP_GRAB_FRAME, 0 , 0) ;SendMessage_(hRobby.l, #WM_CAP_GRAB_FRAME_NOSTOP, 0, 0) SendMessage_(hRobby.l, #WM_CAP_EDIT_COPY, 0 , 0) EndProcedure |
||
super_castle |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hallo...jetzt läuft es auch ohne meine pure-dll.
das bild wird direkt im b3d-fenster dargestellt und wird auch jedesmal in der ablage abgelegt. das bild flackert bei der direktdarstellung im b3d-fenster, wenn ich es aber mit mit meiner copier-routine darstelle ,(ablage-b3d-fenster) ist das bild hervorragend. bevor man das programm verlässt, muss man die "avicap32.dll" wieder schliessen (bei mir habe ich das "B" genommen), danach das b3d-fenster verlassen. achtung: wenn einer mal eine routine schreiben könnte um das bild aus der ablage zu holen und auf dem b3d-fenster darzustellen wäre schön. zur zeit mache ich es mit meiner pure-dll-routine. die decls : .lib "avicap32.dll" avi_cap_% ( t1$, w1%, w2%, w3%, w4%, w5%, w6%,w7%):"capCreateCaptureWindowA" .lib "User32.dll" sendmessage_%(w1%,w2%,w3%,w4%):"SendMessageA" findwindow_% (t1$, t2$) : "FindWindowA" das b3d-programm ist läuffähig mit der "avicap32.dll" : Code: [AUSKLAPPEN] AppTitle "Test" Graphics3D 800,600,16,2 SetBuffer BackBuffer() Const WS_CHILD = $40000000 Const WS_VISIBLE = $10000000 Const SWP_NOMOVE = $2 Const SWP_NOZORDER = $4 Const HWND_BOTTOM = 1 Const WM_USER = $400 Const WM_CAP_START = WM_USER Const WM_CAP_GET_CAPSTREAMPTR = WM_CAP_START + 1 Const WM_CAP_SET_CALLBACK_ERROR = WM_CAP_START + 2 Const WM_CAP_SET_CALLBACK_STATUS = WM_CAP_START + 3 Const WM_CAP_SET_CALLBACK_YIELD = WM_CAP_START + 4 Const WM_CAP_SET_CALLBACK_FRAME = WM_CAP_START + 5 Const WM_CAP_SET_CALLBACK_VIDEOSTREAM = WM_CAP_START + 6 Const WM_CAP_SET_CALLBACK_WAVESTREAM = WM_CAP_START + 7 Const WM_CAP_GET_USER_DATA = WM_CAP_START + 8 Const WM_CAP_SET_USER_DATA = WM_CAP_START + 9 Const WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10 Const WM_CAP_DRIVER_DISCONNECT = WM_CAP_START + 11 Const WM_CAP_DRIVER_GET_NAME = WM_CAP_START + 12 Const WM_CAP_DRIVER_GET_VERSION = WM_CAP_START + 13 Const WM_CAP_DRIVER_GET_CAPS = WM_CAP_START + 14 Const WM_CAP_FILE_SET_CAPTURE_FILE = WM_CAP_START + 20 Const WM_CAP_FILE_GET_CAPTURE_FILE = WM_CAP_START + 21 Const WM_CAP_FILE_ALLOCATE = WM_CAP_START + 22 Const WM_CAP_FILE_SAVEAS = WM_CAP_START + 23 Const WM_CAP_FILE_SET_INFOCHUNK = WM_CAP_START + 24 Const WM_CAP_FILE_SAVEDIB = WM_CAP_START + 25 Const WM_CAP_EDIT_COPY = WM_CAP_START + 30 Const WM_CAP_SET_AUDIOFORMAT = WM_CAP_START + 35 Const WM_CAP_GET_AUDIOFORMAT = WM_CAP_START + 36 Const WM_CAP_DLG_VIDEOFORMAT = WM_CAP_START + 41 Const WM_CAP_DLG_VIDEOSOURCE = WM_CAP_START + 42 Const WM_CAP_DLG_VIDEODISPLAY = WM_CAP_START + 43 Const WM_CAP_GET_VIDEOFORMAT = WM_CAP_START + 44 Const WM_CAP_SET_VIDEOFORMAT = WM_CAP_START + 45 Const WM_CAP_DLG_VIDEOCOMPRESSION = WM_CAP_START + 46 Const WM_CAP_SET_PREVIEW = WM_CAP_START + 50 Const WM_CAP_SET_OVERLAY = WM_CAP_START + 51 Const WM_CAP_SET_PREVIEWRATE = WM_CAP_START + 52 Const WM_CAP_SET_SCALE = WM_CAP_START + 53 Const WM_CAP_GET_STATUS = WM_CAP_START + 54 Const WM_CAP_SET_SCROLL = WM_CAP_START + 55 Const WM_CAP_GRAB_FRAME = WM_CAP_START + 60 Const WM_CAP_GRAB_FRAME_NOSTOP = WM_CAP_START + 61 Const WM_CAP_SEQUENCE = WM_CAP_START + 62 Const WM_CAP_SEQUENCE_NOFILE = WM_CAP_START + 63 Const WM_CAP_SET_SEQUENCE_SETUP = WM_CAP_START + 64 Const WM_CAP_GET_SEQUENCE_SETUP = WM_CAP_START + 65 Const WM_CAP_SET_MCI_DEVICE = WM_CAP_START + 66 Const WM_CAP_GET_MCI_DEVICE = WM_CAP_START + 67 Const WM_CAP_STOP = WM_CAP_START + 68 Const WM_CAP_ABORT = WM_CAP_START + 69 Const WM_CAP_SINGLE_FRAME_OPEN = WM_CAP_START + 70 Const WM_CAP_SINGLE_FRAME_CLOSE = WM_CAP_START + 71 Const WM_CAP_SINGLE_FRAME = WM_CAP_START + 72 Const WM_CAP_PAL_OPEN = WM_CAP_START + 80 Const WM_CAP_PAL_SAVE = WM_CAP_START + 81 Const WM_CAP_PAL_PASTE = WM_CAP_START + 82 Const WM_CAP_PAL_AUTOCREATE = WM_CAP_START + 83 Const WM_CAP_PAL_MANUALCREATE = WM_CAP_START + 84 Global hwndHandle% hwndHandle= findWindow_("Blitz Runtime Class", "Test") hwnd=avi_cap_("Test", WS_CHILD + WS_VISIBLE, 120, 30, 200,200, hwndHandle, 0) sendmessage_(hwnd, WM_CAP_DRIVER_CONNECT, 0 , 0) sendmessage_(hwnd, WM_CAP_SET_SCALE , 1 , 0) While Not KeyHit(1) If KeyDown(48) Then sendmessage_(hwnd, WM_CAP_SET_PREVIEW, 0, 0) sendmessage_(hwnd, WM_CAP_DRIVER_DISCONNECT, "Test", 0) EndIf RenderWorld sendmessage_(hwnd,WM_CAP_GRAB_FRAME, 0 , 0) sendmessage_(hwnd, WM_CAP_EDIT_COPY, 0 , 0) Flip Wend End |
||
- Zuletzt bearbeitet von super_castle am Di, März 21, 2006 22:25, insgesamt 4-mal bearbeitet
![]() |
Plasma(alt)Betreff: jo |
![]() Antworten mit Zitat ![]() |
---|---|---|
supercastle gute idee ohne dll
ansonsten gugst du http://www.blitzbasic.com/Comm...433#608796 mfg |
||
DIV is dead ! |
super_castle |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hallo, ich bin mit meinem programm höchst zufrieden.
klein und sehr effektiv. die anderen mir bekannten captureprogramme sind nicht strukturiert durchdacht und zu aufgebläht. mfg castle |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group