How to create ICC profile for camera

Hi! I have converted RAW to TIFF (uncompressed) file and then demosaiced. I assume after demosaicing the image I can call in camera RGB; from camera RGB to I have converted into XYZ and XYZ to CIELab(76). My goal actually to create an ICC profile of the camera which I can use over other images. But now i am lost, how to create the icc profile actually?

Forums: 

if this question is still open ...

... you may want to look at www.color.org for fundamentals about ICC profiles (which are coming from the printing world, actually) or, if you want to be slightly more "compatible" with the (RGB based) additive color world, visit opencolorio.org for an alternative approach.

In general, creating a profile from a target shot is no "magic", the problem really is about peeking the "right" spot on the image. In my experience averaging a spot center area (after you have found the target spots by pattern recognition) does not really always give the best results.

You can have a look at lprof (search at Sourceforge) - either for using it as an open source "profiler solution" or for learning from the code how to set up your profiler code.
Alternatively you might want to consider ColorChecker (XRite), which is a free tool that creates quite good ICC profiles.

I hope this helps.

Mact