Calculating 3d cone of camera vision

@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.

1 Like

@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

I got bogged down with other stuff, but will make progress on this in the next week. Is your spreadsheet public that generates an STL file? I’d love to see that formula! Seriously would probably help me make the new generators too.

Hello to All and @BillyCroan
I have been asked if I would share my source code for 3D printing custom window-mounted Sq Tube Glare Shield V3 camera holders. There is no source code, but I will share my procedures and methods. Perhaps they will provide a path for someone to automate it. My method of creating a 3-D model which can be exported to an STL file and then 3D printed is described below in detail. Also, the method is available as a word document. With the word document, you can write in your aiming angles and use it in the detailed math expressions, and easily switch between pages to gain an understanding of the simplicity of this method.

Here is how a practical person might describe in words what I am going to present below.
Imagine you have a magical square tube that a V3 camera (without its base) will fit snuggly into the end of the tube 20mm. Because the tube is magical it will pass through the window without damage, But the camera is not magical and will be stopped by the window. So you start moving the tube through the window until the camera is stopped by the window, Now you aim the camera to the right and then down to your aim area of interest, now only the upper left corner of the camera is touching the window. Now with a very sharp knife, cut off the portion of the magic tube beyond the front face of the window. The remaining tube against the window is no longer magical. With some strips of thin material you previously prepared, Glue a brim around the sides of the tube that is against the window face. It kind of looks like a miniature hat with a hole on the top for the camera. This is a description of what my method is with the necessary details to accomplish it.

Victor’s Method of drawing up the solid for a through-a-window-view of a Square Tube Glare Shield V3 Camera Holder. Here is the link.

Sq Tube Glare Shield Drawing Instructions

I use AutoCAD for my drawing, but since the simplest drawing commands: JOIN, EXTRUDE, UNION, ROTATE3D, and SUBTRACT are all that is needed and available in any basic 3D drawing program. 2D drawing is also needed to draw the part sections that will be the basis of the solids extruded from them which will then be further 3D manipulated. After drawing a part, you may need a lefthand version of it. No need to repeat the drawing process, instead to a MIRROR3D command. MIRROR3D can also be used to mirror an up-version from a down-version. After the 3D drawing of the part has been completed and checked, it can be exported to an STL file and 3D printed. A printed example is pictured below.
People using more advanced software will see easier and more advanced procedures to accomplish the same end result.

This camera holder/glare shield is made from 3 solids and a fourth solid that I call a Subtraction Block. This block is used to help form the part, but is not part of finished product.
The Window Plate is two simple extruded plates that are then unionized.

To create a printable part that the camera will fit into with little or no cleanup work after it is printed some details will need to be attended to. Physically measure the V3 camera with machinist calipers. I prefer digital ones that can measure in millimeters or inches. I add 0.25mm to the length and width of openings that will be receiving the camera. Also, if the camera tube will be printed at an angle to the 3D printer plate, I add my so-called stair-step correction, which is covered on the next page.
The wall thickness of this part is somewhat arbitrary. The thickness needs to be thick enough to print nicely and to carry the camera’s weight. To make the part easier for the printer to print, consider using discreet multiples of the printer’s table motion resolution.

This sheet details how fit-up interference arises when printing a sloped surface. Printing on a slope creates a series of stacked and offset layers. The cross-sectional shapes of these print strings are really more rounded or elliptical. The squared-off shapes in the drawing below provides a mathematical approach that gives numerical values that can be incorporated into the part’s dimensions. I think it is better to have a little looser fit-up than a tight one. Loose fits can be shimmed out with tape applied in the right places.

The Working Length is the amount of extrusion needed to properly sleeve (hold) the camera while holding it at the specified Horizontal and Vertical Aim Angles. One intent of the geometry for the Sq Tube Glare Shield is to have one corner of the camera touch the window with non-zero aim angles. Touching the window provides the least amount of field-of-view restriction resulting from aim angles greater than 20°. With both aim angles zero, the whole face of the camera touches the window. There are no field-of-view restrictions in this case.

image

The picture below shows the Working Length as it applies to this Sq Tube Glare Shield. It is the red arrow that extends along the tube’s centerline axis from the face of the window to the plane of the tube’s end. The length of the blue arrow represents the Sleeve Lap, and its length is included in the red arrow’s length.

image

In this depiction, the Inner and outer sections of the future tube are separated and multiple copies are made for the 3D manipulations to follow. Each of the sections has a centerline X and Y axis that lies on the zero plane (which is the surface of the window). When these shapes or the solids extruded from them are copied and moved about, the intersection point of the X and Y axes will be the grips by which they are moved, attached, unionized, rotated, and subtracted.

I proceed forward with the shape manipulation with copies of previous results as an insurance policy against my blunders and mistakes. It is easier for me to discard a mistake and resume from a previous state than to somehow undo it when I may not realize what I did and how to undo it.

P8 Extrusions-Model

This is an oblique view of the above extrusions that will be piggyback stacked and unionized.

In the oblique view below of the unionized solids below the X and Y axis within the solids will be the references for horizontal and vertical aim angles.

When selecting a solid for the horizontal aim angle rotation about its Y axis be sure to select the X axis segment to be included in the rotation. The rotation of this axis and the concept of Working Length are key in making the final finish geometry correct.
The lower 25° Dn view incorporates the 20° Rt 3D rotation from above. If you wanted an additional 3D rotation about the Z axis where it passes through the center point, this is where it would happen, after the Rt and Dn rotations. The views below are Z plane projections.

The two depictions below are where the Window Plate Solid and the Subtraction Block are copied and placed with the rotated Outer Solid at their center points.

The next operation will be the subtraction of the Subtraction Block from the rotated Outer Solid, and then unionizing the Window Plate and remainder of the Outer Solid.

In the figure below right, the Subtraction Block has been subtracted from the Outer Solid. The remaining Outer Solid and Window Plate are unionized.

Above a copy of the Inner Solid has been moved to the recently unionized solid on the right using center-to-center positioning. The Inner Solid will be subtracted from the unionized solid.

The last subtraction results in the finished part. Before exporting it to an STL file and 3D printing it, run some checks.

Below is an oblique wireframe view of the finished part.

image

image

![image|672x353](upload://kpREmXWWav33ELKOyCOKdEIAvwS.png

Not shown here, the wireframe was 3D manipulated to obtain a Working Length measurement it checked out to four decimal places.

This is the finished part holding a camera. This version of it requires that the base be removed. A 3D printed filler plate fills in the notch left from the base removal, also printed is a cord holder to take most of the cord’s weight.

5 Likes

Hello BillyCroan
Here is a link from one of my earlier post:
Spreadsheet to 3D Printed Ready to Mount DogLeg Bracket
That may help you.
You may find as I did that once one gets beyond simple geometric shapes such as my dogleg camera supports. The vast amount of triangles needed to describe these shapes become a tyranny of numbers. In my dogleg mounts, I was able to map out all of the triangles and link them to specific parts of the spreadsheet.
Good luck, I am interested in what you come up with.

Victor.

2 Likes

Is their anywhere I can buy this ? I do not have the means to make it ….

Hello Rulwiz.
The link in the post is for a free spreadsheet wherein you specify the horizontal and vertical aim angles and the bracket thickness usually 8mm and get values that you copy and save as an STL file that the 3D print is made from.
Here is a free link to the spreadsheet. DogLeg Standup to STL

When you say where can I buy this? To what are you referring?

I’m not sure where you are, but US libraries 3D print STL files for free. I.e., take the STL file to the library and they’ll make this for you free of charge. Google your local libraries and search their sites for 3D printing for specifics and limitations.

3 Likes

Hello All.

I tried to access the spreadsheet I made that requires aim angles and bracket thickness (defaults to 8mm) and then generates the STL output to print the DogLeg Standup bracket, but it didn’t work so here is a fresh link. DogLeg Standup to STL

Victor.

4 Likes

Hello @BillyCroan.

Below is the results of making a Full Section Window-Mounted V3 Tube Glare Shield Camera Holder.

The first picture below is the printed results.

The next two pictures show it mounted on a window with a working V 3 with its base attached. This was a temporary mount, that is why so little tape is used.

The picture below shows the field-of-view restriction caused by the shield’s geometry for a 25° Rt aim angle. A 20° Rt angle would have much less restriction. Often the FOV restriction is hiding another restriction, the side frame of the window. In other words, if the camera were free of tube and shield geometry, the window’s side frame would block part of the view.

This last picture is a copy, for viewing, of the PDF file with detailed section dimensions.

Full Section V3 Glare Guard Shape Shields

Below is a link to the actual PDF with all of the needed V3 section dimensions.

Full Section V3 with Glare Guard.PDF

For detailed instructions in a word document format, check this link.
Create Your Own Custom Window Mount Sq Tube Glare Shield Drawing This document explains all of the steps needed to go from a scaled drawing of the camera’s section that includes fit-up allowances, the location of positioning axes, calculating Working Length, positive and negative extrusions, unions, order of rotations, another union, two subtractions, and finally checking the finished product. Then the part is exported to an STL file.

Till later.
Victor.

1 Like

Could you make the tube part widen as it gets closer to the window, kinda like a dome? So you don’t see the plastic in the camera view.

1 Like

I am working on two approaches that will solve that issue. But it won’t be printed. It will be folded. Stay tuned.

Victor.

2 Likes

Hello IEatBeans.
To eliminate F.O.V restrictions for a 45 deg Rt aim, the shield would need to be about 9" wide and at a very low slope. A 3D print ould be very problematic.

Victor.

Hello @BillyCroan @IEatBeans and Others.

It has been a while since we last communicated through the Wyze Forum. Some of the earlier discussions concerned the camera’s cone of vision. I sent out my procedures for making STL files for square tube and full-section angled window-mounted glare shields. Since then I have been working with flared shields. Since the camera’s field of view is a rectangle, I began working with a square flare instead of a cone flare. I chose the square pyramid flare over a rectangular pyramid for its ease of mating geometry with a baseless V3 camera.
While working with a square pyramid flare, I was able to eliminate the lengthy calculation for the ‘working distance’. Only simple triangular calculations are needed. Soon I will be posting about the pyramid-flared glare shields. If you are interested in a preview of what an 80° 15°Rt 15°Dn pyramid glare shield looks like I will send you an STL file for it. The 80° in the file above refers to the apex angle of the pyramid. I find that 80° and 90° are practical and any larger ones are impractical.
et me know if you are interested.
Victor.

1 Like