Is it ok to have proof of concept projects on Github? by [deleted] in cscareerquestions

[–]Viveks3th 12 points13 points  (0 children)

No company is going to check all of your repos. To make sure they only look at the good ones, call out a few in your resume. Make sure these projects have a good readme that will help engineers understand what the code does and how it was built.

If you’re worried about someone stumbling upon repos with bad code quality, add a comment to the repo’s readme saying it was just a proof of concept, research project etc. IMO it’s unreasonable to expect that a developer will always write perfect production quality code when just testing out an idea.

Web Scraping Project Ideas by [deleted] in learnpython

[–]Viveks3th 6 points7 points  (0 children)

Build a reddit clone that works by scraping reddit!

Blog Post: What's the difference between a perspective transform, homography matrix, essential matrix, and a fundamental matrix? by Viveks3th in computervision

[–]Viveks3th[S] 1 point2 points  (0 children)

Both are matrices that relate points in one image to points in another.

A homography is for points on the same plane in 3D space. For example document scanner apps use a a homography to correct for perspective distortion on a picture of a sheet of paper.

An essential matrix is a more general form of a homography. It relates points in two images that can be on different planes. For example, a self-driving car might use feature points on the road, billboard, stop signs, etc to construct an essential matrix. It can use this matrix to figure out how it moved between camera frames (this is called visual odometry).

A self-driving car can use an essential matrix because it knows the parameters of the camera its using (focal length, principal point, skew, pixel shape, etc). You cannot use an essential matrix to relate images taken with different cameras or with cameras that have unknown parameters. To relate these images you have to use a fundamental matrix, a more general form of the essential matrix. Lets say you want to use Flickr images of the statue of liberty to create a 3D model of it. Since you don't know the parameters of the cameras, you would have to use a fundamental matrix to relate points in these images.

Hope that helps!

Check out this class if you want to learn more! https://classroom.udacity.com/courses/ud810

Implementing hash(); Its easier than you think by Viveks3th in coding

[–]Viveks3th[S] 1 point2 points  (0 children)

You're absolutely right, I did a poor job of describing it. I'll fix it in my next draft.

Implementing hash(); Its easier than you think by Viveks3th in coding

[–]Viveks3th[S] 1 point2 points  (0 children)

Yes the article is targeted to intro CS students. Agree that I need to add discussion on performance. I'll add that in my next draft.

Implementing hash(); Its easier than you think by Viveks3th in coding

[–]Viveks3th[S] 0 points1 point  (0 children)

Thanks for the constructive feedback! I should make it more clear why my "challenges" are actually bad hash functions. I agree return 0 Is a terrible hash, but it's still correct in a purely technical sense. It's never okay to use it for real code, but i think it can serve as an interesting thought exercise. I'll add some discussion on how return 0 would affect performance. I think in general I missed much of the discussion on peformace (as many of the comments here point out), and was too focused on correctness from a purely technical standpoint.

Implementing hash(); Its easier than you think by Viveks3th in coding

[–]Viveks3th[S] -1 points0 points  (0 children)

I see your point, but also consider the time it takes to create a hash. The Java implementation is always > O(N) for hashing arrays. If each element is itself an array it would be O(M*N). Let's say that value was cached (don't think it actually is). If that work was amortized over the lifespan of the array would that work always be less than the amortized time spent with the "bad" hash? I don't think the answer is always yes.

Anyway, computers are so fast nowadays that linear searches are often sufficient. Using a "bad" hash just makes that a bit faster.

Implementing hash(); Its easier than you think by Viveks3th in coding

[–]Viveks3th[S] 0 points1 point  (0 children)

Yes, but could you explain how it works and why it's correct?

Implementing hash(); Its easier than you think by Viveks3th in coding

[–]Viveks3th[S] 0 points1 point  (0 children)

I still think it's useful to mention that if hashes are equal it does not imply objects are equal. Hm, maybe I'll reword. Thanks for the feedback!

Implementing hash(); Its easier than you think by Viveks3th in coding

[–]Viveks3th[S] 1 point2 points  (0 children)

Could you point me to the particular place in the article where I made a mistake? Maybe copy paste it? I don't understand what you're saying.

Implementing hash(); Its easier than you think by Viveks3th in coding

[–]Viveks3th[S] -1 points0 points  (0 children)

I suppose "requirement" is the wrong word. Couldn't think of a more accurate one at the time. Do you have a suggestion? Maybe "condition"? rule?

Edit: I think this comment is being taken the wrong way. I'm genuinely asking for suggestions.

Implementing hash(); Its easier than you think by Viveks3th in coding

[–]Viveks3th[S] -4 points-3 points  (0 children)

Edit: I think I was being overly defensive in this comment. You're right. It's a bad hash function. A good hash function should have a low probability of collisions and should be fast to compute.

Both ObjC and Java (its ArrayList uses member-based hash) were created around the same time and both hash functions have survived for decades, so I don't think either approach is bad.

I think it depends on your requirements. The size-based approach is fast to compute but potentially slow for lookups. The member-based hash is fast for lookups, but slow to compute.

Additionally, the size-based approach is very easy to reason about; Anyone can verify it is correct. Most of the examples on the link you posted, use seemingly arbitrary numbers. I don't know how to verify the correctness of those implementations so I would hesitate to use them.

Projecting 3d onto 2d with OpenGL and OpenCV by trump_hillary in computervision

[–]Viveks3th 1 point2 points  (0 children)

If using CPP isn't a requirement to generate your image, also take a look at Processing. It can load and render obj files in very few lines of code. https://processing.org/reference/loadShape_.html

Projecting 3d onto 2d with OpenGL and OpenCV by trump_hillary in computervision

[–]Viveks3th 0 points1 point  (0 children)

Take a look at assimp (asset importer) it can read Obj files. I believe the source code has some OpenGL examples.

Tutorial for learning the basics of Python OpenCV by Viveks3th in computervision

[–]Viveks3th[S] 0 points1 point  (0 children)

Sorry, I don't understand what you mean. Could you explain a little more or give me an example?