Notifications
Clear all

Open cv and the jetson nano pi cam

26 Posts
5 Users
5 Likes
3,414 Views
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1018
 

@robo-pi

I'm just a little behind on that one as I just got to the building of the servo mechanism when I got side tracked.  Just not enough hours in the day, or enough hands either!  ? 

SteveG


   
Duce robot reacted
ReplyQuote
Duce robot
(@duce-robot)
Member
Joined: 5 years ago
Posts: 672
Topic starter  

@robo-pi

Thanks I must have gone code blind when I'm gazing right at the problem and can't see it a lot like when I look in the mirror lol and now it says I didn't define (dspW) in the string this isn't like the cut and dried arduino way #define  what is define in python? Thanks .?? 


   
ReplyQuote
Duce robot
(@duce-robot)
Member
Joined: 5 years ago
Posts: 672
Topic starter  

@byron

Thanks I'm going to try it fingers crossed ................Boom just kidding I didn't try it yet.but I'm going to thanks??


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1112
 

@duce-robot

in the horrible long string some variables are concatenated in.  The variable dspW has not been defined so it knows not what to do.  This is probably because the string in the lesson 11 notes is shown as dispW ? .  

I think this is code from the old and now unsupported python 2.  This string could look far mor readable in the latest python 3.7 using f strings.  Python 2 is fading fast away


   
ReplyQuote
Duce robot
(@duce-robot)
Member
Joined: 5 years ago
Posts: 672
Topic starter  

@byron

I actually ended up with 4.1.1 in open CV and 3.6.8 in the terminal  by using / will this make it work? Seems like if I can't get the camera working the nano turns into a no no lol. I'm new to python so it might take me some time.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1112
 

@duce-robot

I dont know anything about opencv, although it is on my to-do list.   Just make sure you are using the opencv version that is compatible with the python version you are using.  (no idea what you mean by 3.6.8 in the terminal - though I could presume you mean you are using python version 3.6.8).   As with any programming language it would be worth taking a short time out to get up to speed with the basics. I suggest a few hours watching corey schafter videos will make you feel much more comfortable with python. watch 

And its \  not / ? 


   
ReplyQuote
Duce robot
(@duce-robot)
Member
Joined: 5 years ago
Posts: 672
Topic starter  

@byron

It doesn't work with either one disp or dsp I tried both this is what it says

1582335901757 2132269466

 


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@duce-robot

That's a terrible camera image 🙂

Have you tried the: <print screen> keyboard button, or even <ALT-Print Screen button> for active window capture?

Cheers!


   
ReplyQuote
Duce robot
(@duce-robot)
Member
Joined: 5 years ago
Posts: 672
Topic starter  

@byron

I would have had to learn the basics to get to this point !and yes it means 3.6.8 in the terminal and 4.1.1 in  Open cv python versions but this updated version does not install 3.3.1 using the method in the tutorials but its OK it doesn't matter I got a strait answer on hackster io .


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1112
 

@duce-robo - good the hear you have got the answers you were looking for.  As openCV is on my list I had a quick peruse at some of  P Mc's video's.  As AI is not an interest to me I wont be pursuing his tutorial to get into openCV and I found I did not get along with his style of presentation.  Each to his own of course but it highlights to me just how good Bill of dronebots is. And from P Mc's video in this series that introduces python I can confirm that he is using python version 3.6.8.  I see from your screenshot you appear to be using PlatformIO as your IDE then don't forget the debugging and REPL facilities to assist when you hit those error messages.   Have fun. 


   
ReplyQuote
Duce robot
(@duce-robot)
Member
Joined: 5 years ago
Posts: 672
Topic starter  

@byron

Yes open CV is something I think I'm going to just have to nibble on slowly I tend to dive in too fast and I do thank everyone for their help .I'm not much of a code writer I think even when I get a better understanding of python and open CV I still won't be able to come up with any of my own sketches.but who knows maybe??


   
ReplyQuote
Page 2 / 2