fbvideoclass (Windows 32/64-bit)
-
- Posts: 649
- Joined: Jun 09, 2005 0:08
Re: fbvideoclass (Windows 32/64-bit)
@Joshy thanks, I've installed the 32 bit compiler now and im_capture is working on that, both streams and not too much lag but I'm not sure how my project will work with even a little lag, might just end up with motion sickness or something.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: fbvideoclass (Windows 32/64-bit)
I downloaded the mingw 32/64-bit im dll's from here: https://sourceforge.net/projects/imtool ... s/Dynamic/
but there isn't any 32/64-bit im_capture.dll anymore !
I will google for it !
Joshy
but there isn't any 32/64-bit im_capture.dll anymore !
I will google for it !
Joshy
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: fbvideoclass (Windows 32/64-bit)
here is the 64-bit version of im_capture.dll included in: https://sourceforge.net/projects/imtool ... p/download
But the 32-bit assembler stuff must be changed !
Joshy
But the 32-bit assembler stuff must be changed !
Joshy
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: fbvideoclass (Windows 32/64-bit)
I don't get it on Windows 64-bit I downloaded ESCAPI V3.0 (32/64-bit) https://sol.gfxile.net/escapi/index.html also.
The device manager shows the connected USB cameras and the Windows 10 camera app (64-bit) works OK.
im_capture.dll 64-bit and escapi.dll 64-bit enumerate the device names of my cameras but opening the devices fails !
Sorry I don't know why :-(
Joshy
The device manager shows the connected USB cameras and the Windows 10 camera app (64-bit) works OK.
im_capture.dll 64-bit and escapi.dll 64-bit enumerate the device names of my cameras but opening the devices fails !
Sorry I don't know why :-(
Joshy
-
- Posts: 649
- Joined: Jun 09, 2005 0:08
Re: fbvideoclass (Windows 32/64-bit)
Thanks, and no worries, I can do it in 32 bit, it's just a test to see what sort of results I can get.
Got some coloured LEDs ordered, but now wondering if IR might be better, tried out an LED light and it results in bad reflection off screen, and with an IR pass filter it would be easier to track.
Got some coloured LEDs ordered, but now wondering if IR might be better, tried out an LED light and it results in bad reflection off screen, and with an IR pass filter it would be easier to track.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: fbvideoclass (Windows 32/64-bit)
I don't understand the differences between Video capturing 32-bit vs 64-bit on Windows 10 64-bit !
My posted Video Class is "normal" windows API code and should work with both FreeBASIC 32 and 64-bit.
I found out the VLC player 64-bit list my USB cameras also but can't open or use it !
Same with "im_cpture.dll" (64-bit) and "escapi.dll" (64-bit) and my FreeBASIC video class (64-bit).
Normaly I never give up and solve any coding problem's but in this windows 10 64-bit case I don't see the problem.
I tryed to open the devices as admin also without success but again the windows 10 video app works with my devices/drivers !
May be there are a none documented "trick/flag" to open old 32-bit devices in 64-bit mode !
Joshy
My posted Video Class is "normal" windows API code and should work with both FreeBASIC 32 and 64-bit.
I found out the VLC player 64-bit list my USB cameras also but can't open or use it !
Same with "im_cpture.dll" (64-bit) and "escapi.dll" (64-bit) and my FreeBASIC video class (64-bit).
Normaly I never give up and solve any coding problem's but in this windows 10 64-bit case I don't see the problem.
I tryed to open the devices as admin also without success but again the windows 10 video app works with my devices/drivers !
May be there are a none documented "trick/flag" to open old 32-bit devices in 64-bit mode !
Joshy
-
- Posts: 649
- Joined: Jun 09, 2005 0:08
Re: fbvideoclass (Windows 32/64-bit)
I have something kind of working now (in 32bit) and the effect is quite good even though its all pretty rough so far. The lag to the screen is there but it's not too bad but there seems to be a slight lag between the cameras, so when triangulating head position if I move my head to one side it thinks I'm also moving forward and if I move my head to the other side it thinks I'm also moving backwards.
Do you know if I could have 2 threads running to capture from each camera and trigger them simultaneously? (I don't know much about multi threading or video devices)
Do you know if I could have 2 threads running to capture from each camera and trigger them simultaneously? (I don't know much about multi threading or video devices)
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: fbvideoclass (Windows 32/64-bit)
No once here gave me a hint !
To allow FreeBASIC or VLC to access all my capture devices
I must enable in the Windows 10 data security settings
camera access for "other apps" thats all ;-)
With other words camera access for the Windows OS camera app was enabled by default !
Joshy
edit: New upload see first post !
To allow FreeBASIC or VLC to access all my capture devices
I must enable in the Windows 10 data security settings
camera access for "other apps" thats all ;-)
With other words camera access for the Windows OS camera app was enabled by default !
Joshy
edit: New upload see first post !
Re: fbvideoclass (Windows 32/64-bit)
I fixed the vertical bars bug in VUV2 converter. Joshy forgot to assign the first chroma channel. Did some minor optimizations.
I have a 1080p webcam. How do I set it for higher resolutions?
This fbvideoclass would be a very useful for many unique projects. Will it be worked on for a user friendly interface? Windows API is alien to me. I can't help there.
Code: Select all
Function ConvertYUY2(Byval pHeader As PVIDEOHDR) As Any Ptr
'YUY2 vertical bars bug fixed by ShawnLG.
Dim As Integer i,n,t
Dim As Integer nPixels=_VideoFormat.bmiHeader.biWidth*_VideoFormat.bmiHeader.biHeight
Dim As ulong col
Dim As Single y,y2,u,v
Dim As Single rr,gg,bb
Dim As Ubyte r,g,b
Dim As Ubyte Ptr src = pHeader->lpData
Dim As ulong Ptr des = cptr(ulong Ptr,_pImage)
des+=8
nPixels shr=1
For n=0 To nPixels-1
Y = (Csng(src[i+0])-16) * 1.164383
U = Csng(src[i+1])-128
V = Csng(src[i+3])-128
y2 = (Csng(src[i+2])-16) * 1.164383
rr = Y + 1.596027 * V
gg = Y - 0.391762 * U - 0.812968 * V
bb = Y + 2.017232 * U
If rr<0 Then
r=0
Elseif rr>255 Then
r=255
Else
r=cubyte(rr)
End If
If gg<0 Then
g=0
Elseif gg>255 Then
g=255
Else
g=cubyte(gg)
End If
If bb<0 Then
b=0
Elseif bb>255 Then
b=255
Else
b=cubyte(bb)
End If
des[t]=RGB(r,g,b)
' second pixel
t+=1
rr = Y2 + 1.596027 * V
gg = Y2 - 0.391762 * U - 0.812968 * V
bb = Y2 + 2.017232 * U
If rr<0 Then
r=0
Elseif rr>255 Then
r=255
Else
r=cubyte(rr)
End If
If gg<0 Then
g=0
Elseif gg>255 Then
g=255
Else
g=cubyte(gg)
End If
If bb<0 Then
b=0
Elseif bb>255 Then
b=255
Else
b=cubyte(bb)
End If
des[t]=RGB(r,g,b)
i+=4
t+=1
Next n
Return _pImage
End Function
This fbvideoclass would be a very useful for many unique projects. Will it be worked on for a user friendly interface? Windows API is alien to me. I can't help there.