For leading a pretty fortunate life, I still seem to find an awful lot to complain about :-)
"Logic merely sanctions the conquests of the intuition." --Jacques
Hadamard (quoted in
this article about math education).
I both agree and disagree with the article, but agree 100% with Hadamard.
High school math class focuses on applying
tried-and-true processes to pure abstractions: long division, solving
equations, rules of differentiation and integration. If a kid struggles
with these tedious, mindless, and mechanical operations, they are
pronounced to be "bad at math".
But, who in the world (short of a few
number theorists and mathematical software and hardware developers)
really cares about knowing how to do these? Almost every kid now has a
cell phone that possesses enough processing power to do thousands of
these operations accurately and within milliseconds.
In many engineering and scientific domains, it is indeed a little important to
know the mechanics of integration, but it is much more important to know when
to use integration, what to provide as input, and how to interpret the results. I felt my college-level math classes did a good job of addressing these questions.
College math also taught me the following: estimating the error in the measurement of initial values; how to determine the sensitivity of a calculation's result from error in initial values; how to determine sensitivity introduced by a particular algorithm that is used to implement the calculation, because of the
finite-precision of the operations; and how to use all
these factors to determine the accuracy of the final result.
What it didn't teach, and I wish it had, is: how to derive a model that describes a system; how to concretely formulate a problem and understand what I am trying to solve; how to accurately gauge what assumptions I'm making about a system based on my model; and how to
discard terms in my model and simplify a calculation, without significantly comprising the accuracy
of the solution I'm seeking. For that matter, how do I know what constitutes a significant compromise of accuracy?
This is not a flower, it's really a llama
Showing posts with label Math and Computers. Show all posts
Showing posts with label Math and Computers. Show all posts
Wednesday, May 23, 2012
Thursday, May 10, 2012
I wish I had this music application
I've been struggling to learn to play the keyboards. It'd be nice to have an application that could help me.
Ideally, the application would allow a user to select from a set of preloaded songs, or to point her device's camera at sheet notes for a song that she'd like to learn. She would then be able to view the digitized version of the sheet notes and select and play segments of the song through the device's audio synthesizer.
The application should also be able to "listen" to her play the song on keyboards, via the device's microphone, and offer feedback. The parts of learning a song that I struggle with are: where to place my fingers, when to strike the keys, and how long to hold each note (basically, everything!)
The application would provide a visual guide of the keyboard and how to place the fingers to play a certain note. It would wait for the user to play each note correctly before moving onto the next note, in this mode.
Another mode would help with pacing. The application could provide a visual representation of the ideal tone - with a rising edge, pulse, and falling edge - along with a visual representation of the tone that the user actually produced. This visual information would hopefully allow the user to correct the timing - when to strike the key and when to release it. Ideally, if this is done for a set of notes, the user would hopefully get a better sense of beat.
I've heard that many neural pathways are formed when a person learns a musical instrument. I wish I knew something about how the human mind and how it changes when a person learns musical instruments. I am not sure if such an application would be helpful in forming the correct pathways, or in long-term learning.
Ideally, the application would allow a user to select from a set of preloaded songs, or to point her device's camera at sheet notes for a song that she'd like to learn. She would then be able to view the digitized version of the sheet notes and select and play segments of the song through the device's audio synthesizer.
The application should also be able to "listen" to her play the song on keyboards, via the device's microphone, and offer feedback. The parts of learning a song that I struggle with are: where to place my fingers, when to strike the keys, and how long to hold each note (basically, everything!)
The application would provide a visual guide of the keyboard and how to place the fingers to play a certain note. It would wait for the user to play each note correctly before moving onto the next note, in this mode.
Another mode would help with pacing. The application could provide a visual representation of the ideal tone - with a rising edge, pulse, and falling edge - along with a visual representation of the tone that the user actually produced. This visual information would hopefully allow the user to correct the timing - when to strike the key and when to release it. Ideally, if this is done for a set of notes, the user would hopefully get a better sense of beat.
I've heard that many neural pathways are formed when a person learns a musical instrument. I wish I knew something about how the human mind and how it changes when a person learns musical instruments. I am not sure if such an application would be helpful in forming the correct pathways, or in long-term learning.
Monday, April 30, 2012
Direct3D applications and API implementations
On almost all modern-day computers, tablets, and phones,
computer graphics calculations are done on a separate processor – the
GPU, or graphics processing unit – which frees up the main processor
(CPU) for other work.
A graphics application runs on the CPU, typically in a user process, and makes calls to the Direct3D or OpenGL APIs. These are the two most widely used low-level 3D graphics APIs. Both are documented extensively.
In the case of Direct3D, the API methods are implemented by a Direct3D user-mode runtime, which runs synchronously in the application’s process. The Direct3D user-mode runtime calls a GPU- and CPU-specific user-mode driver, which translates each Direct3D API call into a command packet that the GPU can interpret. When the graphics application calls the DXGI Present method, all the command packets are passed by the Direct3D user-mode runtime to the DirectX graphics kernel, which passes it to a GPU- and CPU-specific kernel-mode driver. The kernel-mode driver updates the command packets by replacing the virtual addresses of buffers and textures with physical addresses. It places the updated command packets into a memory location that is accessible by the GPU. It sets GPU registers and clocks as necessary, to indicate that new command packets are ready, and that the GPU must process them. The GPU processes the command packets, and updates the framebuffer – this is a section of GPU-accessible memory that contains the color value for each pixel. It is also known as the back color buffer. The GPU notifies the kernel-mode driver when it is done rendering, so that the kernel-mode driver can indicate to the display hardware that the framebuffer is ready to be blitted to the display.
A graphics application runs on the CPU, typically in a user process, and makes calls to the Direct3D or OpenGL APIs. These are the two most widely used low-level 3D graphics APIs. Both are documented extensively.
In the case of Direct3D, the API methods are implemented by a Direct3D user-mode runtime, which runs synchronously in the application’s process. The Direct3D user-mode runtime calls a GPU- and CPU-specific user-mode driver, which translates each Direct3D API call into a command packet that the GPU can interpret. When the graphics application calls the DXGI Present method, all the command packets are passed by the Direct3D user-mode runtime to the DirectX graphics kernel, which passes it to a GPU- and CPU-specific kernel-mode driver. The kernel-mode driver updates the command packets by replacing the virtual addresses of buffers and textures with physical addresses. It places the updated command packets into a memory location that is accessible by the GPU. It sets GPU registers and clocks as necessary, to indicate that new command packets are ready, and that the GPU must process them. The GPU processes the command packets, and updates the framebuffer – this is a section of GPU-accessible memory that contains the color value for each pixel. It is also known as the back color buffer. The GPU notifies the kernel-mode driver when it is done rendering, so that the kernel-mode driver can indicate to the display hardware that the framebuffer is ready to be blitted to the display.
Graphics and performance analysis
Computer graphics involves art and math. A three-dimensional model (the art) was rendered (the math) into this image.
Wikipedia contains an excellent article on rendering. Here are a few highlights.
A polyhedron is a finite approximation of a surface. Computer graphics uses 3D triangle meshes.
A window is a rectangular section of a display screen, and is represented (sampled) by an array of finite-sized pixels, each of has a color value that is represented by a finite number, quantized from some color-space.
Rendering is done in three major steps:
* The polyhedra are transformed and projected into an image-space
* Each triangle of each polyhedron is rasterized – that is, a calculation is done to determine which pixels in the window lie within the bounds of the triangle in image-space
* The color value is calculated for each pixel, using interpolated values from the three vertices of the triangle that the pixel lies within
For a large model, this math takes a lot of computational power. Graphics performance analysis is an attempt to make the computer perform the math fast. If the math can be done faster than the vertical-sync rate of the display hardware (usually 30 or 60 frames per second), then the graphics run in real-time.
On mobile and lightweight devices, the graphics not only need to be fast, but also use low-power and low-memory.
Wikipedia contains an excellent article on rendering. Here are a few highlights.
A polyhedron is a finite approximation of a surface. Computer graphics uses 3D triangle meshes.
A window is a rectangular section of a display screen, and is represented (sampled) by an array of finite-sized pixels, each of has a color value that is represented by a finite number, quantized from some color-space.
Rendering is done in three major steps:
* The polyhedra are transformed and projected into an image-space
* Each triangle of each polyhedron is rasterized – that is, a calculation is done to determine which pixels in the window lie within the bounds of the triangle in image-space
* The color value is calculated for each pixel, using interpolated values from the three vertices of the triangle that the pixel lies within
For a large model, this math takes a lot of computational power. Graphics performance analysis is an attempt to make the computer perform the math fast. If the math can be done faster than the vertical-sync rate of the display hardware (usually 30 or 60 frames per second), then the graphics run in real-time.
On mobile and lightweight devices, the graphics not only need to be fast, but also use low-power and low-memory.
Friday, December 9, 2011
Alright, I'm waxing nerdy again... Here's a really useful Learning C++ blog - I came across it trying to understand "cv-qualifier". It covers a lot of intermediate C++ topics, which is nice! It always seems that most of the information on the web on any given topic is either super-introductory or super-advanced. It is rare and a pleasant surprise to find something in the middle.
Thursday, August 11, 2011
Tuesday, June 28, 2011
CVPR Conference
CVPR is an annual conference in computer vision. Experts and enthusiasts from industry and academics get together to review state-of-the-art techniques for estimating human pose, reconstructing 3D structure, and classifying people and objects based on color, intensity, and depth images. Many techniques are based on principles in artificial intelligence and single- and multiple-view geometry. The conference offered all-day workshops on particular fields, oral paper presentations, poster presentations, a demo booth, and exhibitors.
This year, the conference was conveniently located in Colorado Springs, so I went with a fellow student and our adviser. The information was overwhelming for me, but there are a few highlights that I really enjoyed that I'd like to share with you.
1. NVidia, which makes high-end graphics cards, announced that it had implemented OpenCV on Android platform and had accelerated most of it on its Tegra2 platform. OpenCV is a library, similar to OpenGL, for computer vision. Almost everyone in the field uses it, with the exception of a few who use Matlab instead. Android is the Google operating system for mobile devices, such as phones and tablets. It is Java-based. For last semester's Computer Graphics homework assignment, I had tried writing an application in Android with OpenCV, and had failed miserably. I had tried four different approaches that all led to dead-ends ranging from build dependency errors to compilation errors to link errors to methods that simply did nothing when called. I had also tried to use OpenGL shaders to accelerate a few OpenCV methods. So, I am really excited about NVidia's announcement, and will enjoy trying it out, if I ever get a hold of an Android tablet with Tegra2 card.
2. Demonstration of Nao - a robot with high DOF mechanical arms and legs and big, bambi-like eyes. The exhibitor had a small red ball that he would throw on a table. Nao would be able to "see" the ball and go after it. It was really impressive to watch. It looked like Nao had some other problems though - he wasn't good with voice commands yet. After issuing a voice command, the exhibitor often had to thump Nao on the head several times before he responded. Also, after a while, the exhibitor had to plug Nao in - apparently, he had a battery life of 1.5 hours.
3. Michael Black's keynote speech on understanding human activity, and the entire workshop on human activity. This requires a post to itself, so that will follow.
4. Often, when I read papers, there are certain points or terms in equations that I don't understand, or questions I have about potential applications and extensions of the work. Those questions tend to go unanswered. So, in preparation for the conference, I tried to select, in advance, all the paper presentations I wanted to attend so I could get familiar with them beforehand. There ended up being 40+ that I was interested in, but I didn't have time to read so much, so I picked four to print out and read. Of these, I ended up reading only one. I had two questions about it after reading it, and was very thrilled to be able to talk to the author in-person and get them both answered. So, finally I can claim there is one paper out there that I feel I understand totally.
This year, the conference was conveniently located in Colorado Springs, so I went with a fellow student and our adviser. The information was overwhelming for me, but there are a few highlights that I really enjoyed that I'd like to share with you.
1. NVidia, which makes high-end graphics cards, announced that it had implemented OpenCV on Android platform and had accelerated most of it on its Tegra2 platform. OpenCV is a library, similar to OpenGL, for computer vision. Almost everyone in the field uses it, with the exception of a few who use Matlab instead. Android is the Google operating system for mobile devices, such as phones and tablets. It is Java-based. For last semester's Computer Graphics homework assignment, I had tried writing an application in Android with OpenCV, and had failed miserably. I had tried four different approaches that all led to dead-ends ranging from build dependency errors to compilation errors to link errors to methods that simply did nothing when called. I had also tried to use OpenGL shaders to accelerate a few OpenCV methods. So, I am really excited about NVidia's announcement, and will enjoy trying it out, if I ever get a hold of an Android tablet with Tegra2 card.
2. Demonstration of Nao - a robot with high DOF mechanical arms and legs and big, bambi-like eyes. The exhibitor had a small red ball that he would throw on a table. Nao would be able to "see" the ball and go after it. It was really impressive to watch. It looked like Nao had some other problems though - he wasn't good with voice commands yet. After issuing a voice command, the exhibitor often had to thump Nao on the head several times before he responded. Also, after a while, the exhibitor had to plug Nao in - apparently, he had a battery life of 1.5 hours.
3. Michael Black's keynote speech on understanding human activity, and the entire workshop on human activity. This requires a post to itself, so that will follow.
4. Often, when I read papers, there are certain points or terms in equations that I don't understand, or questions I have about potential applications and extensions of the work. Those questions tend to go unanswered. So, in preparation for the conference, I tried to select, in advance, all the paper presentations I wanted to attend so I could get familiar with them beforehand. There ended up being 40+ that I was interested in, but I didn't have time to read so much, so I picked four to print out and read. Of these, I ended up reading only one. I had two questions about it after reading it, and was very thrilled to be able to talk to the author in-person and get them both answered. So, finally I can claim there is one paper out there that I feel I understand totally.
Monday, March 7, 2011
Thoughts
Computer vision is the art of making a computer recognize the contents of a digital photo or video.
The human eye and mind are remarkably adept at interpreting incoming patterns of light. In seconds, the brain analyzes complex scenes, extracts essential information, synthesizes it with other stored information, and interprets and comprehends the surrounding world. Here is an article on the preliminary processing that the brain performs with visual information.
In order to perform what the eye and mind do, a computer program extracts edges (rapid changes in light intensity in a particular direction), feature points, and primitive polygons from an image. It compares the extracted edges, points and polygons against models it has, and makes a probabilistic rationalization about which model the image contains and the parameters of the model.
Both the mind and computer are solving ambiguous, poorly defined systems. When light reflects off of objects in our 3D world, it enters our eyes as a 2D map of light intensities and colors coming from different directions. There are infinitely many worlds that can result in the same map, but our brain assumes the most logical world - straight lines, perpendicular angles, etc. Computer vision attempts to make the computer also assume the most logical world, by adding mathematical constraints that represent the likelihood of a logical world.
The human eye and mind are remarkably adept at interpreting incoming patterns of light. In seconds, the brain analyzes complex scenes, extracts essential information, synthesizes it with other stored information, and interprets and comprehends the surrounding world. Here is an article on the preliminary processing that the brain performs with visual information.
In order to perform what the eye and mind do, a computer program extracts edges (rapid changes in light intensity in a particular direction), feature points, and primitive polygons from an image. It compares the extracted edges, points and polygons against models it has, and makes a probabilistic rationalization about which model the image contains and the parameters of the model.
Both the mind and computer are solving ambiguous, poorly defined systems. When light reflects off of objects in our 3D world, it enters our eyes as a 2D map of light intensities and colors coming from different directions. There are infinitely many worlds that can result in the same map, but our brain assumes the most logical world - straight lines, perpendicular angles, etc. Computer vision attempts to make the computer also assume the most logical world, by adding mathematical constraints that represent the likelihood of a logical world.
Friday, September 10, 2010
Sorry if this is a nerdy thing to say, but I love the first homework assignment in my Computer Vision class :-D Check it out here: http://ia.cs.colorado.edu/~jane/cs5722/asgn1.html. The paper on the link is the very first academic paper that I have been able to read and somewhat understand, so I must be learning, right? I love this class and the phd program. I am so happy!
Monday, August 9, 2010
Sunday, August 8, 2010
Awesome use of technology
Yay! This article makes me very happy: http://animals.change.org/blog/view/new_system_may_replace_lab_rats_with_robots
Wednesday, January 13, 2010
Wow
Algorithms class is phenomenal. It is completely (and unexpectedly) different from undergraduate algorithms. Each day, the professor presents us with a single problem, that seems deceptively simple, but takes hours and hours to think about! For example, he posed problems on finding a sorting algorithm and on finding a path-finding algorithm. In undergraduate, we dealt with sorting and path-finding algorithms, so we automatically recollect what we had learned about them. However, that information is totally useless for these new problems. For example, he asked us to find an algorithm that will take an arbitrary graph and a method G(x,y) that returns whether an edge exists between any two vertices in that path, and asked us to write a method P(x,y) that will return whether or not a path exists between any two vertices, and that consumes O(logn) of memory for an n-vertex graph. Neat, eh? :-)
The first day of class was a blast! Already the professor has given us so many new things to think about. Today I meet with my adviser, and our group for the first time, and attend the second class.
My husband and I are still jet-lagged and feel weird and out-of-sorts. Hopefully that will be over soon. It feels like I am not quite in reality. It is a very strange and unpleasant feeling.
My husband and I are still jet-lagged and feel weird and out-of-sorts. Hopefully that will be over soon. It feels like I am not quite in reality. It is a very strange and unpleasant feeling.
Saturday, July 11, 2009
Interesting articles about science and technology
These are some articles about cancer research and protein sequencing.
Also - here is some useful background information from Wikipedia: gene expression and cellular differentiation.
In a DNA sequence, very few of the nucleotides are expressed at a time (used in protein generation). The study of what influences which genes get expressed seems very interesting. Also interesting is the drastic effect that small changes (a single skipped nucleotide, a slight reordering of segment of nucleotides) can have. And the cell's mechanisms to detect and correct errors.
Interaction between virus and bacteria are also very interesting. A virus has genes, but no mechanism to express and replicate them. To do this, they need a host (like bacteria, plants, and animals). The virus breaks down the cellular membrane or wall and injects its DNA into the cell. Then the RNA and other cellular structures reproduce the virus' DNA and express the genes to form new virus-llama-beings. The amazing part is that the virus is somehow 'intelligent' enough to toggle how virulent it is. If it infects and kills too many hosts, it won't be able to optimally reproduce. So, it can somehow cause bacteria to incorporate the virus gene sequence into the bacteria gene sequence. And this can be very beneficial to the bacteria, because it introduces genetic diversity into the bacteria, and sometimes causes favorable mutations. This is maybe how new species of bacteria are formed. ANother way new species of bacteria arise are when two different species swap fragments of their gene sequences, and create two new sequences.
My husband's dad was explaining his work on atmospheric spectroscopy, and I think you may find it very interesting. To measure the composition of molecules int he atmosphere, they get air samples. Then they break apart the molecules, either by applying lots of energy, or by ionizing them - the excess electrons allow all the elements to have full valence electrons, and give them all negative charge, so that they break apart. Once the molecules are broken up into individual elements or smaller molecules, the process of spectroscopy will separate the types of elements and molecules. The weight of each element or small molecule in the groups can be determined by its posiiton. The atomic weight can then be used to uniquely identify the element or small molecule.
Image compression involves throwing away all redundant information. The higher frequency variations in an image are less recognizable by the human visual system. Sometimes, they are ignored to the extent that adding white noise to an image produces no noticeable effect. Because of this, a very efficient way to compress images is to transform it into a frequency domain (based on pixel intensity vs. spacial coordinates), then throw away or represent with coarser accuracy, the coefficients of the higher frequencies. When the reverse transformation is done during decoding, enough information is there to reconstruct a good-enough quality image. In video compression, the human visual system is not sensitive during significant changes in frames. So, if there is a sudden scene change, the frames directly before and after the change can be represented more coarsely, and can be more compressed.
Also - here is some useful background information from Wikipedia: gene expression and cellular differentiation.
In a DNA sequence, very few of the nucleotides are expressed at a time (used in protein generation). The study of what influences which genes get expressed seems very interesting. Also interesting is the drastic effect that small changes (a single skipped nucleotide, a slight reordering of segment of nucleotides) can have. And the cell's mechanisms to detect and correct errors.
Interaction between virus and bacteria are also very interesting. A virus has genes, but no mechanism to express and replicate them. To do this, they need a host (like bacteria, plants, and animals). The virus breaks down the cellular membrane or wall and injects its DNA into the cell. Then the RNA and other cellular structures reproduce the virus' DNA and express the genes to form new virus-llama-beings. The amazing part is that the virus is somehow 'intelligent' enough to toggle how virulent it is. If it infects and kills too many hosts, it won't be able to optimally reproduce. So, it can somehow cause bacteria to incorporate the virus gene sequence into the bacteria gene sequence. And this can be very beneficial to the bacteria, because it introduces genetic diversity into the bacteria, and sometimes causes favorable mutations. This is maybe how new species of bacteria are formed. ANother way new species of bacteria arise are when two different species swap fragments of their gene sequences, and create two new sequences.
My husband's dad was explaining his work on atmospheric spectroscopy, and I think you may find it very interesting. To measure the composition of molecules int he atmosphere, they get air samples. Then they break apart the molecules, either by applying lots of energy, or by ionizing them - the excess electrons allow all the elements to have full valence electrons, and give them all negative charge, so that they break apart. Once the molecules are broken up into individual elements or smaller molecules, the process of spectroscopy will separate the types of elements and molecules. The weight of each element or small molecule in the groups can be determined by its posiiton. The atomic weight can then be used to uniquely identify the element or small molecule.
Image compression involves throwing away all redundant information. The higher frequency variations in an image are less recognizable by the human visual system. Sometimes, they are ignored to the extent that adding white noise to an image produces no noticeable effect. Because of this, a very efficient way to compress images is to transform it into a frequency domain (based on pixel intensity vs. spacial coordinates), then throw away or represent with coarser accuracy, the coefficients of the higher frequencies. When the reverse transformation is done during decoding, enough information is there to reconstruct a good-enough quality image. In video compression, the human visual system is not sensitive during significant changes in frames. So, if there is a sudden scene change, the frames directly before and after the change can be represented more coarsely, and can be more compressed.
Monday, December 29, 2008
Gyroscopic motion
If someone pushes a still object, the object will move in the direction of the force. However, if someone pushes a spinning object, then the resultant motion will be the cross product of the axis of spin and the axis about which the force is applied.
Monday, October 27, 2008
Exciting new advancement in image processing
Traditionally, DCT (discrete cosine transform) or DWT (discrete wavelet transform) are applied to compact the signal energy of an image into a few coefficients. However, these algorithms may soon be replaced with an efficient new algorithm called DLT (discrete llama transform). The encoding transformation is e^((((a-ib+jc-kd)^llama)^llama)^llama). The inverse transformation can be obtained by placing one's left index finger in one's right ear, the right index finger in the left ear, and singing "la la la". This action will cause a heavenly llama to descend from the sky and whisper the inverse transformation to you. However, one must take care not to switch the ears - otherwise, a llama from the netherworld will ascend and pose as the heavenly llama, and misguide you by giving the inverse transformation of the theoretically sound but impractical Karhunen-Loeve transform.
Sunday, September 14, 2008
Salaam-E-Llama
Today, I get to learn about Lloyd-Max quantizers!
Quantization is the conversion of continuous output into discrete output by selecting a set of possible discrete output values, and rounding or truncating each actual value to one of the values in that set. (Mrs. Francon, please correct me if I'm wrong, since you're the quantization expert :-)).
Quantization is used in analog-to-digital signal conversion, and it is also used in image compression to achieve higher compression. Most image compression algorithms exploit statistical redundancy - pixels in an image usually have similar intensities to the surrounding pixels. And many pixels in the image have the same intensity.
Psychovisual redundancy takes this one step further - if the pixels with similar intensities in the image can all be replaced by pixels with one intensity (maybe the median of all the original intensities), and the change is subtle enough that it won't make much difference to the human eye, then much higher compression can be achieved. So, quantization is sometimes used to take the whole spectrum of pixel intensities in the image and replace it by a few representative pixel intensities. Interesting, eh?
I am very happy indeed, because my dad comes home today, and because I got to spend some time with my fiancee yesterday, the most wonderful llama on the Earth. And it's been raining for the past few days, which is always nice. Makes it feel like fall.
Quantization is the conversion of continuous output into discrete output by selecting a set of possible discrete output values, and rounding or truncating each actual value to one of the values in that set. (Mrs. Francon, please correct me if I'm wrong, since you're the quantization expert :-)).
Quantization is used in analog-to-digital signal conversion, and it is also used in image compression to achieve higher compression. Most image compression algorithms exploit statistical redundancy - pixels in an image usually have similar intensities to the surrounding pixels. And many pixels in the image have the same intensity.
Psychovisual redundancy takes this one step further - if the pixels with similar intensities in the image can all be replaced by pixels with one intensity (maybe the median of all the original intensities), and the change is subtle enough that it won't make much difference to the human eye, then much higher compression can be achieved. So, quantization is sometimes used to take the whole spectrum of pixel intensities in the image and replace it by a few representative pixel intensities. Interesting, eh?
I am very happy indeed, because my dad comes home today, and because I got to spend some time with my fiancee yesterday, the most wonderful llama on the Earth. And it's been raining for the past few days, which is always nice. Makes it feel like fall.
Thursday, August 28, 2008
Friday, March 14, 2008
Optical illusions
Try this one with a friend: Is this ballerina rotating clockwise or anti-clockwise? Does she ever change direction.
Another optical illusion with circles.
Rubik's Cube optical illusion from ukpuzzle: the 'orange' square in the center of the front face and the 'brown' square in the center of the top face are actually the same color.
Another optical illusion with circles.
Rubik's Cube optical illusion from ukpuzzle: the 'orange' square in the center of the front face and the 'brown' square in the center of the top face are actually the same color.
Thursday, February 28, 2008
Make tips
This is a bit of a nerdy post, but these are some useful makefile facts that might be helpful to you in the future!
1. Make uses pass-by-name conventions (sort-of)
For example, if you define:
A = foo
B = $(A)/llama
and later:
A = bar
and finally use the definitons:
echo $(B)
the output will be:
bar/llama
If you didn't know about the second setting of A (to bar), you might be surprised by the output, as I was.
2. If the vpath directive is used without a path, it will clear the vpath for the pattern.
For example, if you state:
vpath %.c foo/src
vpath %.c bar/src
and subsequently, state the following:
vpath %.c $(MY_NON_DEFINED_VAR)
or just:
vpath %.c
this will clear the vpath for the %.c pattern, so that make will not search for .c files in the foo/src or bar/src directories.
Interesting...
1. Make uses pass-by-name conventions (sort-of)
For example, if you define:
A = foo
B = $(A)/llama
and later:
A = bar
and finally use the definitons:
echo $(B)
the output will be:
bar/llama
If you didn't know about the second setting of A (to bar), you might be surprised by the output, as I was.
2. If the vpath directive is used without a path, it will clear the vpath for the pattern.
For example, if you state:
vpath %.c foo/src
vpath %.c bar/src
and subsequently, state the following:
vpath %.c $(MY_NON_DEFINED_VAR)
or just:
vpath %.c
this will clear the vpath for the %.c pattern, so that make will not search for .c files in the foo/src or bar/src directories.
Interesting...
Subscribe to:
Posts (Atom)
