Friday, September 27, 2019

color theory - How can the "dress" optical illusion be accurately reproduced on other images?


By now pretty sure the entire world is familiar with the "dress" optical illusion as it will one day be known. My question is how can this illusion be reproduced on other images?


For those living in the social media dark ages, here is the image:


white and gold or black and blue


In general terms, some people have to refocus in order to see the correct colors of Black and Blue. It is possible to re-"tune" your eyes and see the Gold and White but very difficult. For the most part once you see it Black and Blue you can't go the other way.


Again though - the question is how can this illusion be reproduced in order to use it in various designs?



Answer



Since you asked about color theory, I assume you are already aware of color theory and know a little of how it relates to shadows and highlights. If not, take a look at this article which does an excellent job of explaining how to create objects with shadows when painting.



We can use this information as a tool for creating similar images as this dress. However, it is worth pointing out that the reason why it is so easy for our minds to misperceive this image is because this is a grainy, poor quality jpeg and the lighting is considerably complex.


In fact, part of the reason why this effect is occurring is because this image was taken on a mediocre camera (almost certainly on a cell phone), snapped quickly (causing a bit of blur), and likely scaled-down in quality so that it would be easy to upload to a social media site.


The bottom-line is that for the ocular portion of the nervous system to make a good judgement of a scene, it needs quality "data" coming in. If our brains receive poor data, then it can easily make poor perceptual judgements.


Regarding this image, the lighting is as such that many tend to first notice the really BRIGHT source of light, coming from the window. In our minds, we then assume "Ok, bright light outside, ergo... I must be looking at the shadow-side of this dress."


Being armed with our knowledge of blue-toned shadows and using complementary colors for shadowing, we can now understand why we may perceive that this is a white dress (that is being toned down to a bluish tone for shadowing) and that the gold lace is also being cast in a bluish tone because it is also in a shadow.


For those of us who misinterpreted this scene, we may have to stare at this image for a minute for our minds catch that there is a lot of light-bleeding from light glaring on the lens of the camera.


This means that instead of seeing a dress in a shadow, we are actually seeing it in a room that also has a very-bright light shining on the dress. Our minds then go:


"Oh! This isn't a dimly lit, white/gold dress, it's a well lit black/blue dress! Let me slooooooowly re-adjust our perception so that MAYBE we won't think we're complete idiots..."


We are fooled because both the Black/Gold and White/Blue color-pairs in this image are both close to the center of the complementary color gradients for each color. Since we are close to that center-point of the complementary color scale, and the image quality sucks, our minds simply don't know how to correctly process this image.


How do we use this to our advantage?



I can't give a straight-forward answer because using this information effectively requires a considerable amount of artistic capability in setting up a scene. Though I'm no artist, I can offer some tips.


First, I'd setup a scene with an immediate focal point that isn't the object that you want to use as your "confused" focal point. In the case of our image, this is the very-bright light coming from the window. Make this the first perceived focal point by your viewer and make it, dare I say it, rather garish.


Next, device a scene where an object rests in a place that one would assume is a shadow. As I mentioned, our minds tend to think this dress is in a dark room. If the room is dark, we are seeing shadowed-tones. Create this same effect by using complementary, shadowy colors, but be sure to use colors that are all very close to that grayish-blue tone that is somewhere in the middle of all high-to-low light complementary color scales.


Next, recreate a "light bleeding" effect like the one we see on this image from the light that was shining on the lens of the camera. In fact, this bleeding effect is almost certainly necessary. I can't see how else one could fool the mind without it. It is this light-bleed that makes our minds miss that the object-of-focus is actually well lit, rather than poorly lit. This is a necessary mechanism if we want to fool the mind, and have your viewers question what they are perceiving.


If you can follow these rules, and with a bit of practice, I think you could recreate a similar effect within a digital image, or possibly even a painting. I would mock-up an example of this type of image but this is extremely difficult to replicate. As Scott posted above, the cylinder with the shadows on the checkerboard show a good example of how our minds alter real color, so that we can get a better understanding of what an object really looks like, regardless of lighting, in a three-dimensional world.


However, your end-goal is to create a scene that the eye can't easily correct and, in fact, will misperceive! This will require a certain level of artistic creativity and a lot of experimentation.


Anyway, if you are an artist and hope to recreate this type of illusion in your work, then good luck! I'd love to see someone play off of this psychological effect in art. It's fun to observe and, for a second, makes most of us question our sanity when we are strikingly made aware that the world is often not as we immediately perceive.


adobe photoshop - Techniques for cutting out hair accurately


I use the Pen Tool for 90% of the situations where I need to cut someone or something from a photo but sometimes it gets tricky, especially when it comes to hair.


Let's take the following image for example:


enter image description here



  • Pen Tool - don't even think about it, it would take years to do an accurate cut so you usually do a more bulky cut.

  • Magic Wand & Quick Selection Tool - in some cases these can work, especially if you know your way around with Tolerance and Refine Edge

  • Blending modes are very useful in some situations also


When confronted with such an image I usually do use one of the tools from above + get something like 10 color samples from the hair, create a new brush that I adjust from photoshop's brush engine and start drawing hair.



From everything I've tried, redrawing hairs gave me the best results so far.



Q: Is there a better way to get an accurate selection when cutting hair? Or, how can I improve what I've got so far?



PS: Just wanted to add that a situation where the background behind the subject is in a single color like in the sample I offered is rare, therefore an answer based entirely on same color selection won't help that much.



Answer




First off, plugins and simpler methods are available. This is if you want to get higher quality results. It is largely the same as ACEkin's answer except going into details and with visuals.


I'll be using this photo from Photo by Ariana Prestes on Unsplash.com:


Original Photo



Note: I'm going to be doing the body in a separate layer so I'll be ignoring it for most of this tutorial until the final few steps


Select the Channel with the most contrast in the fine outer hairs. I think Green is the best option:


Green Channel


I'm going to duplicate that channel and rename it to Hair Mask. This will be what I work on until otherwise stated.


Important: If your hair is light on a dark background then you need to invert some of this as far as when to Dodge/Burn and when to use Black/White.


Now to start Apply Image. Multiply or Overlay are good options, sometimes you can even Apply Image twice. Here I applied the Hair Mask to itself with the overlay and lowered the opacity in the settings a bit to not lose the really fine hairs:


Apply Image Overlay


I actually did Apply Image Overlay a second pass with a lower Opacity pushing the contrast a bit more. This isn't undoing the first one, its doing it a second time:


Apply Image Overlay again


Then go into Curves (Ctrl/Cmd+M) and adjust the White and Black point sliders.



Curves Adjustment


Setup some Guides so I could periodically show original vs current at 100%. Here's the first look after just doing Apply Image, Apply Image, Curves:


Mask after Apply Image Apply Image Curve


Now you can like ACEkin said use Brush set to Overlay. I prefer starting with Dodge and Burn though. Burn set to Shadow and I used Exposure of 12 then went over the hairs as carefully as possible. The more careful and time you take the better the results will be. This was maybe 3 minutes, not long at all:


Burn Hair


Then at this point go ahead and switch to Brush, Black and fill in the inside. If you want you can first do Black set to Overlay and make another pass at the edges. Again, more time you take the better the results:


After filling it in


Alright, now use Dodge on the spaces between the hairs. Brush set to Overlay White is another option, again I prefer Dodge and Burn. I did Dodge Exposure 12 on Highlights.


Dodge the White


Then fill the rest with White.



After filling the White


And let's see where we're at in the 100% view:


Completed Mask


With your completed mask selected go back to RGB channel and then layers and apply the mask. I did the body with a separate layer as I mentioned earlier so now I've applied that as well.


Then just refine your mask using the Refine Edge command be sure to use Decontaminate Color


Refined Edges


Now the background I picked doesn't really match the lighting and picture, but that's alright. Its not about whether the picture looks real, just about the mask. Could almost always take more time, this is by no means perfect, but here it is which is pretty good for the point of teaching the technique:


Finished Image


And our 100% crop this time looking at the original vs the finished:


Hair Cropped on BG Image



I didn't really think about the crop area when choosing a background image to drop in. Since its hard to see that particular area, here's with absolutely no changes to my mask, just got rid of that background for a plain white background for the comparison instead:


Final comparison


Not bad for a Mask from a JPG.


forms - Close Button vs Cancel Button






Possible Duplicate:
Save/Cancel/Close button behavior question



I am developing a web application. I have a pop-up with a text field. I am trying to decide how the users can close the pop-up. I currently have two ideas, but am not sure which one is better as I cannot find any research for this.


Users will be using this pop-up text field often as it is one of the main ways of interacting with our project. The pop-up is about 200px wide, 75px tall.


Idea One: Have a cancel button next to the submit button at the bottom of the pop-up.


Idea Two: Have an 'X' button on the top right of the pop-up signifying close the pop-up.




color theory - Highlights and Shadows with Equal Weight


I'm creating isometric buildings in Inkscape. Each building has a base color. To account for lighting, the top of each building has a highlight, the left side has the base color, and the right side has a shadow.


My problem is that whenever I try to pick darker and lighter versions of the base color, one of them always has more contrast with the base color and thus more visual weight. Here's what I mean:


Color Example


On the left, I create lighting with 20% opacity overlays of black and white. On the right, I simply adjusted the lightness slider on HSL by 20 points (out of 255) in each direction.


The shadow on the yellow example on the left has much more contrast than the highlight. Below it, the highlight on the bluish example has much more contrast. The right side is much better, but I'm wondering what the best way to do things is.


In other words, how can I best make shadows and highlights have equal contrast/ visual weight?



Answer



In paitning there is an old trick to make gradients.


In general you do not use white to make a light red, because you have pink, that looks like contaminated with white. Instead you use a bit of yellow first and then send it to white:




This happens to all colors in the color wheel, turn them a bit into the lighter section and then into white:



The same when you darken a bit yellow or light colors:



This is one reason your second column looks better. The first one is just contaminated with gray. Dark gray and light gray.


I am not sure what is the "best" way. It does not matter at all, because it is a perceptual relative problem. So do not worry too much.


Probably just limit a bit your palette so you do not have too many choices, but a general palette to choose from.


The old answer with additional info


Our vision is logarithmic. This is that the progression of light perceived is not linear.



Take a look at this bar:



It has a linear gradient, and I put a small bar in the left and right extremes.


We can barely see the red bar on the left side, but the white is clear.


The approach then should be visual, not by coding arithmetic values.


One option


Is that you make a linear gradient and after you modify it with a gamma function. Try round numbers, like Gamma 1.5, 1.8 or 2.0


Gamma 1.5 enter image description here


Gamma 1.8 enter image description here


A conclusion



The first step is to have your monitor calibrated.


After this, you probably will find that you can use, for example, 15% on one side and 20% on the other side. No one will qualify your work measuring the exact values of the proportions of the color.


But this will change according to each color.


You can not expect to have the same range of "light yellows" than "light purples" so do not go for a mathematic approach but a perceptual one.


Thursday, September 26, 2019

website design - Helvetica Neue Equivalent on Google Fonts?


Does anybody know a font on Google Fonts that is very similar to Helvetica Neue?



Answer



That's the thing about Helvetica, there isn't really anything quite like it. We are talking about one of the (if not the) most beautiful font in existence.


You could settle for Open Sans or Source Sans Pro but it won't be the same. But you probably already know that as there are only 121 fonts to choose from.


short rate - Extensions of CIR


I could need some advice on extensions of the CIR model.


The standard CIR reads



$dr(t)=\kappa(\theta-r(t))dt + \sigma \sqrt{r(t)} dW(t)$.


A possible extension, if we would like the short-rate to also include negative values, could be a displaced version, so that $r(t)+\alpha$, where $\alpha>0$, follows a CIR model.


Further, to fit the initial term structure one could also consider the CIR++ (can be seen in Brigo et al) which is that


$r(t)=x(t)+\phi(t)$,


where $x$ is CIR and $\phi(t)$ is deterministic and chosen to fit the initial term structure.


My question is if it would make sense to consider a displaced CIR++, that is that $r(t)+\alpha=x(t)+\phi(t)$. My immediate thought is that the $\alpha$ does not provide any additional value for the model, and that the $\phi$-function already makes it possible for the short-rate to be negative?




Wednesday, September 25, 2019

typography - Should underline clash with text descenders?


CSS3’s text-decoration module includes a text-underline-position property, which specifies whether the underline should be positioned below the whole text:


          enter image description here


or just below baseline, letting it clash with text descenders:


          enter image description here


Okay, we all know how underline should only be used as a last resort, but… if you are going to use it, what is the most common way of doing it? What are the pros and cons of each underline style?



Answer



What is most common?


Well, some typographers will say that underlining should probably be avoided all together, and that underlining is only appropriate for use on typewriters or on hyperlinks on the web. However, I would add that creativity is about seeing opportunities to break rules in creative ways so how much you let this guide you is up to you.


On the web, having it just below the baseline, overlapping descenders, is most common. But this is only because this has always been the default rendering for major browsers up to this point.



On typewriters, underlining overlaps descenders, but slightly differently: it falls part way between your two examples (example). If you look at the baseline of the descender, such as the bottom loop of g or the bottom serif of p (in a serif font), that is where the underline lies. So it "joins up with" the bottom of the descenders.


Pros and cons


The benefit to having the underline overlap with your descenders is that it doesn't affect your line spacing (or "leading") at all - you do not have to increase the gap between lines to accommodate the underline.


The benefit to having it completely clear of your descenders is readability, if that is important. But you would have the drawback of needing to increase spacing between lines. If your situation allows for lots of line spacing anyway, then by all means go for it.


If you're using the web, then underlining is heavily associated with hyperlinks. So, any use of underlining at all should be avoided for text that is not part of a link. Signify what you want to signify in other ways - using bold, italics or ALL CAPS instead.


technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...