Step 4: Draw a picture!

Here I've shown a CD-R with a picture of two people kissing burned on it. It's a little hard to discern because I haven't completely calibrated this CD-R yet.
<p>That sounds amazing. The fact the people figure out how to do some things are sometimes more fascinating than the projects themselves.</p>
<p>This sounds like a very fascinating project.</p><p>If I could find out details about how DVD data is written, i could probably hack out something in Python that will convert an image to a data file that can be written to a DVD, since a DVD might give better resolution than a CD (my excuse is i got a bunch of blank DVDs on hand but no CDs). I would love to see this project pursued more.</p>
really nice
with this thingy, can you still burn normal files to the disk? <br>Thanks
i'd love to see this project come out of beta, it's a genius idea
nice idea.....
HIIIIIIIIIIIIIIII, I found something cool out i dont know how it works though or how you would use it. 1. in microsoft paint make an image you like 2. save it to desktop 3. go to note pad 4. go to open and click all files then find and open it 5. it should come out in a very long pattern with a lot of y's 6. figure out some way to write that to the cd I cant really do this so if someone could please post a "REPLY" to this comment!! thanks!! - ;)
interesting....save as .dat....then burn as data cd with nero.interesting.
What you saw in MS Paint is just notepad trying to read what is really a series of hexadecimal numbers, for example:<br/>if FF is white, 00 is black, and 01 means to go to the next line,<br/>FF00FF0100FF00010000000100FF00<br/>represents a small image of the letter A. This only indicates lines of black and white, so what you see here is already being used by the program.<br/><br/>P.S. That string of numbers works as follows:<br/>FF00FF0100FF00010000000100FF00<br/>which becomes this when splitting bytes apart with spaces:<br/>FF 00 FF 01 00 FF 00 01 00 00 00 01 00 FF 00<br/>then, converting 01 to a new line, 00 to #, and FF to a space:<br/><pre> # # ##### #</pre>and you should be able to read the letter in that.<br/>
I am from England, I have ordered a bag from brandbagsales.com. When I receive the product. I find it is not the color I like.They change the bag for me immediately for free. The service is very good.
TUTORIAL ON HOW TO CONVERT MATLAB TO EXE http://www.onecore.net/howtocreate-standalone-executable-for-matlab-file.htm
if you ever got this algorithm down, you probably could make the whole disk an image - you would need to calculate the write pitch, the spacing, and the rough location of every bit on the disk, but it would be possible. I guess you'd have to look at how the FAT writes everything to the disk, each bit position on the disk could potentially be a pixel. Sounds like a lot of work, but it could be cool if you could get it to work.
CDs don't use FAT, the youse ISO 9660, more commonly known as CDFS
ok i have all the codes i got matlab, and i have my monochrome image with the right dimensions, what do i do with the image? dont i have to put a link to it somewhere?? im so confused
How can I get this to work with octave? I don't and never will own Matlab, so I need to run it in octave, anyone know how? Or maybe it could be rewritten in C?
Figured it out, but it doesn't work:<br/><br/>octave:1&gt; img2cd('logo.gif')<br/>n128sec = 1<br/>error: invalid row index = 83<br/>error: invalid column index = 142<br/>error: evaluating binary operator `&lt;' near line 176, column 25<br/>error: if: error evaluating conditional expression<br/>error: evaluating if command near line 176, column 5<br/>error: evaluating for command near line 174, column 3<br/>error: evaluating for command near line 156, column 1<br/>error: called from `img2cd' in file `/home/pabs/img2cd.m'<br/><br/>Any idea how to fix this?<br/>
In octave try:<br/><br/>octave:1&gt; img = imread('sohv.jpg')<br/>octave:2&gt; img2cd(img)<br/><br/>Regards<br/>JB<br/>
does it work
can someone help me? can this be done with a normal dvd burner? how do i run the software?
i just want to know if there is anywhere that i can download the software used to do this
&gt;&gt; Important &lt;&lt;<br/><br/>Talking about a C/C++ ver, this code is easy to read and understand to a c++ programer(noob or pro!). It would be easy to convert it.(open in free SCITE to read it first!)<br/><br/>C++ Code simplified (I am a noob at C!)<br/><br/>&lt; Start &gt;<br/><br/>/* Simple C++ code convertion for matlab code */<br/><br/>/*<br/><br/> This is the base of the C code you would need. You would have to xor the data. Note: Looked for C++ BITXOR/XOR function but could not find any!<br/> <br/> &quot;this sequence of bytes is xored with the bytes of sector to &quot;scramble&quot; the data&quot; --matlab code<br/> <br/> Then setup the calabration for the type or brand of CD used. Get the center radius and other things. The comments were not clear in the program!<br/> <br/> There was picture adjustment code to make the picture as it was on the computer screen.<br/> <br/> &quot;i came up with these fudge factors to attempt to straighten my picture. they work OK for my CD-Rs.they probably won't work for yours&quot; --matlab code<br/> <br/> Then write the image to 1/0 bits as a file. The matlab code tried to write at 128 sectors( A second?)<br/> <br/> &gt;&gt;&gt;&gt;&gt; NOTE: Most of the code in the MATLAB is math! The C++ code would be much better to read and less lines! &lt;&lt;&lt;&lt;&lt;<br/><br/>*/<br/><br/>#include &lt;stdio.h&gt;<br/><br/>int main ()<br/>{<br/> FILE * CDfile;<br/> /* First lines of the MATLAB code I can't get about the Xor :( */<br/> char code[] = { The Code };<br/> /* <sup>State the variable || (Below) open the file on the CD to be writen to. */</sup><br/> CDfile = fopen ( &quot;f:/temp/CDHOLOGRAM.data&quot; , &quot;wb&quot; );<br/> /* Write the data (file) to the CD */<br/> fwrite (code , 1 , sizeof(code) , CDfile );<br/> /* <br/> <br/> Sorry! I don't know how to write it to the CD (fwrite?). . Close the file (below code).<br/> <br/> */<br/> fclose (CDfile);<br/> return 0;<br/>}<br/><br/>/* This takes much more time to read, then to load <a rel="nofollow" href="http://www.3-z.net">http://www.3-z.net</a> (My website) ! */<br/><br/>&lt; End &gt;<br/><br/>I hope that C++ pro will take this on!<br/>
My God! Long time... This project is Abadonned! Was a good idea, not good instructions, but really good proj...*
i dont know where to get cdrecord from, can anyone give me a link?
I know that photographing a CD surface probably is tricky, but couldn't you try to take better photos? It is almost impossible to see anything on those. I haven't tried to download those files yet, but do we need both C compiler and MatLab/Octave to make this? Or just C would be enough? What tools are needed? (I guess most of these questions will be answered whenever this instructable leaves the beta stage)
umm noob question but how do i save these or what ever it just redirects me to som crazy html doc when i click
you sould make a c++ version!!!
<pre> </pre>
Well, I'm new on C language. Dev-cpp:<br/><br/>error: syntax error before '=' token<br/>img2cd.c:7:1: warning: &quot;RAND_MAX&quot; redefined<br/>In file included from img2cd.c:3:<br/>stdlib.h:29:1: warning: this is the location of the previous definition<br/>img2cd.c: In function `main':<br/>img2cd.c:53: error: `PICTURE_X' undeclared (first use in this function)<br/>error: `PICTURE_Y' undeclared (first use in this function)<br/><br/>error: `f1tof2Frame' undeclared (first use in this function)<br/><br/>GOD!<br/>At last... Have I to put something after {(at the end)?<br/><br/>static unsigned char picture[PIC_HEIGHT][PIC_WIDTH] = {<br/><br/>Don't kill me XD<br/>
And I haven't got a copy of MATLAB... And won't... Is there another way i can do it? It looks SUPER-DUPER cool, and i'd LOVE to be able to do it... :) If someone has a suggested way that i could do it without having to buy software, that'd be GREAT! Mitch
If the Matlab code is pretty generic, it might work in Octave, which is the open source project to handle much of what Matlab does. IIRC, you can get octave for Win32, Linux, and Mac.
It's called <a rel="nofollow" href="http://www.lightscribe.com/">Lightscribe</a>.<br/>A lot of CD/DVD burners nowadays have the ability.<br/>
Light scribe burns the other side of the CD. You are writing the data side when you use this method. When you use lightscribe, you use the label side :)
Hope this helps with the hologram on a disk dream....but heres a link to a synthetic hologram maker program in Java....don't know if it works, but apparently you can get some basic results using 600dpi transparencies....surely a CD can give higher resolution.<br/><a rel="nofollow" href="http://www.medcosm.com/prog_CGHmaker.htm">http://www.medcosm.com/prog_CGHmaker.htm</a><br/>
There is a method for making holograms either by hand or <br/>mechanically, at amasci.com or google &quot;hand-drawn holograms&quot;,<br/>and also some instructables on it. If you can do the math AND <br/>burn the curves with this instructable's way, you can Make all the<br/>holograms you want.<br/><br/>Suggestions: Holographic and/or digital sundial CD! <br/>or, CD clock with 3D numbers and hands, using a quartz movement.<br/><br/>WIth c being enough points between 0 and 2 x pi, and radius r<br/>x= r cos(c) ; y=r sin(c) makes circular fresnel curves, <br/>and r determines the depth or projection distance of the image.<br/>This then has to be remapped onto the CD using similar math,<br/>converting voxel coordinates to pits bit and byte addresses.<br/><br/>A second conversion is needed to try to find the tracks and bytes<br/>of every hologram pit burnt on the surface of the disc relative<br/>to the center, using polar coordinates instead of x,y.<br/><br/>&quot;for&quot; all x and y that x2+y2=r2 is the pythagorean theorem way <br/>to do the same thing... both maths are useful for triangles and<br/>circles also. I hope you know a good geometry teacher if you<br/>need help.<br/><br/>Don't fear the math, it just does what you can easily do by hand <br/>with a coaster and a double pointed circle making compass,<br/>when you make &quot;hand drawn holograms&quot;. And if you can doodle <br/>a video game on graph paper, that's related too, to where your <br/>pixels are when you're laser burning your own hologram coaster.<br/>
Hey, Nice instructable mate. I'm having problems about the raw file system. Do I have to use a cd burning program like nero and burn the file as data or do i have to do otherwise? Thanks Reuben
I used cdrecord, which is freely available and open source.
Hi Argon, I'm working in a electronic experiment that needs to make a very accurate pits pattern on a cd, i run your matlab code, works fine! I will be very pleased if you post your new version code. Are you doing exactly that ECMA130 says? How did you made EFM code turn binary images? Thanks!
Hi, I'll post the updated code... but I haven't worked on this project in a while, so I don't remember what the c code's status is. I believe I'm doing exactly what ECMA130 says, but it's not the clearest standard in the world....
Any idea how to correct his error? I've never used MATLAB and I'm new to programming, so I'm a little lost. I figured out how to run the code and parse the input in, but I have no idea how to get around this error. I'm using a black and white, 142x83 JPG...<br/><br/>??? Attempted to access img(83,142); index out of bounds because size(img)=(1,9).<br/><br/>Error in ==&gt; img2cd at 176<br/> if img(ny(k), nx(k))&lt;128<br/>
Try, in this order, these two things: 1. Convert your image to a monochrome bitmap (BMP). You should be able to do this by opening the old image with MS Paint and "save as"-ing. It is unlikely that JPEG compression is built into the program. 2. The error message seems to indicate that the image may be too big, so try reducing the size of the image.
no it's the beegee's!
hey argon!!! well, i am not able to understand... can you please send me the images that you created??? if not, please give a little more details to me... regards, Avik www.techjugaad.com
How many tries has it taken people to get the images aligned properly?
"The most "raw" type of organization is known as "mode 2." Mode 2 does away with many of the nice things about CDs like error correction, but it gives us the most control over the bits. In a mode 2 sector, the first 12 bytes contain "syncing" data and the next 4 contain specific information about the sector. These bytes cannot be changed at the software level. (Maybe it is possible to write a driver that could change these?) The next 2336 bytes are free to be anything though. If this were all that happened to the data, our job would be easy. Unfortunately, there's a lot more data manipulation before the data actually gets written to the CD." If I am not mistaken, most newer CD-R burners have a "RAW" mode that allows full control over the whole 2352 byte sector, and in some cases even the 96 byte subchannel code.
Hello I'm using Matlab 7.1. <br/><br/>when i try to run img2cd i get:<br/><br/>EDU&gt;&gt; img2cd<br/><br/>n128sec =<br/><br/> 1<br/><br/>??? Input argument &quot;img&quot; is undefined.<br/><br/>Error in ==&gt; img2cd at 176<br/> if img(ny(k), nx(k))&lt;128<br/>
i dont know if it works eather so be willing to waste a cd... for the greater good...
Man!! Sweet!! this is very cool. But is there a way i could do it ""in the easy"" (i have basic programming skills :-( )
Is this how Sony get the logos on the data side of thier PS2 game discs? Pete
No they buy the cds with serial numbers, and bladebla on them. :-)

About This Instructable


126 favorites


More by argon: Installing a new water pump on a '95 Ford Taurus Burning visible images onto CD-Rs with data (beta) Two-speed bike without a gear shifter
Add instructable to: