At its heart, the threads you're asking about are of the form "How do you install X" followed by a tutorial on how to do it.
It is answered by the same person who asked it. That is clearly permitted and encouraged.
The answer is in the form of a clear step-by-step tutorial with illustrations. That is clearly permitted, indeed encouraged.
The question is very specific ("how do you install X"), it is not of the broad form "How do I use PHP?" There is a single answer that is correct that is being sought. It is not asking a doctor at a cocktail party how to heal the sick. It is a specific question with an objective answer and the answer is not even that long. So, no problem there.
The issue of reputation, and your assumption that there is something wrong with this question because it is an attempt to "farm reputation," is insufficient proof that there is a problem with the question or the answer. Au contraire, if something earns reputation on Stack Overflow, you should assume that's because we want that thing to happen. If you feel like things on Stack Overflow that earn reputation are detrimental to the community, show us why they are detrimental to the community and then propose a different way to calculate reputation to avoid them.
Does this question make the internet better? Unless it's a dupe, it probably does. If it's a dupe of another identical question on Stack Overflow close it as a dupe. If it's a dupe of other information available elsewhere on the Internet, don't assume that that information will always be available elsewhere on the Internet forever or that it's in a reasonable, peer-reviewed, editable form... we have always encouraged copying information into Stack Overflow even if it exists elsewhere.
As Jeff Atwood points out in several comments scattered throughout this thread, the only real issue is that the poster of these questions did not, himself, appear to face the problem he was solving.
Should a user refrain from posting knowledge to Stack Overflow simply because they never faced this particular problem themselves?
Historically, we have certainly said that users should not ask questions on Stack Overflow that do not represent real problems they are facing... this would be a somewhat selfish act, demanding that other people work to solve a made-up problem. However, given that this is a self-answered question and the asker is not burdening anyone but himself, it's a slightly different situation.
It's also probably the case that asking obscure, unreal questions that nobody could ever possibly face, even if you answer them yourself, creates additional burdens on the community here and should not be permitted.
However in this case it is probably the case that many people actually need to install OpenCV and do face this particular issue. So asking and answering it, even when the asker doesn't face the problem immediately, appears to be making the Internet better.
For example, suppose you are a tutor in a computer vision class, and your students are using OpenCV in the classroom. Suppose you observe in real life that many students are having trouble installing it. Even though you don't face the problem yourself, you have observed it, and you would be making the internet better by asking on Stack Overflow, "How do I install OpenCV?" and then explaining how to do that.
In this case even though you didn't face the problem, you know that many people do.
However, as Jeff points out elsewhere in the comments here, take some time to search first to see if the question already exists. If there is an unanswered version of this question you can answer that's better than asking again.