May 11, 2013
Posted by gtaniwaki under Real Numeracy
| Tags: Software
by George Taniwaki
If you have ever taken a picture through an exterior window, you may have been disappointed with the results. This can happen either standing inside a building shooting out, or standing on the street shooting in. That’s because if the side you are standing on is brighter than the other side you will get reflection of the lights off the glass. And if you are standing in the light, you will also get the reflection of yourself which just looks goofy.
Another problem is that if it is a sunny day, it will be much brighter outside than inside, so all of the objects inside the building will be too dark relative to the objects outside.
Photographer Nick Kelsh has a blog post where he gives a good description of the problem and some tips to avoid it. Though his recommendation to throw a rock through the window may be a bit extreme.
You can try to fix the problem using Photoshop, but it is a lot of work because you will need to fix the color balance for two different parts of the scene. The interior lighting will probably be an artificial source like incandescent (2700K) or fluorescent (5000K) while the exterior will be lit by the sun (~10,000K). Removing the reflections will be harder still.
A better solution, if you can control the interior lights, is to take two pictures and combine them. The first picture is taken with the lights on and is designed to capture the object inside the building. The second picture is taken with the lights off and is designed to capture the view outside the window. (This assumes the lights are inside.)
Then you merge the two images. If the window is rectangular, you don’t even need fancy equipment and software to perform this trick. In the example I show below, I didn’t use a tripod, just a handheld smartphone. To manipulate the images I used free Google Picasa to adjust the color balance and brightness of the two images. I copied and pasted the image within the window using free Microsoft Paint.
Take two pictures
The first step is to take two pictures out of the window without moving the camera, one with the lights on and one with the lights off. For this example, I am standing inside the house. When taking the picture with the lights on, I set my focus and exposure to capture the most prominent object(s) inside the house. I ignore the reflections in the window (Fig 1).
Conversely, when taking the picture with the lights off, I set my focus and exposure to capture the view though the window. I ignore the underexposure and poor lighting of objects inside the house (Fig 2).
Figures 1 and 2. Image with interior lights on (left) and lights off (right)
For best results, you will want to mount the camera on a tripod to eliminate any movement between the two images and any blur caused by long exposure during the lights off photo. However, if the window is rectangular and there is no overlap between objects in the foreground and the window, it doesn’t really matter. In fact, the images don’t even have to be out the same window.
Adjust the brightness and color balance separately
Open each image individually in your favorite photo editor software package. I use Google Picasa because it is free. Set the color balance, brightness, and contrast. I dislike the yellowish tone of photographs taken with incandescent lights and always try to correct them to fluorescent. When taking photos with a low quality camera, such as most smartphones, also apply despeckle and unsharp masking. Save both images.
Copy and paste
You can use Google Picasa to crop an image and copy it to the clipboard. However, it doesn’t appear to have a way to paste the clipboard into an image. Thus, we will merge the two images using free Microsoft Paint. Open the image that has the good view through the window. Create a selection rectangle around the image within the window frame and copy it to the clipboard. Open the image that has the image of objects except the window and paste. If the images don’t overlap properly because they are different sizes, start over and resize the first image to match the second. Save under a new name (so you don’t ruin the original image).
The resulting image (Fig 3) looks pretty good, but it isn’t perfect. First, because I was using a smartphone, the focal length of the lens is very short so the sides of the windows are curved rather than straight. Since I used a rectangular selection to cut and paste, parts of the original window image show through. For instance, you can see the reflection of a light peeking through in the upper right corner of the window.
Second, the gooseneck of the sink faucet is within the rectangular selection so it is too dark.
Finally, since I didn’t use a tripod, there is some movement and the gooseneck of the sink faucet is slightly displaced.
Figure 3. The merged image, color corrected and cropped
Using Photoshop or other advanced image editor, you can make a better selection. And you don’t have to use the image out the window. Once you have created a mask, you can paste any image into the scene.
All photographs by George Taniwaki
May 6, 2013
by George Taniwaki
As a kidney patient searching for a donor, it is best to start your search by contacting people you know as part of your social network. However, once you have contacted everyone you know, it may be helpful to expand your search to include strangers who live in your neighborhood.
One way to reach these people is to get a news story carried in a local newspaper, radio station, or television station. Getting your story in front of the public can help you and other kidney patients in the following ways:
- People you have already contacted previously may see or hear the story (especially if you send them a copy of it or a link to it). This will reinforce your message. It may provide the extra push they need to decide to get tested as a potential donor for you
- People you don’t know become aware of your story through the news. They decide to get tested as a potential donor for you
- People you don’t know see the story and decide to get tested as a donor for someone they know (not you) or decide to donate anonymously. Thus, although the story didn’t help you, it will help others
Contact your local media outlets
Newspapers, radio, and television can provide free news coverage for your story. These media outlets usually also have a web presence, including a standalone website and through social media like Facebook and Twitter.
Newspapers – Because there are so many, local community newspapers are the most likely media outlet to carry your story. If you don’t know what newspapers are available in your neighborhood, there are three good lists of local newspapers. I recommend searching all three in order to compile a comprehensive list for your area.
- U.S. Newspaper Links
- Online Newspapers
- Wikipedia list of newspapers in the United States
You may also try contacting the major daily newspaper(s) in you region, but your chances of getting a story published in one of them are much lower.
Radio – There are usually more radio stations than newspapers in a city. However, there are a few limitations in your ability to get your story publicized on radio. First, each radio station has a very constrained format. Most are music oriented or talks show oriented, often using nationally syndicated content. Most radio formats are not conducive for allotting time for local human interest feature news stories. Second, most people do not intently listen to the radio and are not likely to become actively engaged in your story. This means they are less likely to take action based on a story they hear on the radio than they would when reading it in a newspaper. Finally, unlike a newspaper, your story will only be heard if the person is listening to the radio at the time your story is aired.
If you decide to try promoting organ donation on the radio, the best list of radio stations in the US and Canada is Radio Locator. For radio stations outside these two countries, try Radio Station World.
Television – Occasionally, I see stories featuring a patient searching for a donor on the local TV news. However, I personally have not had any luck getting local station to carry a patient’s story. Instead, TV news stories are more likely to cover a successful transplant after the fact, especially one with unusual circumstances. Still, if you want to contact a TV news editor, a list is available at USNPL. Many local TV news organizations have a dedicated health editor.
Pitching the story
When describing a story idea to the news editor, you want to clearly explain why your situation will be of interest to the audience. Providing some of the following facts about kidney disease and kidney transplant will help sell the story.
- Kidney transplants are complex surgery, but frequently performed. Give name of hospital where you are listed as a transplant patient
- There are a lot of people in the community who are waiting for a transplant. Give number of people in your state waiting for a deceased donor kidney transplant (the data is available at http://optn.transplant.hrsa.gov/latestData/stateData.asp?type=state)
- These patients wait a long time for a transplant. The average wait time for a transplant from a deceased donor depends on location, blood type, and other factors. For patient in California with O blood type, the wait can be over 8 years. Many people die while waiting and never get a transplant
- There is a shortage of deceased donor kidneys. Finding a live donor helps reduce the shortage. It also leads to better medical outcomes for the patient
If you can tie your story in as part of a bigger story on a timely event such as World Kidney Day (March) or National Organ Donation Month (April), it may have a greater chance of getting covered.
If you are unsuccessful in getting an editor interested in running a story about your donor search, there is still another opportunity. You can submit a letter to the editor to be published in the newspaper. For details see this Jul 2013 post.
Preparing for an interview
Once your story is accepted, you will want to prepare to be interviewed by a reporter. You should be prepared to discuss the following details:
- How has kidney disease affected your life and your family. If you are on dialysis, describe your routine
- Explain why you are seeking a live donor, mention that any person who volunteers to donate a kidney may save a life
- Provide names and contact information for other people who the reporter may interview. (Remember to get permission first.) These may include:
- The living donor advocate at the hospital where you are listed. This person can talk about the donor evaluation process
- A previous transplant patient who can talk about the change in quality of life post-transplant
- A previous donor who can talk about the donation experience and quality of life post-donation
In addition to preparing your interview points, arrange with the newspaper to have them send a photographer to take your picture.
Some smaller publications may not have a reporter or photographer available to write a story. In this case, you will need to write it yourself, or find somebody who can write it for you. A college journalism student may be available to help you. Similarly, you will need to provide your own professional quality photograph.
A good example of a patient story appears in Queen Anne News and Magnolia News Mar 2013. The story features Sandra Driscoll, a retired attorney and a dialysis patient at Northwest Kidney Centers. A couple of screen shots are shown below.
Good example of a kidney donor search story. Newspaper flag and story screenshot from Queen Anne News and Magnolia News
Thanks to Sandra Driscoll for her diligent efforts and initiative in getting her story published and making her neighbors aware of the need for live donors.
For more ideas on finding a donor, see my Kidney patient guide.
May 1, 2013
by George Taniwaki
I recently came across a fascinating article with the novel claim that life is older than the earth. The argument is based on a regression analysis that estimates the rate of increase in the maximum genomic complexity of living organisms over time. (Note, this argument only makes sense if you believe that the universe can be more than 5,000 years old, that genes mutate randomly and at a constant rate, that genetic changes are inherited and accumulate, and that mathematics can be used to explain how things work. Each of those assumptions can be argued separately, but that is beyond the scope of this blog post.)
The article entitled Life Before Earth was posted on arxiv.org in Mar 2013. The authors are Alexei Sharov a staff scientist at the National Institute on Aging and Richard Gordon, a theoretical biologist at the Gulf Specimen Marine Laboratory.
They draw a log-linear plot of the number of base pairs in a selection of terrestrial organisms against the time when the organism first appeared on earth (see Fig 1). For instance, the simplest bacteria, called prokaryotes, have between 500,000 to 6 million base pairs in their genome and are believed to have first appeared on earth about 3.5 billion years ago. At the other extreme, mammals including humans, have between about 2.7 billion to 3.2 billion base pairs in their genome. The fossil record indicates the first mammals appeared about 225 million years ago, during the Triassic period. All other known organisms can be plotted on these axes and the trend appear linear, meaning the growth in genome complexity is nearly exponential.
Extrapolating the data back in time, one can estimate when the maximum complexity was only one base pair. That is, the date when the first protoörganisms formed. The trend line indicates this occurred 9.7 billion years ago, or about 4 billion years after the big bang.
Figure 1. The growth in maximum base pair count per genome seems to grow exponentially over time. Image from arxiv.org
The earth is estimated to be only 4.5 billion years old. Thus, if these results are accepted, the implications are pretty astounding.
1. Life did not start on earth. It started somewhere else in the galaxy and reached the microörganism stage. Through some cosmic explosion, the life was transported here. Alternatively, life started on one of the planets around the star that went supernova before collapsing and forming our present-day sun. This hypothesis is called exogenesis
2. It is unlikely that these alien microörganisms only landed on earth as our solar system formed. They probably coated every asteroid, comet, planet, and moon in our solar system. They may still be alive in many locations and are either evolving or dormant
3. If all of the microörganisms that reached our solar system came from the same source, they likely have the same genetic structure. That is, if we find life elsewhere in our solar system, it is likely to contain right-handed double helix of DNA using the same four left-handed amino acid base pairs as life on earth. With effort, we could construct an evolutionary tree that contains these organisms
4. In fact, the same microörganisms may be very common throughout the galaxy, meaning life has arrived on many other planets, or perhaps every planet in our galaxy, even ones with no star, a hypothesis called panspermia
5. It solves Fermi’s paradox. In 1950, Enrico Fermi noted that our Sun is a young star and that there are billions of stars in our galaxy billions of years older. Why haven’t we already been contacted by intelligent life from other planets? The answer based on this analysis is because intelligent life takes 9.7 billion years to form and we may be one of the first organisms to reach the level of intelligence necessary to achieve intentional interstellar communication and travel. Ironically, if Sharov and Gordon are right, unintentional interstellar travel is already quite common and has been for billions of years.
Relationship to Moore’s Law
If the exponential growth of complexity shown in Figure 1 above looks familiar, it is because it is the same shape as the increase in the number of transistors in microprocessor chips over time, a relationship called Moore’s Law. The authors cite this analogy as a possible argument in favor of their case.
Figure 2. The growth in maximum transistor count per processor has grown exponentially over time. Image from Wikipedia
Is this reasonable?
Like I said, this is a fascinating article. But it is all speculation. We have no direct evidence of many of the claims and inferences made in this paper. Specifically, we don’t know:
- The exact size of the genome that various organisms had in the earth’s past
- The nature of possible organisms less complex than prokaryotes
- The existence of any alien microörganisms or evidence that any landed on early earth
- The speed of genetic complexity changes in the early earth environment, or on other planetary environments in the case of the alien microörganisms prior to arrival on earth
- Whether any modern earth organisms, or any potential alien microörganisms, could withstand the rigors of travel through space for the millions of years it would take to get to earth from another star system
Finally, we have no clear explanation why the rate of change in genome complexity should be exponential. The use of the Moore’s Law chart to show that exponential growth in complexity is reasonable is slightly disingenuous. Moore’s Law is generally used as a forecast for the future growth in complexity for a commercial product based on historical data. Further, the forecast is used to estimate product demand, research costs, and necessary production investment, all of which tends to drive advancements and make the prediction self-fulfilling.
On the other hand, genome complexity is not directed. Evolution is a random process that will generate greater complexity only if a new, more complex organism can take advantage of an ecological niche that cannot be exploited by simpler organisms. Nothing is driving greater genome complexity.
Anyway, this is a very controversial theory. But I believe it may lead to new insights regarding microbiology, astrobiology, molecular clock hypothesis, and the use of mathematical models in evolutionary biology.
How long is 13.7 billion years?
As a side note, sometimes we wonder, how could something as complex as DNA and cellular organisms have started from nothing? It seems impossible to comprehend. But if you take a look at Figure 1, you will see that it may have taken over six billion years for a single base pair of DNA to grow in complexity to form an organism that we think of as a simple, primitive prokaryote. Then it took another 3.5 billion years before mammals appeared. Then it only took 200 million more years before our human ancestors appeared. And finally only a few hundred thousand years passed before you and I were born.
To give you a feel for how long 13.7 billion years is, watch this extremely boring YouTube video that compresses each billion years into one minute increments.
Figure 3. Age of Universe, boring, even with music. Video still from Craig Hall
A final thought to close this blog post, there may be aliens living on earth, but don’t be afraid, because it’s us.