It is currently Fri Jan 19, 2018 12:59 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 788 posts ]  Go to page Previous  1 ... 49, 50, 51, 52, 53
Author Message
 Post subject: Re: PureBasic Interface to OpenCV
PostPosted: Fri Jan 12, 2018 8:37 am 
Offline
New User
New User

Joined: Fri Jan 12, 2018 8:26 am
Posts: 4
Hello JHPJHP,
First of all, thanks a lot for your work, i'm using it to take photo with an integrated webcam of a HP Tablet but i have a problem to change the resolution.
The webcam is capable of streming in 1080p and can take 5mp photo (rear cam OV5670, wich works great with windows camera app) but whenever I try a resolution above 1280x960 it falls back to it.
The example "pb_webcam_resolution.pb" actually shows that the max resolution is 1280x960 but the windows camera app can take photo above that.
I tried to set FOURCC with MJPG or YUY2 but it didn't help.
Have you an idea?

Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Interface to OpenCV
PostPosted: Fri Jan 12, 2018 1:40 pm 
Offline
Enthusiast
Enthusiast

Joined: Sun Jun 15, 2008 3:13 am
Posts: 223
Location: Russia
Hi JHPJHP!
Sorry, I will try to answer the question posed to you.

Hi, mcederavic.
Your OV5670 have 2592*1944 image size (max).

So, in the exmple pb_webcam_resolution.pb try to change
Code:
Procedure ResolutionList(MaxWidth = 1280, nInterval = 100)

to
Code:
Procedure ResolutionList(MaxWidth = 2592, nInterval = 162)


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Interface to OpenCV
PostPosted: Fri Jan 12, 2018 2:05 pm 
Offline
New User
New User

Joined: Fri Jan 12, 2018 8:26 am
Posts: 4
Hello AAT,
Thanks for your reply, unfortunately it did not change. Available resolutions are still 640x360 or 1280x960


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Interface to OpenCV
PostPosted: Fri Jan 12, 2018 3:06 pm 
Offline
Enthusiast
Enthusiast

Joined: Sun Jun 15, 2008 3:13 am
Posts: 223
Location: Russia
mcederavic, specify the exact name of your HP Tablet, please.

I think, your tablet have two cams and you trying to set high resolution to cam with low resolution, forexample, to front cam.
Add one more change to example: change the cam number
Code:
  *capture = cvCreateCameraCapture(#CV_CAP_ANY)

to
Code:
  *capture = cvCreateCameraCapture(1)

or other number, not 0


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Interface to OpenCV
PostPosted: Fri Jan 12, 2018 6:14 pm 
Offline
New User
New User

Joined: Fri Jan 12, 2018 8:26 am
Posts: 4
Yes I took the rear cam (and I see the rendered preview in the window)
The tablet is a HP Notebook x2 - 10-p028nf

I tried to capture in 1920x1080 with VLC but it fail to initialize too... I'm wondering if it is a hardware / driver lock


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Interface to OpenCV
PostPosted: Fri Jan 12, 2018 8:28 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1380
Hi mcederavic,

Try the following: ... OpenCV access webcam maximum resolution
- set the resolution to something larger (e.g. 3000x3000)
stackoverflow wrote:
I got it to work, so this post is for others experiencing the same problem:

I am running on the Logitech C270 as well. For some reason it would only show 640x480 even though the webcam supports 1280x720. Same issue persists with the built-in webcam in my laptop.

If I set it to 800x600 in the code it shows 640x480. However, if I set it to 1024x768 it becomes 800x600. And if I set it to something silly like 2000x2000 it becomes 1280x720.

This is in C++ on OpenCV 3.0, but perhaps it applies to Python as well.

If you are live streaming from your tablet, have you looked at the FFMPEG / RTSP example.

You may also want to try a different version of the download: PureBasic Interface to OpenCV 2.4.13.3 vs PureBasic Interface to OpenCV 3.3.
- OpenCV 3.3 was built using the World option (single DLL / LIB)

_________________
ImageMy PureBasic Stuff


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Interface to OpenCV
PostPosted: Sat Jan 13, 2018 3:46 am 
Offline
Enthusiast
Enthusiast

Joined: Sun Jun 15, 2008 3:13 am
Posts: 223
Location: Russia
mcederavic, read this topic viewtopic.php?f=12&t=69059
Download opencv libs with reordered mediaSubtypes from http://rgho.st/84FfzcJrp
Replace the opencv libraries from the JHPJHP package with downloaded ones and try your code again.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Interface to OpenCV
PostPosted: Mon Jan 15, 2018 10:34 am 
Offline
New User
New User

Joined: Fri Jan 12, 2018 8:26 am
Posts: 4
Hello AAT / JHPJHP

I tried both OpenCV 2.4.13 and 3.3 and got same results. I also tried all known resolution and iterating up to 8192x8192 one by one but the max alowed is always 1288x960 event with the reordered lib.
I will try with an external usb cam.
Thanks for your help!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 788 posts ]  Go to page Previous  1 ... 49, 50, 51, 52, 53

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 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

Search for:
Jump to:  
cron

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye