How easy is it to visual track an object? PSVR Headset Tracker with the OpenMV-H7 Camera!

A Single Color Blop Tracking Scripts Experiment

I was experimenting with a single color blop tracking script that can track objects of the same color after choosing blue to track and running the scripts. Unfortunately, the serial monitor was only displaying frame rates and no useful information on where the objects were detected. I was looking for an example like the ones shown on OpenCV and Weebit websites.

So, I copied the shown codes and uploaded them in order to find out that it can affect tracking blue objects but sadly the serial monitor was only displaying the frame rates and no useful information on where the objects were detected what I was looking for was basically the example scripts shown on the open and we websites so I copied the shown codes and uploaded it in order to find out that it does track a few too many blue objects but after adding a couple more sensor settings along with a pixel and area threshold to the scripts it seems like we are finally getting some decent results and best of all this santa exposition of the checked objects can be seen on the serial monitor which means we can easily use it now if the object is on the left side this value will be below 160 which is half of the x resolution of 320 and if the object is on the right side this value will be above 160 so depending on whether the value is above or below 160 year we can rotate the camera with a motor left or rights in order to Center the tracked objects.

This brings me into the additional components we need for this project. I'm using a NEMA 17 stepper motor in combination with a TMC A21 300 stepper motor driver so I added mail had asked to the driver PCB a shorted the SPI solar pets and hooked up the power and motor wires to the boards according to this simple schematic.

In the schematic, you can also see that the Java bot is directly connected to the camera module. The reason is that the microprocessor does offer some inputs/outputs pins along with Weber twelve bits ADC and DAC lots of timers and interrupt pins along with of course some communication protocols like SPI I-square SIA CAN or UART.

The driver IC comes with a step-direction interface which means the motor goes one step when a voltage change occurs at this step in also if the direction pin is low the motor returns one way and if the direction pin is higher it turns the other way. This way you can pretty easily use a simple output pin for the Direction pin and hopefully a pwm pin will be suitable frequency R for the step in.

However, as I was trying to configure the timers with the given examples I was only running into problems and was never able to successfully create a proper PWM signal so as a crude solution I firstly set the direction pins as outputs and then alternated between the high and low state for the pwm pin which created a screwed low frequency PWM signal.

Before finding out whether that signal is suitable for our PS VR headset tracking tasks though I had to create these two objects in one 3D design after 3D printing them with my Prusa i3 Mach 3. I hammered the stepper motor shaft into the bigger 3D print which will be the platform for all the cameras.

Next, I drilled two or three millimeter holes through my PS VR camera holder which I 3D printed years ago and whose files I can no longer find on Thingiverse. I secured it to the platform with M3 bolts and nuts afterwards. Then I jewelled the mounting holes for the camera module through the smaller 3D prints hot-glued it's in front of the moving platform.

Finally, I used EM 2.5 bolts in order to secure the camera to its after then completing all the wiring and powering everything up it was finally time for the first test run and as you can see the camera detects my blue object successfully and then moves the platform until the object is centered in the middle wonderful that means it was time for me to build up this example in my living room.

As you would expect, the camera tracks the PS VR headset said successful year and follows all my movements without a problem which means I will never have to get up again and move the PlayStation camera up by myself awesome.

WEBVTTKind: captionsLanguage: enhi there I have to say that I do enjoy my PlayStation VR when it comes to playing advanced video games like for example Tetris now jokes aside I also use it to play some truly immersive games which require quite a bit of moving around and there's the problem you see the PlayStation camera attracts the headsets along with my move controllers and of course you want to be in its center of view and not leave it but that can be difficult sometimes so I started thinking whether it would make sense to create a small system that rotates the PlayStation camera left or right in order to let my headset stay in the center and that was the moment when the company elector reached out to me and suggested that I could use the open mvh 7 camera for such a projects so in this video let's find out what this camera is capable of learn some simple Python programming so that it can track a specific color and finally let's combine the camera with 3d printing and a stepper motor to create a crude but functional piece VR headset tracker let's get started this video is sponsored by elector which runs elector calm and also publishes the electro magazine I read this magazine regularly to learn about engineering tutorials and product reviews and this mum electro is offering my viewers a special 75 percent discount on a one-year electro called membership which includes both the print and digital editions of the electromagnet many more benefits and if you got the electro green membership through the last sponsored video of mine then you can also upgrade with this offer so have a look in the video description and join Electro's global community today first off let's learn how to use the camera for that I visited the open MV website in order to download the open MV R idea after installing its I simply connected the camera to my computer through a micro USB cable and started the software the first thing I noticed is that the given example code uses Python which is a pretty simple to learn a programming language if you're already familiar with C which is basically what you use for Arduino programming but there are also tons of Python tutorials available on the internets which helped me out quite a bit while creating this projects nevertheless though after connecting to the camera and running the example scripts we can see a blurry image of my face next to the codes to fix this problem all I had to do was to properly focus the camera lens and just like that we got ourselves a webcam but that is of course not the only thing the camera can do through the help of the used ARM Cortex 7 micro processor the module also offers machine vision algorithms which means we can track the position of faces eyes objects or colors of course we could also take photos and record videos and save them through the help of the included micro SD card slots but that is too boring for now instead let's open up the face detection example scripts which is a bit more complicated than the webcam script we started with and let's run it as you can see the software is pretty accurately detecting the position of my face and by using the face eye detection scripts the camera can like the name implies also check the position of my eyes but of course for my psvr example those two tracking options do not work since my face is covered luckily though the psvr had said lights are blue while playing and the controllers do not interfere with that color scheme which means we need to track the color blue now the example scripts come with a single color blop tracking scripts which after choosing the color blue to track and running the scripts did show that it can affect track blue objects but sadly the serial monitor was only displaying the frame rates and no useful information on where the objects were detected what I was looking for was basically the example scripts shown on the open and we websites so I copied the shown codes and uploaded it in order to find out that it does track a few too many blue objects but after adding a couple more sensor settings along with a pixel and area threshold to the scripts it seems like we are finally getting some decent results and best of all this santa exposition of the checked objects can be seen on the serial monitor which means we can easily use it now if the object is on the left side this value will be below 160 which is half of the x resolution of 320 and if the object is on the right side this value will be above 160 so depending on whether the value is above or below 160 year we can rotate the camera with a motor left or rights in order to Center the tracked objects which brings me into the additional components we need for this project I'm using this NEMA 17 stepper motor in combination with a TMC a21 300 stepper motor driver so I added mail had asked to the driver PCB a shorted the SPI solar pets and hooked up the power and motor wires to the boards according to this simple schematic in the schematic you can also see that the Java bots is directly connected to the camera module the reason is that the microprocessor does offer some inputs output pins along Weber twelve bits ADC and DAC a lots of timers and interrupt pins along with of course some communication protocols like spi i-square SIA can or UART now the driver ICU comes with a step Direction interface which means the motor goes one step when a voltage change occurs at this step in also if the direction pin is low the motor returns one way and if the direction pin is higher it turns the other way this way you can pretty easily use a simple output pin for the Direction pin and hopefully a pwm pin will be suitable frequency R for the step in but sadly as I was trying to configure the timers with the given examples I was only running into problems and was never able to successfully create a proper PWM signal so as a crude solution I firstly set the to use pins as outputs and then alternated between the high and low state for the pwm pin which created the screwed low frequency PWM signal before finding out whether that signal is suitable for our PS VR headset tracking tasks though I had to create these two objects in one to 3d design after 3d printing them with my Prusa i3 mach 3 i hammered the stepper motor shaft into the bigger 3d print which will be the platform for all the cameras so next I'd will two or three millimeter holes through my PS VR camera holder which I 3d printed years ago and whose files I can no longer find on Thingiverse and secured it to the platform with m3 bolts and nuts afterwards a jewelled the mounting holes for the camera module through the smaller 3d prints hot-glued it's in front of the moving platform and finally used em 2.5 bolts in order to secure the camera to its after then completing all the wiring and powering everything up it was finally time for the first test run and as you can see the camera detects my blue object successfully and then moves the platform until the object is centered in the middle wonderful that means it was time for me to build up this example in my living room and as you would expect the camera tracks the PS BR had said successful year and follows all my movements without a problem which means I will never have to get up again and move the PlayStation camera up by myself awesome now of course this system is just a proof of concepts because I highly doubt that the constant movement of the PlayStation camera is recommended and this system also completely freaks out if there's more than one visible blue objects but I still hope that you enjoyed this small experiment and maybe it gave you some ideas for your own visual tracking projects as always thanks for watching don't forget to Like share subscribe and hitting the notification below stay creative and I will see you next timehi there I have to say that I do enjoy my PlayStation VR when it comes to playing advanced video games like for example Tetris now jokes aside I also use it to play some truly immersive games which require quite a bit of moving around and there's the problem you see the PlayStation camera attracts the headsets along with my move controllers and of course you want to be in its center of view and not leave it but that can be difficult sometimes so I started thinking whether it would make sense to create a small system that rotates the PlayStation camera left or right in order to let my headset stay in the center and that was the moment when the company elector reached out to me and suggested that I could use the open mvh 7 camera for such a projects so in this video let's find out what this camera is capable of learn some simple Python programming so that it can track a specific color and finally let's combine the camera with 3d printing and a stepper motor to create a crude but functional piece VR headset tracker let's get started this video is sponsored by elector which runs elector calm and also publishes the electro magazine I read this magazine regularly to learn about engineering tutorials and product reviews and this mum electro is offering my viewers a special 75 percent discount on a one-year electro called membership which includes both the print and digital editions of the electromagnet many more benefits and if you got the electro green membership through the last sponsored video of mine then you can also upgrade with this offer so have a look in the video description and join Electro's global community today first off let's learn how to use the camera for that I visited the open MV website in order to download the open MV R idea after installing its I simply connected the camera to my computer through a micro USB cable and started the software the first thing I noticed is that the given example code uses Python which is a pretty simple to learn a programming language if you're already familiar with C which is basically what you use for Arduino programming but there are also tons of Python tutorials available on the internets which helped me out quite a bit while creating this projects nevertheless though after connecting to the camera and running the example scripts we can see a blurry image of my face next to the codes to fix this problem all I had to do was to properly focus the camera lens and just like that we got ourselves a webcam but that is of course not the only thing the camera can do through the help of the used ARM Cortex 7 micro processor the module also offers machine vision algorithms which means we can track the position of faces eyes objects or colors of course we could also take photos and record videos and save them through the help of the included micro SD card slots but that is too boring for now instead let's open up the face detection example scripts which is a bit more complicated than the webcam script we started with and let's run it as you can see the software is pretty accurately detecting the position of my face and by using the face eye detection scripts the camera can like the name implies also check the position of my eyes but of course for my psvr example those two tracking options do not work since my face is covered luckily though the psvr had said lights are blue while playing and the controllers do not interfere with that color scheme which means we need to track the color blue now the example scripts come with a single color blop tracking scripts which after choosing the color blue to track and running the scripts did show that it can affect track blue objects but sadly the serial monitor was only displaying the frame rates and no useful information on where the objects were detected what I was looking for was basically the example scripts shown on the open and we websites so I copied the shown codes and uploaded it in order to find out that it does track a few too many blue objects but after adding a couple more sensor settings along with a pixel and area threshold to the scripts it seems like we are finally getting some decent results and best of all this santa exposition of the checked objects can be seen on the serial monitor which means we can easily use it now if the object is on the left side this value will be below 160 which is half of the x resolution of 320 and if the object is on the right side this value will be above 160 so depending on whether the value is above or below 160 year we can rotate the camera with a motor left or rights in order to Center the tracked objects which brings me into the additional components we need for this project I'm using this NEMA 17 stepper motor in combination with a TMC a21 300 stepper motor driver so I added mail had asked to the driver PCB a shorted the SPI solar pets and hooked up the power and motor wires to the boards according to this simple schematic in the schematic you can also see that the Java bots is directly connected to the camera module the reason is that the microprocessor does offer some inputs output pins along Weber twelve bits ADC and DAC a lots of timers and interrupt pins along with of course some communication protocols like spi i-square SIA can or UART now the driver ICU comes with a step Direction interface which means the motor goes one step when a voltage change occurs at this step in also if the direction pin is low the motor returns one way and if the direction pin is higher it turns the other way this way you can pretty easily use a simple output pin for the Direction pin and hopefully a pwm pin will be suitable frequency R for the step in but sadly as I was trying to configure the timers with the given examples I was only running into problems and was never able to successfully create a proper PWM signal so as a crude solution I firstly set the to use pins as outputs and then alternated between the high and low state for the pwm pin which created the screwed low frequency PWM signal before finding out whether that signal is suitable for our PS VR headset tracking tasks though I had to create these two objects in one to 3d design after 3d printing them with my Prusa i3 mach 3 i hammered the stepper motor shaft into the bigger 3d print which will be the platform for all the cameras so next I'd will two or three millimeter holes through my PS VR camera holder which I 3d printed years ago and whose files I can no longer find on Thingiverse and secured it to the platform with m3 bolts and nuts afterwards a jewelled the mounting holes for the camera module through the smaller 3d prints hot-glued it's in front of the moving platform and finally used em 2.5 bolts in order to secure the camera to its after then completing all the wiring and powering everything up it was finally time for the first test run and as you can see the camera detects my blue object successfully and then moves the platform until the object is centered in the middle wonderful that means it was time for me to build up this example in my living room and as you would expect the camera tracks the PS BR had said successful year and follows all my movements without a problem which means I will never have to get up again and move the PlayStation camera up by myself awesome now of course this system is just a proof of concepts because I highly doubt that the constant movement of the PlayStation camera is recommended and this system also completely freaks out if there's more than one visible blue objects but I still hope that you enjoyed this small experiment and maybe it gave you some ideas for your own visual tracking projects as always thanks for watching don't forget to Like share subscribe and hitting the notification below stay creative and I will see you next time