|
| Science Forum Index » Image Processing Forum » Write Retinex using C++, thanks |
|
Page 1 of 1 |
|
| Author |
Message |
| Guest |
Posted: Tue Nov 28, 2006 4:59 am |
|
|
|
|
Hi to all.
I am looking for something quite special. Does anybody have a C or C++
implementation of the Retinex algorithm for color constancy?
thanks a lot!
Regards,
Henry |
|
|
| Back to top |
|
|
|
| eric |
Posted: Tue Nov 28, 2006 8:38 am |
|
|
|
Guest
|
Here is a Matlab implementation of it:
http://www.cs.sfu.ca/~colour/publications/IST-2000/
i think you can translate it to c++ easily.
Regards
Eric
henryliuch@gmail.com schrieb:
[quote:ae3f8b0948]Hi to all.
I am looking for something quite special. Does anybody have a C or C++
implementation of the Retinex algorithm for color constancy?
thanks a lot!
Regards,
Henry
[/quote:ae3f8b0948] |
|
|
| Back to top |
|
|
|
| Guest |
Posted: Tue Nov 28, 2006 9:10 am |
|
|
|
|
Hi Eric,
Thanks for your kindly help!
If I have an input image with left corner coordinate (0, 0), the
x-coordinates of pixels increase from left to right directions, whereas
the y-coodinates increase from top to bottom directions.
Let width = W, height = H.
The coordinates of pixels arranged in data and mdData are represented
as follows
(0, 0) (1, 0) ... (W-1, 0)
(0, 1) (1, 1) ... (W-1, 1)
.. . . .
.. . . .
(0,H-1) (1,H-1) ... (W-1,H-1)
'pInput' and 'pOutput' are 1D arrays representation of 2D images. A
pixel with coordinates (i, j) in the input frame can be referenced as
'pInput[(i + j * width) * 3 + k]', where k addresses (k = 0 for blue, k
= 1 for green and k = 2 for read) the color components.
How can I write C++ program to do the retinex for this case?
Many many thanks!!!!
Henry
eric 寫道:
[quote:cd3a0a2914]Here is a Matlab implementation of it:
http://www.cs.sfu.ca/~colour/publications/IST-2000/
i think you can translate it to c++ easily.
Regards
Eric
henryliuch@gmail.com schrieb:
Hi to all.
I am looking for something quite special. Does anybody have a C or C++
implementation of the Retinex algorithm for color constancy?
thanks a lot!
Regards,
Henry
[/quote:cd3a0a2914] |
|
|
| Back to top |
|
|
|
| eric |
Posted: Wed Nov 29, 2006 3:54 am |
|
|
|
Guest
|
Hi,
i think the easiest way to solve the problem if yo have enough time in
your app is to convert the image to the format you need for the alg.
Otherwhise you have to redesign the retinex algortihm and you have to
understand the retinex theorie at first.
Here you can find the informations you need to do that:
http://dragon.larc.nasa.gov/retinex/background/background.html
Eric
henryliuch@gmail.com schrieb:
[quote:db87f1c035]Hi Eric,
Thanks for your kindly help!
If I have an input image with left corner coordinate (0, 0), the
x-coordinates of pixels increase from left to right directions, whereas
the y-coodinates increase from top to bottom directions.
Let width = W, height = H.
The coordinates of pixels arranged in data and mdData are represented
as follows
(0, 0) (1, 0) ... (W-1, 0)
(0, 1) (1, 1) ... (W-1, 1)
. . . .
. . . .
(0,H-1) (1,H-1) ... (W-1,H-1)
'pInput' and 'pOutput' are 1D arrays representation of 2D images. A
pixel with coordinates (i, j) in the input frame can be referenced as
'pInput[(i + j * width) * 3 + k]', where k addresses (k = 0 for blue, k
= 1 for green and k = 2 for read) the color components.
How can I write C++ program to do the retinex for this case?
Many many thanks!!!!
Henry
eric 寫道:
Here is a Matlab implementation of it:
http://www.cs.sfu.ca/~colour/publications/IST-2000/
i think you can translate it to c++ easily.
Regards
Eric
henryliuch@gmail.com schrieb:
Hi to all.
I am looking for something quite special. Does anybody have a C or C++
implementation of the Retinex algorithm for color constancy?
thanks a lot!
Regards,
Henry
[/quote:db87f1c035] |
|
|
| Back to top |
|
|
|
| eric |
Posted: Wed Nov 29, 2006 4:06 am |
|
|
|
Guest
|
There is also a libary covering these problems see:
http://restoreinpaint.sourceforge.net/
Regards
Eric
eric schrieb:
[quote:55c2d3b42a]Hi,
i think the easiest way to solve the problem if yo have enough time in
your app is to convert the image to the format you need for the alg.
Otherwhise you have to redesign the retinex algortihm and you have to
understand the retinex theorie at first.
Here you can find the informations you need to do that:
http://dragon.larc.nasa.gov/retinex/background/background.html
Eric
henryliuch@gmail.com schrieb:
Hi Eric,
Thanks for your kindly help!
If I have an input image with left corner coordinate (0, 0), the
x-coordinates of pixels increase from left to right directions, whereas
the y-coodinates increase from top to bottom directions.
Let width = W, height = H.
The coordinates of pixels arranged in data and mdData are represented
as follows
(0, 0) (1, 0) ... (W-1, 0)
(0, 1) (1, 1) ... (W-1, 1)
. . . .
. . . .
(0,H-1) (1,H-1) ... (W-1,H-1)
'pInput' and 'pOutput' are 1D arrays representation of 2D images. A
pixel with coordinates (i, j) in the input frame can be referenced as
'pInput[(i + j * width) * 3 + k]', where k addresses (k = 0 for blue, k
= 1 for green and k = 2 for read) the color components.
How can I write C++ program to do the retinex for this case?
Many many thanks!!!!
Henry
eric 寫道:
Here is a Matlab implementation of it:
http://www.cs.sfu.ca/~colour/publications/IST-2000/
i think you can translate it to c++ easily.
Regards
Eric
henryliuch@gmail.com schrieb:
Hi to all.
I am looking for something quite special. Does anybody have a C or C++
implementation of the Retinex algorithm for color constancy?
thanks a lot!
Regards,
Henry
[/quote:55c2d3b42a] |
|
|
| Back to top |
|
|
|
| Guest |
Posted: Wed Nov 29, 2006 9:22 am |
|
|
|
|
Hi, eric
Thanks for your idea.
I have an input image, and I read the formula of Retinex from here:
http://www.cse.ucsc.edu/classes/ee264/Winter02/yanreport.doc
But I am really don't know how to start... since I am week in C++
Anyway, thanks for your kindly help!!!!
Henry
eric 寫道:
[quote:003432266f]There is also a libary covering these problems see:
http://restoreinpaint.sourceforge.net/
Regards
Eric
eric schrieb:
Hi,
i think the easiest way to solve the problem if yo have enough time in
your app is to convert the image to the format you need for the alg.
Otherwhise you have to redesign the retinex algortihm and you have to
understand the retinex theorie at first.
Here you can find the informations you need to do that:
http://dragon.larc.nasa.gov/retinex/background/background.html
Eric
henryliuch@gmail.com schrieb:
Hi Eric,
Thanks for your kindly help!
If I have an input image with left corner coordinate (0, 0), the
x-coordinates of pixels increase from left to right directions, whereas
the y-coodinates increase from top to bottom directions.
Let width = W, height = H.
The coordinates of pixels arranged in data and mdData are represented
as follows
(0, 0) (1, 0) ... (W-1, 0)
(0, 1) (1, 1) ... (W-1, 1)
. . . .
. . . .
(0,H-1) (1,H-1) ... (W-1,H-1)
'pInput' and 'pOutput' are 1D arrays representation of 2D images. A
pixel with coordinates (i, j) in the input frame can be referenced as
'pInput[(i + j * width) * 3 + k]', where k addresses (k = 0 for blue, k
= 1 for green and k = 2 for read) the color components.
How can I write C++ program to do the retinex for this case?
Many many thanks!!!!
Henry
eric 寫道:
Here is a Matlab implementation of it:
http://www.cs.sfu.ca/~colour/publications/IST-2000/
i think you can translate it to c++ easily.
Regards
Eric
henryliuch@gmail.com schrieb:
Hi to all.
I am looking for something quite special. Does anybody have a C or C++
implementation of the Retinex algorithm for color constancy?
thanks a lot!
Regards,
Henry
[/quote:003432266f] |
|
|
| Back to top |
|
|
|
| Guest |
Posted: Wed Nov 29, 2006 9:22 am |
|
|
|
|
Hi, eric
Thanks for your idea.
I have an input image, and I read the formula of Retinex from here:
http://www.cse.ucsc.edu/classes/ee264/Winter02/yanreport.doc
But I am really don't know how to start... since I am weak in C++
Anyway, thanks for your kindly help!!!!
Henry
eric 寫道:
[quote:cfbd45abfc]There is also a libary covering these problems see:
http://restoreinpaint.sourceforge.net/
Regards
Eric
eric schrieb:
Hi,
i think the easiest way to solve the problem if yo have enough time in
your app is to convert the image to the format you need for the alg.
Otherwhise you have to redesign the retinex algortihm and you have to
understand the retinex theorie at first.
Here you can find the informations you need to do that:
http://dragon.larc.nasa.gov/retinex/background/background.html
Eric
henryliuch@gmail.com schrieb:
Hi Eric,
Thanks for your kindly help!
If I have an input image with left corner coordinate (0, 0), the
x-coordinates of pixels increase from left to right directions, whereas
the y-coodinates increase from top to bottom directions.
Let width = W, height = H.
The coordinates of pixels arranged in data and mdData are represented
as follows
(0, 0) (1, 0) ... (W-1, 0)
(0, 1) (1, 1) ... (W-1, 1)
. . . .
. . . .
(0,H-1) (1,H-1) ... (W-1,H-1)
'pInput' and 'pOutput' are 1D arrays representation of 2D images. A
pixel with coordinates (i, j) in the input frame can be referenced as
'pInput[(i + j * width) * 3 + k]', where k addresses (k = 0 for blue, k
= 1 for green and k = 2 for read) the color components.
How can I write C++ program to do the retinex for this case?
Many many thanks!!!!
Henry
eric 寫道:
Here is a Matlab implementation of it:
http://www.cs.sfu.ca/~colour/publications/IST-2000/
i think you can translate it to c++ easily.
Regards
Eric
henryliuch@gmail.com schrieb:
Hi to all.
I am looking for something quite special. Does anybody have a C or C++
implementation of the Retinex algorithm for color constancy?
thanks a lot!
Regards,
Henry
[/quote:cfbd45abfc] |
|
|
| Back to top |
|
|
|
| eric |
Posted: Wed Nov 29, 2006 10:02 am |
|
|
|
Guest
|
|
| Back to top |
|
|
|
| Guest |
Posted: Wed Nov 29, 2006 11:15 am |
|
|
|
|
It really useful~ thanks a lot!
eric 寫道:
[quote:f0835d364c]http://www.codeproject.com/useritems/normalisation_algorithms.asp
Is Multiscaleretinex in C#
Eric[/quote:f0835d364c] |
|
|
| Back to top |
|
|
|
| 4N |
Posted: Wed Dec 13, 2006 11:56 am |
|
|
|
Guest
|
I wrote the frankle-mccann retinex algo (results aren't really exciting but
it works).
I used the luminance of the image and integer operations but I noticed I
should have converted the luminance to log radiance.
Now the questions are:
what is the log radiance? is it the log(luminance)?
how does this affect the output quality? |
|
|
| Back to top |
|
|
|
|
|
All times are GMT - 5 Hours
The time now is Thu Sep 02, 2010 5:02 pm
|
|