Calculating 3d cone of camera vision

I have an idea for a 3d print I want to make to ‘adapt’ my wyze cams to various windows.

Basically there will be three “parts” that are digitally merged into one part to be 3d printed based on the angle I desire to put the camera at:

  1. a flat plate that i double-side-tape to the glass.
  2. a tight fitting box that holds the camera
  3. a connecting tunnel ‘link’ between them.

1&2 are easy.
And I could cheat for 3 and just make it way bigger than I need. But I don’t want to cheat.

I want the connection between the plate and the cam box to be as compact as possible. At first I thought this would mean a literal cone, but the camera sensor is rectangular, not round, so it would be a 4 sided pyramid.

How do I go about calculating this?

I assume there’s some angle up and down, and some angle left and right, beyond which the cam can not see.

I would assume the up angle = the down angle, and the left angle = the right angle.

But I already had an interesting prior experience with a cam mounted directly face on into a window. There is a sticker on the outside of the window, and I cut a hole in the sticker with an exacto knife to clear the view for the cam.

What I found then was that while the top and bottom were flat edges, the sides ended up being curved inward. I watched on cam and cut at the same time with the exacto until the whole screen was clear. What came out at the end was not a flat rectangle.

WHY?

Is there a name for the phenomenon? I imagine hollywood uses camera sun visors or something to reduce glare and those have to be calculated the same way.

What I’d ideally create is an OpenSCAD script that you input the horizontal and vertical angles you want for your cam and it pumps out an STL file of the mount. These mounts would make the cameras look cleaner outside the house, and would let you easily remove the camera to program and change SD cards without loosing the angle you carefully adjusted motion zones for. So I really want to design it right!

I might also consider building in ‘light traps’. beveled edges inside the cone to capture unwanted light, for a clearer picture. But I’m not entirely sure the fidelity of 3d printers is good enough for that.

This sounds like a @victormaletic type of project… :slight_smile:

5 Likes

Sure does. I wonder whether traditional flexible lens bellows might be a better solution than trying to create different sets of fixed plastic “tunnel” extensions.

1 Like

Hello @BillyCroan and @Customer

BillyCroan, before contemplating the first three requirements in your post #1
I experimented with simple square tube shields made of cardboard and with wood or 3D printed attachment collars as shown below with various side and vertical angles.


I noticed that portions of the Sq Tube Shield interfered with the camera’s FOV (field of view). To save time, material, and effort, I used a spreadsheet to calculate the layout ordinates for the various aim angles. I made two versions: a single 45°x 0° at 5° intervals and a compound 45°x45° at 5° intervals for comparisons with a live camera view. The picture groups below will provide a quantitive look at how FOV is affected by single and compound angles.

Concerning your three requirements for a compact, custom-aimed window-mounted camera holder that includes a light shield flange that serves as a tape mounting surface. The picture below is a Sq Tube Shield with a compound aim angle of 20° left and 25° down.


Notice that the camera’s base has been removed to make a lighter and compact holder. Also, the base notch resulting from the removal of the base is replaced with a Filler Plate. To minimize power cord weight on the camera holder a Cord Anchor is used. The camera Holder, Filler Plate, and Cord Anchor were printed at my local library.

I drew this camera holder in Autocad using its 3D functions with dimension values taken directly from a camera with digital calipers to the nearest 0.01mm. The dimensions were adjusted to allow for 3D printer error and to promote easy slip fits between the holder and the camera. Eventually, it would take about 15 min to draw one up. This is because the flange plate is always the same, The tube’s height and width are constant. The closest part of the tube to the window surface is a constant 20mm. Horizontal and vertical angles vary from 10° to 30° in 5° intervals. After a custom holder is drawn, it would be exported to an STL format file.
To make these Sq Tube Shield holders available to others not interested in the effort to draw one up, I have set up a master folder holding 110 STL files that cover any holder with a compound angle from 10° to 30° left and right and up or down. There are also 10 STL files of holders with a single angle from 0° to 45° in 5° intervals.
Below is the link to the master file:
Master File of Sq Tube Shield Camera Holders

The master file also contains paper transit instructions and PDF protractors as well as STL files for the Filler Plate and Cord Anchor.

Below is a picture group that shows an easy and accurate way of obtaining the needed aim angles with a paper transit. The angle values would be rounded to the nearest 5°.

My thoughts about your curvey-sided rectangle has to do with a spherical surfaced camera lens and a flat image sensor surface. Look at the picture below. In reality, the edges of the patio cover and deck, the fence boards, and the angle labeled shield lines are all straight. And some are also parallel. The picture only has two straight lines: the horizontal top of the fence and the vertical side of the patio cover post. These two lines cross at a right angle very close to the center of the picture. Everything that is parallel to these two lines appears to be curved, and the curvature increases as they near the edges of the picture. If the image sensor were spherically shaped such as if found in our eyes we wouldn’t be seeing these curved lines.

Your thoughts about creating an OpenSCAD script to generate custom-aimed camera supports could be very useful.

Below is a picture group of a PLA 3D printed Dog Leg camera support generated with an Excel spreadsheet. Inputs are camera type, horizontal aim angle, and vertical angle. Output is the STL print file.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Customer, please check the picture and link below.

Official Wyze V3 Window Mount is Live (just hidden at time of writing)
The billow’s picture is a static picture, not a video.


The billows size needed for a V3 would be about 6"x6" with the camera placed tightly into a corner of it. The corner of the camera that is nested in the billow’s corner will touch the face of the window. The area between the free sides of the camera and the billows (a thick right-angle shape or L) would be covered over with a similarly shaped piece of poster board or cardboard. Tape the billows to the window where the camera is needed.

Live-aim the camera, and maintain the aim in the billows by gluing lengths of wood crafts sticks (popsicle sticks) across the billow’s pleats near its corners.

The nearest picture of this below is of a large Sq Tube Shield. The conformed billows would replace the large outer tube.

Victor.

8 Likes

WOW!!! :star_struck:

You put a TON of effort into that post! Awesome models and 3D printing you did there!

:clap::clap::clap::clap:

5 Likes

Victor delivers. He is amazing.

6 Likes

Thanks for the write up! Holy smokes! @victormaletic getting it done! Nice!

RUhI

5 Likes

@victormaletic I am as shocked as I am humbled by your response. The amount of detail and precision is amazing. You more or less built what I could only imagine. If there are more people like you in this world, I can have faith that humanity will one day leave the solar system, to colonize the galaxy.

If you’re anywhere near KC and enjoy beer, I owe you a cold one, or a few!

I’ve been using my library’s 3d printer myself. Just today in fact, I was printing some test fits for the rectangular tubes you created to hold the camera. And when I got home I revised that project to (hopefully) have my first straight-on angled window mount, but it’s slow moving as I can only make it to the library makerspace once a week. Even though that’s not really much of an accomplishment since there’s a couple “straight on” holders like that already on thingiverse…

I just wish I had a working instance of Fusion360. i’ve been spending most my time in TinkerCad. Fusion doesn’t run well on my OS, Linux. I will share m works on this thread to collaborate and help others, but right now I’m still digesting all the material you posted in Google Drive. Your post was EPIC. Thank you!!!

4 Likes

Try FreeCAD, I just discovered it recently. Its much more complicated than TinkerCAD, and goes about design in a completely different way. suggest watching some videos before diving into it, but its really powerful and lets you polish objects very nicely.

@BillyCroan , @Omgitstony , @IEatBeans , and @Customer.

Thank you for your warm :heart:ed comments.

4 Likes

Always impressed with your write ups and tutorials!

3 Likes

@BillyCroan and Everyone else.
Billy, thanks for your kind comments in post #7.
In this post, you mention using the library facilities for printing some of the rectangular tube/shield camera mounts. Did the mounts accept the cameras nicely, and was it a straight-ahead aim, a single angle aim, or a compound aim angle?
I have worked with three libraries in my area and found the print output quality between them varies from a tight fit requiring surface scraping with a pocket knife or a file to just a little deburring for a nice fit. Sometimes I think the printed deficiencies may kids bumping the printer when no one is looking.
I request that the library print my items with a medium or high-quality setting. If scraping is required to get a nice slip fit, only the first 20mm at the top of the square tube engages the camera. I wouldn’t scrape deeper than about 23mm. The design opening in the mount to receive the camera is about 0.25mm larger in both width and height. I also apply what I call a “stair-step additive correction “to the width and height opening for the camera. Printed items almost always require some cleanup, mostly minor. Along with a sharp knife and nippers, I also found the three tools shown in the group picture below very useful.

I have donated deburring tools to some of the libraries. The library staff would clean up the kid’s printed projects because of potential liability with kids and knives. Letting the kids use the deburring tools (because they are very safe), frees the library staff from print clean-up activities, and I seem to get print requests executed sooner.

Some of the initial fit-up problems I had with the early printed square tube shield camera supports did not take into account how aim angles affect the fit-up. Below is a diagram (not to scale) that depicts stair-step interference and how I calculated a correction that I added to the design tube opening dimensions. Only High School trig is required.

BillyCroan I am interested in what STL files I provided and how the cameras fit?

Later, Victor.

3 Likes

I may be a little slow on these projects. I only visit the library once a week, so iteration is… cumbersome.

I downloaded your g-drive folder mentioned earlier in this thread as a zipfile.

I didn’t build the protractor, though those instructions were well written.

Instead since I already had WyzeCams in place that I didn’t want to disturb, so I photographed my existing properly aligned WyzeCams straight down and straight horizontally, with myandroid phone held steady against the window and phone’s camera lens directly above or to the side of an edge whose H or V angle component I wanted to measure. Then I took those photos into “the GIMP” and rotated them until the WyzeCam’s edges lined up with windows to get my exact angles!

I have at least two cameras on each window btw, to capture the widest view, and serve as a backup.

Left cam:
right 18.8 degrees in gimp
down 12.19 degrees n gimp

Right cam:
left 24.01
down 4.82

Before I figured to use GIMP, I was actually viewing the photo and using a camera-protractor android app on my phone to measure, but I realized the screen to phone angle and maybe the way I was holding the phone itself was screwing up the measurements. And it felt a bit stupid to be pointing a camera at my laptop screen. A bit like printing something out so I can scan it in…

The STLs of yours I used were:

  • Square Tube 20°Rt 10°Dn Shield.stl
  • Square Tube 25°Lt 10°Dn Shield.stl

I made a folder to share my files too: Index of /WyzeForum236628Assets

I used PrusaSlicer to plate them up with some others :slight_smile: gcode file included.
They were each 4mm or so too large to print separately on a Prusa i3 MK3S but that was fine. I wanted them as one piece anyway and just overlapped them as necessary to fit on the build plate and they came out as one piece.


CAME OUT WONDERFULLY, no deburring required on this part, in the angles I used. Here’s a video of the fit!

Let me know if I could help by running off prints of a variety of angles to test fit them. I don’t pay anything other than my property taxes to use this printer, but if you don’t need the confirmation I’ll save the filament for something else.

If you’d be willing to share your “source code” for the angled v3-to-window STLs, I’d like to build upon it. I want to make an version that has room for the v3 base, and another version for the v2 cameras since I still have a few of those. (I am progressing currently on a v2 straight-on-window adapter in TinkerCad.) I’d also like to add the option to rotate the WyzeCam’s tube on it’s axis. I’ve done this before to help motion boundaries line up with sidewalks/streets, etc.

I really want to make a ‘generator’ for these STLs, where you key in the H V and rotation angles, and select which camera you want, and it pops out the STL you need.

I printed your v3 base filler plate, and it came out okay. I had to debur it quite a bit but I probably shouldn’t have printed that with a brim so that’s on me. Otherwise, deburred, it snaps right into place!

I modified the v3 base filler plate STL you designed so I could keep the screw in the camera so I am less likely to lose it, and access the sd and programming button without removing it. I put a keyhole on there too because why not. My Wyze Cam Window adapters are on tinker cad at Login | Tinkercad and I exported stl, glb, and obj files of it in my asset folder. I may revise them but I typically keep older revs in Tinkercad, just further out of the workplane.

I’m also thinking of painting the white plastic on the fronts of the wyzecams black to further reduce the chance for reflections, and make it look nicer outside.

5 Likes

Hello All and @BillyCroan
Thank you BillyCroan for your compliments.
That’s a neat idea to use a camera to capture camera aim geometry, and then use the GIMP program to measure the aim angles.

The PrusaSlicer worked well with good output. No need to waste filament on check prints.

I am impressed with your informative video showing print fit up with the camera.

I find that the screw for the camera’s base is attracted strongly to its base and very secure when folded within it.

The hole in the base filler plate is for mounting the camera on non-magnetic surfaces, an example is shown below.

There is no source code to share. The STL files for all aim angle combinations of the Sq. Tube Glare Shield holders come from four basic solids that are nested, rotated about two axes, subtracted, and unionized. After the aim rotations are completed would be a good time to apply a window normal rotation. All of the four basic solids came from extruded polyline shapes. The trick to getting the proper tube length is to know where to position the horz and vert axes of the tube, only simple trig, multiplication, and additions involving the specific aim angles are required.

I will post my procedure in detail soon. I hope you will be able to incorporate my procedure into an automated generator. I would like to have a copy of the generator when you finish it. Below is the printed output from my spreadsheet-generated STL file for a DogLeg support bracket.

Your idea of making Sq, Tube Glare shields for the V2 and the V3 with their bases attached is very good and accommodates those who do not want to take parts off of their cameras. I think making the tube an extra 5mm would provide better support and make it look better. This full-camera approach would be heavier and a cord anchor could share some of the load.

Or

Their STL files are in the Google Drive Master File

Victor.

4 Likes