Approve the Cookies
This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and our Privacy Policy.
OK
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Guest
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Register to forums    Log in

 
FORUMS Cameras, Lenses & Accessories Canon G-series Digital Cameras 
Thread started 23 Mar 2005 (Wednesday) 06:48
Search threadPrev/next
sponsored links (only for non-logged)

Canon RAW into ASCII

 
missa
Hatchling
2 posts
Joined Mar 2005
     
Mar 23, 2005 06:48 |  #1

Hi to all,
does somebody know is it possible (and how) to convert Canon G5 raw format photo into the ASCII file without loosing any information of each pixel? I want to process such photo as a worksheet of numbers.
Thanks,
Missa




  
  LOG IN TO REPLY
4nR
Senior Member
Avatar
689 posts
Joined Feb 2005
Location: A2, MI
     
Mar 23, 2005 07:20 |  #2

not sure i understand. do you want to see your image composed of letters and numbers (ascii art http://aa-project.sourceforge.ne​t/gallery/alfons.png (external link) ?) or you want to see the actual data that comprises your image?


A560 will have to do... for now :confused:

  
  LOG IN TO REPLY
lefturn99
Senior Member
Avatar
820 posts
Joined Feb 2005
Location: Tulsa Oklahoma USA
     
Mar 23, 2005 08:47 |  #3

I guess you could open it in Notepad, but I'm not sure why. There are some wonderful conversion apps out there. My favorite is RAW Shooter Essentials. Why reinvent the wheel?

Now if you mean you want the binary code straight fron the sensor, that's way beyond me.


6D, 5D Mk III, 60D, EOS M, Gear List

  
  LOG IN TO REPLY
missa
THREAD ­ STARTER
Hatchling
2 posts
Joined Mar 2005
     
Mar 24, 2005 01:18 as a reply to  @ 4nR's post |  #4

4nR wrote:
not sure i understand. do you want to see your image composed of letters and numbers (ascii art http://aa-project.sourceforge.ne​t/gallery/alfons.png (external link) ?) or you want to see the actual data that comprises your image?

Thank you for reply. Let me be more precise. I want to use my Canon G5 as detetector of spectra that I mesure. So I need all informations that pixels accept during exposure without any "ironing" such are TIFF or JPEG.




  
  LOG IN TO REPLY
Andy_T
Compensating for his small ... sensor
9,860 posts
Likes: 5
Joined Jan 2003
Location: Hannover Germany
     
Mar 24, 2005 03:40 |  #5

If you convert from RAW to 16 BIT TIFF, you will lose very little (no compression). Maybe a bit because of the (minimal) sharpening that you have to select, but certainly not as much as JPG.

Best regards,
Andy


some cameras, some lenses,
and still a lot of things to learn...
(so post processing examples on my images are welcome :D)
If you like the forum, vote for it where it really counts!
CLICK here for the EOS FAQ
CLICK here for the Post Processing FAQ
CLICK here to understand a bit more about BOKEH

  
  LOG IN TO REPLY
dbump
Senior Member
Avatar
755 posts
Joined Apr 2003
Location: Denver, CO
     
Mar 24, 2005 17:56 as a reply to  @ Andy_T's post |  #6

You might look at Canon's SDK, which will provide you with the format for the RAW data:
http://consumer.usa.ca​non.com …=222&modelid=92​13&id=3464 (external link)

The RD-SDK supports raw file conversion from compatible PowerShot cameras


That's probably non-trivial.
In a simlilar vein, you could convert the files to Adobe's DNG format, and get the specs on that from them, but it's the same programming challenge.

If you set a custom white balance with each shot (or each lighting environment) and convert the Raw to TIFF, as Andy suggests, using the 'as-shot' white balance, the color rendition should be accurate.

Also, depending on what wavelengths you're after, you might look at removing the hot mirror on the G5, which cuts out the IR range. Search here for 'IR photography' for a number of threads on modifying the camera.


7D, G10, 17-55 f/2.8 IS, 70-200 f/2.8 IS, 100 Macro, 50 f/1.4, 430EX II
There are no wrong notes
--Thelonious Monk

  
  LOG IN TO REPLY
gkuenning
Goldmember
Avatar
1,507 posts
Gallery: 4 photos
Likes: 70
Joined Jan 2005
Location: Claremont (near LA), California
     
Mar 27, 2005 05:03 |  #7

The solution to your problem lies in open-source tools. For example, dcraw will do exactly what you want. I don't know if it runs under Windows, but it's definitely available under Linux and should be easy to port to Mac OSX if it's not already running there. The output of dcraw is in the standard PPM format; you may have to pass it through pnmnoraw to turn it into plain ASCII. It would then be trivial to process it further. (Actually, if you're writing code, you should just use the libpnm functions to read the dcraw output directly into an array for further processing.)


Geoff
All I want is a 10-2000 f/0.5L with no distortion that weighs 100 grams, fits in my pocket, and costs $300. Is that too much to ask?

  
  LOG IN TO REPLY
ScottK
Member
96 posts
Joined Jun 2004
Location: Oceanside, CA, USA
     
Mar 28, 2005 15:21 |  #8

Yes, DCRAW may be your best solution, but would probably require some programming knowledge and effort on your (or somebody's) part.

DCRAW is an extremely compact, platform independant, command line app. You feed it a RAW file, and it spits out (curiously) a .PSD file. The key is that its source is open and available. It is a bit obtuse, as its written for compactness (not a single carriage return in the file), but in theory you could discect it, find out where it parses and reads the individual sensor readings, and then replace the code that converts those into .PSD pixels to instead write out the info in text form. (That would probably be one huge file, depending how readable you made it!)

Here are some links:
The author's source page (includes a link to the source file) (external link)
A DCRAW "fan" page (good source for background, usage and update info) (external link)

Why (I think) the Canon SDK won't work is because, as I recall, the process that they make available for converting RAW files still returns processed data, not the direct sensor readings your looking for. As far as I can determine (based mostly on comments from the David Coffin page), the RAW format Canon uses is technically not an open specification - its up to those who write RAW converters to interpret the RAW file structures themselves. (This may not be true for the "big boys" like Adobe and Phase One.) So this source may be the best chance you have of getting that info without having to decode it yourself.




  
  LOG IN TO REPLY
pradeep1
Goldmember
Avatar
2,365 posts
Gallery: 2 photos
Likes: 42
Joined Sep 2003
Location: USA
     
Apr 01, 2005 09:03 |  #9

DCRaw available for Windows: http://www.insflug.org …are/download/wi​ndows.php3 (external link)




  
  LOG IN TO REPLY
gkuenning
Goldmember
Avatar
1,507 posts
Gallery: 4 photos
Likes: 70
Joined Jan 2005
Location: Claremont (near LA), California
     
Apr 03, 2005 15:17 as a reply to  @ ScottK's post |  #10

ScottK wrote:
It is a bit obtuse, as its written for compactness (not a single carriage return in the file)

ScottK, you need to get yourself a better source viewer, one that understands the conventions used on different systems. dcraw is written in the standard Unix format, with newlines separating the lines of the source. It is very well formatted and (from a very quick glance) should be easy to work with or modify.


Geoff
All I want is a 10-2000 f/0.5L with no distortion that weighs 100 grams, fits in my pocket, and costs $300. Is that too much to ask?

  
  LOG IN TO REPLY
sponsored links (only for non-logged)

7,074 views & 0 likes for this thread, 8 members have posted to it.
Canon RAW into ASCII
FORUMS Cameras, Lenses & Accessories Canon G-series Digital Cameras 
AAA
x 1600
y 1600

Jump to forum...   •  Rules   •  Forums   •  New posts   •  RTAT   •  'Best of'   •  Gallery   •  Gear   •  Reviews   •  Member list   •  Polls   •  Image rules   •  Search   •  Password reset   •  Home

Not a member yet?
Register to forums
Registered members may log in to forums and access all the features: full search, image upload, follow forums, own gear list and ratings, likes, more forums, private messaging, thread follow, notifications, own gallery, all settings, view hosted photos, own reviews, see more and do more... and all is free. Don't be a stranger - register now and start posting!


COOKIES DISCLAIMER: This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and to our privacy policy.
Privacy policy and cookie usage info.


POWERED BY AMASS forum software 2.58forum software
version 2.58 /
code and design
by Pekka Saarinen ©
for photography-on-the.net

Latest registered member was a spammer, and banned as such!
1804 guests, 116 members online
Simultaneous users record so far is 15,144, that happened on Nov 22, 2018

Photography-on-the.net Digital Photography Forums is the website for photographers and all who love great photos, camera and post processing techniques, gear talk, discussion and sharing. Professionals, hobbyists, newbies and those who don't even own a camera -- all are welcome regardless of skill, favourite brand, gear, gender or age. Registering and usage is free.