Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] check visible points are in front of the camera #40

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/projective.jl
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ function cameraproject(C::Camera, pta::Array; computevisibility = false)
if computevisibility
if C.rows !=0 && C.cols != 0
visible = (x_p .>= 1.0) .& (x_p .<= convert(Float64,C.cols)) .&
(y_p .>= 1.0) .& (y_p .<= convert(Float64,C.rows))
(y_p .>= 1.0) .& (y_p .<= convert(Float64,C.rows)) .&
(pt[3:3,:] .>= 0.0) # Make sure points are not behind camera
else
@warn("Point visibility requested but Camera structure has no image size data")
visible = Array{Bool}(undef, 0)
Expand Down
Loading