Register    Login    Forum    Search    FAQ

Board index » Software » Windows




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post Posted: Thu Apr 13, 2017 10:56 pm 
Offline

Joined: Thu Apr 13, 2017 10:30 pm
Posts: 6
Hello,

I own a ASI178MC camera, drivers installed ( directshow dirver had some issues on win10 x64 but i think it works ), got it working fine on SharpCap, Firecapture. I also got a background as a VB.net+SQL programmer so i'm pretty lame on 'real' programming, libraries, C++, dependencies, etc.

I've managed to use OpenCV (opencv_ffmpeg310.dll) on some basic object tracking C++ programs using my webcam. I need much higher FPS so i want to use 178MC instead of the webcam in the existing working program.

I'm not really sure what system variables are needed, what dependencies to add in Linker/Input/Additional D, or if some ASI dll's must be registerd/copied somewhere. What to include in the C source file #include <ASICamera.h>?
I presume that there are a few simple,logical steps, so please guide me to solve this.

Thank you.


Top 
 Profile  
Reply with quote  
 Post Posted: Thu Apr 13, 2017 11:24 pm 
Offline

Joined: Thu Apr 13, 2017 10:30 pm
Posts: 6
What I did so far:

Enviroment variable PATH C:\ASI SDK\lib\x86

Project properties - Linker - Input - Additional Dependencies asicamera.lib

Source.cpp #include <ASICamera.h>


Error: Severity Code Description Project File Line Suppression State Error LNK1104 cannot open file 'ASICamera.lib


Top 
 Profile  
Reply with quote  
 Post Posted: Fri Apr 14, 2017 2:50 am 
Offline
Site Admin

Joined: Fri Jul 25, 2014 2:43 am
Posts: 198
Hi, you can refer to the demo project contained in the SDK package.
cannot open file 'ASICamera.lib : it's because the linker can't find the library, you should edit Additional Library path and add the path of ASICamera.lib or add the path in Additional Dependencies for asicamera.lib, say C:\ASI SDK\lib\x86\ASICamera.lib

_________________
ZWO software engineer
Location:lon=120.6 lat=31.3
SuZhou China


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Apr 30, 2017 10:44 pm 
Offline

Joined: Thu Apr 13, 2017 10:30 pm
Posts: 6
Hello Yang,

Thank you, the demo project runs fine, but in black and white.
How can i switch from b&w to full color? And the other issue: is there a way to bypass the 60 FPS limit?

I've also tried : IMG_RAW8 IMG_RGB24
setImageFormat(width, height, 1, IMG_RAW16)

Tried different IPL_DEPTH
pRgb = cvCreateImage(cvSize(getWidth(), getHeight()), IPL_DEPTH_16U, 1);

getImageData((BYTE*)pRgb->imageData, pRgb->imageSize, 20);

Thank you.


Attachments:
Camera test.jpg
Camera test.jpg [ 316.37 KiB | Viewed 880 times ]
Top 
 Profile  
Reply with quote  
 Post Posted: Tue May 02, 2017 1:52 am 
Offline
Site Admin

Joined: Fri Jul 25, 2014 2:43 am
Posts: 198
>How can i switch from b&w to full color?

setImageFormat(width, height, 1, IMG_RGB24)
pRgb = cvCreateImage(cvSize(getWidth(), getHeight()), IPL_DEPTH_8U, 3);
getImageData((BYTE*)pRgb->imageData, getWidth()*getHeight()*3, 20);

>And the other issue: is there a way to bypass the 60 FPS limit?
what do you mean, the max FPS of camera?

_________________
ZWO software engineer
Location:lon=120.6 lat=31.3
SuZhou China


Top 
 Profile  
Reply with quote  
 Post Posted: Tue May 02, 2017 1:42 pm 
Offline

Joined: Thu Apr 13, 2017 10:30 pm
Posts: 6
Thank you, i've got colors now. :)

In the output window of the demo program i get maximum 65 FPS (and loads of dropped frames), even with 5ms exposure setValue(CONTROL_EXPOSURE, 5 * 1000, false); Might be some OpenCV limitaton. Can't figure it out yet...

On SharpCap i got over 470 FPS.


Attachments:
65 fps.jpg
65 fps.jpg [ 292.16 KiB | Viewed 857 times ]
Top 
 Profile  
Reply with quote  
 Post Posted: Wed Jul 26, 2017 12:00 am 
Offline

Joined: Thu Apr 13, 2017 10:30 pm
Posts: 6
char c = cvWaitKey(1); // This causes the low frame rate ~65 FPS
switch (c)
{
case 27:
goto END;
}

If anyone interested this is a workaround for ~220 FPS:

Mat origImage, threshedImage;
cvNamedWindow("orig");
//..............................
int frameCounter = 0;
while (1)
{
origImage = cvarrToMat(pRgb);
if (++frameCounter % 10 == 0) {
imshow("orig", origImage);
waitKey(1);
}
}


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 7 posts ] 

Board index » Software » Windows


Who is online

Users browsing this forum: No registered users and 2 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: