patternize
patternize copied to clipboard
Image calibration using only half of the colorchecker
Hello,
I would like to inquire whether it is possible to calibrate images using only half of the colorchecker? Currently, I am analyzing data using photos that require calibration. However, the issue is that only half of the color checker is visible in all of the photos...
Thank you in advance for your assistance.
Hi Arif,
Yes it is possible, but we would need to modify the code. Maybe I could make it a bit smarter, so that you can specify which patches to include. I’ll have a think about how easy that would be.
Cheers,
Steven
From: Arif Maulana @.> Sent: Tuesday, 20 June 2023 22:17 To: StevenVB12/patternize @.> Cc: Subscribed @.***> Subject: [StevenVB12/patternize] Image calibration using only half of the colorchecker (Issue #41)
Hello,
I would like to inquire whether it is possible to calibrate images using only half of the colorchecker? Currently, I am analyzing data using photos that require calibration. However, the issue is that only half of the color checker is visible in all of the photos...
Thank you in advance for your assistance. [example]https://user-images.githubusercontent.com/97859403/247249694-7b8bf515-7642-460f-a0d0-9fd7d2443b97.JPG
— Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/41, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC4ZM27YPWGXTBOIXJT3XMIAMBANCNFSM6AAAAAAZNY7XYI. You are receiving this because you are subscribed to this thread.Message ID: @.@.>>
Hi Arif,
Here’s a basic solution for the right half of the color checker. The order of setting the points remains the same (1: blue, 2 darkblue, 3: black, 4: white).
For me something is broken in R studio and the xy locator does not work correctly. If that happens to you too, please run it in base R.
Can you let me know if it works?
Best,
Steven
From: Arif Maulana @.> Sent: Tuesday, 20 June 2023 22:17 To: StevenVB12/patternize @.> Cc: Subscribed @.***> Subject: [StevenVB12/patternize] Image calibration using only half of the colorchecker (Issue #41)
Hello,
I would like to inquire whether it is possible to calibrate images using only half of the colorchecker? Currently, I am analyzing data using photos that require calibration. However, the issue is that only half of the color checker is visible in all of the photos...
Thank you in advance for your assistance. [example]https://user-images.githubusercontent.com/97859403/247249694-7b8bf515-7642-460f-a0d0-9fd7d2443b97.JPG
— Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/41, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC4ZM27YPWGXTBOIXJT3XMIAMBANCNFSM6AAAAAAZNY7XYI. You are receiving this because you are subscribed to this thread.Message ID: @.@.>>
Hi Steven,
Many thanks for the replies! Did you happen to forget to paste the solution in your email by any chance? because I didn't see it included.
Best wishes, Arif
Arif Maulana Erasmus Mundus Master Programme in Evolutionary Biology (MEME) Incoming PhD student at the Wellcome Sanger Institute (Tree of Life Programme) - University of Cambridge, UK
On Wed, 21 Jun 2023 at 09:29, Steven M. Van Belleghem < @.***> wrote:
Hi Arif,
Here’s a basic solution for the right half of the color checker. The order of setting the points remains the same (1: blue, 2 darkblue, 3: black, 4: white).
For me something is broken in R studio and the xy locator does not work correctly. If that happens to you too, please run it in base R.
Can you let me know if it works?
Best,
Steven
From: Arif Maulana @.> Sent: Tuesday, 20 June 2023 22:17 To: StevenVB12/patternize @.> Cc: Subscribed @.***> Subject: [StevenVB12/patternize] Image calibration using only half of the colorchecker (Issue #41)
Hello,
I would like to inquire whether it is possible to calibrate images using only half of the colorchecker? Currently, I am analyzing data using photos that require calibration. However, the issue is that only half of the color checker is visible in all of the photos...
Thank you in advance for your assistance. [example]< https://user-images.githubusercontent.com/97859403/247249694-7b8bf515-7642-460f-a0d0-9fd7d2443b97.JPG>
— Reply to this email directly, view it on GitHub< https://github.com/StevenVB12/patternize/issues/41>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABQOC4ZM27YPWGXTBOIXJT3XMIAMBANCNFSM6AAAAAAZNY7XYI>.
You are receiving this because you are subscribed to this thread.Message ID: @.@.>>
— Reply to this email directly, view it on GitHub https://github.com/StevenVB12/patternize/issues/41#issuecomment-1600414455, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXKTOS5CMO5AUSHUMVRC3P3XMKWG7ANCNFSM6AAAAAAZNY7XYI . You are receiving this because you authored the thread.Message ID: @.***>
Does this work? I could update the package as well, but I'm afraid the custom function might be confusing.
Steven
Dear Steven,
Thanks for your email and the solution!
I agree. It will confuse the user.
I will try the solution now and get back to you ASAP. Fingers crossed :)
Best, Arif
Arif Maulana Erasmus Mundus Master Programme in Evolutionary Biology (MEME) Incoming PhD student at the Wellcome Sanger Institute (Tree of Life Programme) - University of Cambridge, UK
On Wed, 21 Jun 2023 at 09:58, Steven M. Van Belleghem < @.***> wrote:
colorChecker_half.zip https://github.com/StevenVB12/patternize/files/11815642/colorChecker_half.zip
Does this work? I could update the package as well, but I'm afraid the custom function might be confusing.
Steven
— Reply to this email directly, view it on GitHub https://github.com/StevenVB12/patternize/issues/41#issuecomment-1600459826, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXKTOS5J54KXPKDOA3LG4Y3XMKZUVANCNFSM6AAAAAAZNY7XYI . You are receiving this because you authored the thread.Message ID: @.***>
Hi Steven,
I have tried your solution and got this error message:
colorChecker_half(IDlist, prepath, extension)[1] "Processing sample 1 AA01"Error in extent(rR) <- c(0, dim(imRed)[2], 0, dim(imRed)[1]) : could not find function "extent<-"
Best, Arif
Arif Maulana Erasmus Mundus Master Programme in Evolutionary Biology (MEME) Incoming PhD student at the Wellcome Sanger Institute (Tree of Life Programme) - University of Cambridge, UK
On Wed, 21 Jun 2023 at 09:58, Steven M. Van Belleghem < @.***> wrote:
colorChecker_half.zip https://github.com/StevenVB12/patternize/files/11815642/colorChecker_half.zip
Does this work? I could update the package as well, but I'm afraid the custom function might be confusing.
Steven
— Reply to this email directly, view it on GitHub https://github.com/StevenVB12/patternize/issues/41#issuecomment-1600459826, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXKTOS5J54KXPKDOA3LG4Y3XMKZUVANCNFSM6AAAAAAZNY7XYI . You are receiving this because you authored the thread.Message ID: @.***>
Hi Arif,
Did you load patternize itself and raster?
I hope that would solve the error.
Steven
From: Arif Maulana @.> Sent: Wednesday, 21 June 2023 11:43 To: StevenVB12/patternize @.> Cc: Steven M. Van Belleghem @.>; Comment @.> Subject: Re: [StevenVB12/patternize] Image calibration using only half of the colorchecker (Issue #41)
Hi Steven,
I have tried your solution and got this error message:
colorChecker_half(IDlist, prepath, extension)[1] "Processing sample 1 AA01"Error in extent(rR) <- c(0, dim(imRed)[2], 0, dim(imRed)[1]) : could not find function "extent<-"
Best, Arif
Arif Maulana Erasmus Mundus Master Programme in Evolutionary Biology (MEME) Incoming PhD student at the Wellcome Sanger Institute (Tree of Life Programme) - University of Cambridge, UK
On Wed, 21 Jun 2023 at 09:58, Steven M. Van Belleghem < @.***mailto:***@***.***> wrote:
colorChecker_half.zip https://github.com/StevenVB12/patternize/files/11815642/colorChecker_half.zip
Does this work? I could update the package as well, but I'm afraid the custom function might be confusing.
Steven
— Reply to this email directly, view it on GitHub https://github.com/StevenVB12/patternize/issues/41#issuecomment-1600459826, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXKTOS5J54KXPKDOA3LG4Y3XMKZUVANCNFSM6AAAAAAZNY7XYI . You are receiving this because you authored the thread.Message ID: @.***mailto:***@***.***>
— Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/41#issuecomment-1600524432, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC4ZAUBX2LZZFS6XYA5LXMK62FANCNFSM6AAAAAAZNY7XYI. You are receiving this because you commented.Message ID: @.@.>>
Hi Steven,
Thanks for your reply. I load patternize but not raster. It turns out that it needs imager to be loaded as well.
The code works, thanks. However the calibrated result seems off. The calibrated image appears completely orange. Not sure what's wrong.
Best wishes, Arif
Arif Maulana Erasmus Mundus Master Programme in Evolutionary Biology (MEME) Incoming PhD student at the Wellcome Sanger Institute (Tree of Life Programme) - University of Cambridge, UK
On Wed, 21 Jun 2023 at 10:47, Steven M. Van Belleghem < @.***> wrote:
Hi Arif,
Did you load patternize itself and raster?
I hope that would solve the error.
Steven
From: Arif Maulana @.> Sent: Wednesday, 21 June 2023 11:43 To: StevenVB12/patternize @.> Cc: Steven M. Van Belleghem @.>; Comment @.> Subject: Re: [StevenVB12/patternize] Image calibration using only half of the colorchecker (Issue #41)
Hi Steven,
I have tried your solution and got this error message:
colorChecker_half(IDlist, prepath, extension)[1] "Processing sample 1 AA01"Error in extent(rR) <- c(0, dim(imRed)[2], 0, dim(imRed)[1]) : could not find function "extent<-"
Best, Arif
Arif Maulana Erasmus Mundus Master Programme in Evolutionary Biology (MEME) Incoming PhD student at the Wellcome Sanger Institute (Tree of Life Programme) - University of Cambridge, UK
On Wed, 21 Jun 2023 at 09:58, Steven M. Van Belleghem < @.***mailto:***@***.***> wrote:
colorChecker_half.zip < https://github.com/StevenVB12/patternize/files/11815642/colorChecker_half.zip>
Does this work? I could update the package as well, but I'm afraid the custom function might be confusing.
Steven
— Reply to this email directly, view it on GitHub < https://github.com/StevenVB12/patternize/issues/41#issuecomment-1600459826>,
or unsubscribe < https://github.com/notifications/unsubscribe-auth/AXKTOS5J54KXPKDOA3LG4Y3XMKZUVANCNFSM6AAAAAAZNY7XYI>
. You are receiving this because you authored the thread.Message ID: @.***mailto:***@***.***>
— Reply to this email directly, view it on GitHub< https://github.com/StevenVB12/patternize/issues/41#issuecomment-1600524432>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABQOC4ZAUBX2LZZFS6XYA5LXMK62FANCNFSM6AAAAAAZNY7XYI>.
You are receiving this because you commented.Message ID: @.@.>>
— Reply to this email directly, view it on GitHub https://github.com/StevenVB12/patternize/issues/41#issuecomment-1600530878, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXKTOS63UNGZDMW6WAKMETTXMK7KJANCNFSM6AAAAAAZNY7XYI . You are receiving this because you authored the thread.Message ID: @.***>
Hmm. Not sure what’s going wrong. Will have to do more troubleshooting.
Steven
From: Arif Maulana @.> Sent: Wednesday, 21 June 2023 12:32 To: StevenVB12/patternize @.> Cc: Steven M. Van Belleghem @.>; Comment @.> Subject: Re: [StevenVB12/patternize] Image calibration using only half of the colorchecker (Issue #41)
Hi Steven,
Thanks for your reply. I load patternize but not raster. It turns out that it needs imager to be loaded as well.
The code works, thanks. However the calibrated result seems off. The calibrated image appears completely orange. Not sure what's wrong.
Best wishes, Arif
Arif Maulana Erasmus Mundus Master Programme in Evolutionary Biology (MEME) Incoming PhD student at the Wellcome Sanger Institute (Tree of Life Programme) - University of Cambridge, UK
On Wed, 21 Jun 2023 at 10:47, Steven M. Van Belleghem < @.***mailto:***@***.***> wrote:
Hi Arif,
Did you load patternize itself and raster?
I hope that would solve the error.
Steven
From: Arif Maulana @.mailto:***@***.***> Sent: Wednesday, 21 June 2023 11:43 To: StevenVB12/patternize @.mailto:***@***.***> Cc: Steven M. Van Belleghem @.mailto:***@***.***>; Comment @.mailto:***@***.***> Subject: Re: [StevenVB12/patternize] Image calibration using only half of the colorchecker (Issue #41)
Hi Steven,
I have tried your solution and got this error message:
colorChecker_half(IDlist, prepath, extension)[1] "Processing sample 1 AA01"Error in extent(rR) <- c(0, dim(imRed)[2], 0, dim(imRed)[1]) : could not find function "extent<-"
Best, Arif
Arif Maulana Erasmus Mundus Master Programme in Evolutionary Biology (MEME) Incoming PhD student at the Wellcome Sanger Institute (Tree of Life Programme) - University of Cambridge, UK
On Wed, 21 Jun 2023 at 09:58, Steven M. Van Belleghem < @.<mailto:@.mailto:***@***.***%3cmailto:***@***.***>> wrote:
colorChecker_half.zip < https://github.com/StevenVB12/patternize/files/11815642/colorChecker_half.zip>
Does this work? I could update the package as well, but I'm afraid the custom function might be confusing.
Steven
— Reply to this email directly, view it on GitHub < https://github.com/StevenVB12/patternize/issues/41#issuecomment-1600459826>,
or unsubscribe < https://github.com/notifications/unsubscribe-auth/AXKTOS5J54KXPKDOA3LG4Y3XMKZUVANCNFSM6AAAAAAZNY7XYI>
. You are receiving this because you authored the thread.Message ID: @.<mailto:@.mailto:***@***.***%3cmailto:***@***.***>>
— Reply to this email directly, view it on GitHub< https://github.com/StevenVB12/patternize/issues/41#issuecomment-1600524432>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABQOC4ZAUBX2LZZFS6XYA5LXMK62FANCNFSM6AAAAAAZNY7XYI>.
You are receiving this because you commented.Message ID: @.@.mailto:***@***.******@***.***>>
— Reply to this email directly, view it on GitHub https://github.com/StevenVB12/patternize/issues/41#issuecomment-1600530878, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXKTOS63UNGZDMW6WAKMETTXMK7KJANCNFSM6AAAAAAZNY7XYI . You are receiving this because you authored the thread.Message ID: @.***mailto:***@***.***>
— Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/41#issuecomment-1600591504, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC46M6BZ4N7FHXW7SXY3XMLEQHANCNFSM6AAAAAAZNY7XYI. You are receiving this because you commented.Message ID: @.@.>>
Hi Arif,
this version is working for me. Please give it a try and let me know.
I also mentioned that the xy locator has problems in Rstudio, but I figured out it only happens if your Rstudio zoom and display settings in windows are not both set to 100%. So maybe it's not an issue for you.
Best regards,
Steven
Hi Steven,
Good morning and thanks for your email. I gave it a try, it worked like magic! wow you're truly an R whiz haha ;) Just curious, what tweak you applied to make it work?
Many many thanks for saving my day. Your help is highly appreciated! It is also a problem with my laptop (Rstudio). I use base R for the task, I will try your suggestion about the display setting and see if it works.
Wishing you a fantastic day.
Best, Arif
Arif Maulana Erasmus Mundus Master Programme in Evolutionary Biology (MEME) Incoming PhD student at the Wellcome Sanger Institute (Tree of Life Programme) - University of Cambridge, UK
On Thu, 22 Jun 2023 at 10:17, Steven M. Van Belleghem < @.***> wrote:
colorChecker_half.zip https://github.com/StevenVB12/patternize/files/11832308/colorChecker_half.zip
Hi Arif,
this version is working for me. Please give it a try and let me know.
I also mentioned that the xy locator has problems in Rstudio, but I figured out it only happens if your Rstudio zoom and display settings in windows are not both set to 100%. So maybe it's not an issue for you.
Best regards,
Steven
— Reply to this email directly, view it on GitHub https://github.com/StevenVB12/patternize/issues/41#issuecomment-1602298897, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXKTOS5VTQW4NS65P5RQISLXMQEUJANCNFSM6AAAAAAZNY7XYI . You are receiving this because you authored the thread.Message ID: @.***>
Great!
I have just removed the predefined twelve areas in the colorchecker from the code. I had made a mistake in my first attempt of doing that..
Cheers,
Steven
From: Arif Maulana @.> Sent: Thursday, 22 June 2023 12:12 To: StevenVB12/patternize @.> Cc: Steven M. Van Belleghem @.>; Comment @.> Subject: Re: [StevenVB12/patternize] Image calibration using only half of the colorchecker (Issue #41)
Hi Steven,
Good morning and thanks for your email. I gave it a try, it worked like magic! wow you're truly an R whiz haha ;) Just curious, what tweak you applied to make it work?
Many many thanks for saving my day. Your help is highly appreciated! It is also a problem with my laptop (Rstudio). I use base R for the task, I will try your suggestion about the display setting and see if it works.
Wishing you a fantastic day.
Best, Arif
Arif Maulana Erasmus Mundus Master Programme in Evolutionary Biology (MEME) Incoming PhD student at the Wellcome Sanger Institute (Tree of Life Programme) - University of Cambridge, UK
On Thu, 22 Jun 2023 at 10:17, Steven M. Van Belleghem < @.***mailto:***@***.***> wrote:
colorChecker_half.zip https://github.com/StevenVB12/patternize/files/11832308/colorChecker_half.zip
Hi Arif,
this version is working for me. Please give it a try and let me know.
I also mentioned that the xy locator has problems in Rstudio, but I figured out it only happens if your Rstudio zoom and display settings in windows are not both set to 100%. So maybe it's not an issue for you.
Best regards,
Steven
— Reply to this email directly, view it on GitHub https://github.com/StevenVB12/patternize/issues/41#issuecomment-1602298897, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXKTOS5VTQW4NS65P5RQISLXMQEUJANCNFSM6AAAAAAZNY7XYI . You are receiving this because you authored the thread.Message ID: @.***mailto:***@***.***>
— Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/41#issuecomment-1602375231, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC46XYLXJH7654XTBXDDXMQK53ANCNFSM6AAAAAAZNY7XYI. You are receiving this because you commented.Message ID: @.@.>>