Everyone judges and I definitely think that the type of book you are reading will essentially play a role in how someone will judge you.
Most people wouldn't bat an eyelid if you were just reading a well known novel and would probably think you're just enjoying a casual read and enjoying the fine weather.
If I were to see someone reading a philosophy book in public such as the works of the philosophers you mentioned then I would assume that the person would be intelligent, well read, pedantic (to an extent), etc. Generally speaking, people who read philosophy books tend to be of above average intelligence, the average person doesn't care for philosophy and wouldn't be able comprehend such in-depth stuff. The works of the philosophers that you mentioned are also not something anyone could just simply pick up and read without some sort of basic knowledge of philosophy, they are not easy reads and were never meant to be. No philosophy book is easy to read but some are a lot more easier to comprehend than others.
A good example of how reading material does matter is actually the other week I was going home after work and was on the train and some guy was reading Plato's book The Republic and several people looked at him and it was quite obvious that they all thought of him as intelligent. In comparison, I was walking with my friend through a park and saw a couple of women reading on a bench and people just passed them both and didn't bother to look at what they were reading. The type of book you read will have a significant result in how someone will judge you.
Also, I don't think if you were to read Mein Kampf in public that everyone would automatically assume that you're a Nazi unless you also have the stereotyped physical appearance of a neo-Nazi (skinhead, etc), that may make people think that you're that way inclined, possibly. But one thing is for sure, you will certainly get some funny looks from people if you choose to read this book in public. If you're bold enough to read it in public then you've got to be willing to accept the fact people will judge you because of it. I'm not saying you should be ashamed of reading it but it's one of those books that is infamous and its author is almost universally condemned so if you're reading his work then some people might look at you in a negative way for simply associating yourself with such material.