Patternize Issues
I have been analyzing some photos ussing patternize. I had some Issues with different functions.
First, I have been using patLanK to generate RGB clustering, when perfoming the clustering in different times, the RGB output is not consistent in order while values are consistent. I've tried using setseed to avoid this, but has not worked. How can I obtain a consistent order when using patLanK.
Also, when performing patLanK, some pictures are added to the Array but latter skipped when performign the clustering, how can I avoid these photos being avoided?
I have been also performing some analysis with the patArea function to quantify color proportion using the patLanK raster list and the proportions obtain does not add up to 1. The proportions constantly add up to different numbers randomly between individuals even when using the full picture as an outline. And these numbers are always hihger than 1 reaching up to almos 2.
All pictures have the same size and resolution and the background has been deleted.
I am wondering if this is a mistake made by me or cluster proportions are not comparable within the same photo.
If clustering proportions should not add up to one? If they should not, how can I compare them?
Adding the codes used below.
rasterList_SIB <- patLanK( IMG_SIB, LMK_SIB, k = 10, crop = F, res = 300, adjustCoords = T, plot = F)
areaList_lanK_sib <- patArea(rasterList_SIB, SIB, refShape = 'mean', type = 'k', outline = outline_A09206 ,landList = LMK_SIB, adjustCoords = TRUE, imageList = IMG_SIB, cartoonID = 'A09206_SIB_23')
Hi,
It would be best to look into this package and tutorial, which does a much better job than k-means clustering: https://hiweller.rbind.io/post/recolorize-patternize-workflow/
[https://hiweller.rbind.io/media/icon_hu894dd0f75b84cd2ded4b9885934a1072_25364_512x512_fill_lanczos_center_2.png]https://hiweller.rbind.io/post/recolorize-patternize-workflow/ Recolorize & patternize workflow - Hannah Wellerhttps://hiweller.rbind.io/post/recolorize-patternize-workflow/ This tutorial will go through the process of combining patternize and recolorize tools to produce a PCA quantifying color pattern variation in wasp faces (Polistes fuscatus).This subset of 20 images (and workflow) is excerpted from ‘Evidence for a selective link between cooperation and individual recognition’ (Tumulty et al. 2023), with permission from the lead author. hiweller.rbind.io
Could you give this a try first?
Kind regards,
Steven
Van Belleghem Steven
Van: skraemer98 @.> Verzonden: zaterdag 31 mei 2025 1:48 Aan: StevenVB12/patternize @.> CC: Subscribed @.***> Onderwerp: [StevenVB12/patternize] Patternize Issues (Issue #45)
[https://avatars.githubusercontent.com/u/141877324?s=20&v=4]skraemer98 created an issue (StevenVB12/patternize#45)https://github.com/StevenVB12/patternize/issues/45
I have been analyzing some photos ussing patternize. I had some Issues with different functions. First, I have been using patLanK to generate RGB clustering, when perfoming the clustering in different times, the RGB output is not consistent in order while values are consistent. I've tried using setseed to avoid this, but has not worked. How can I obtain a consistent order when using patLanK. Also, when performing patLanK, some pictures are added to the Array but latter skipped when performign the clustering, how can I avoid these photos being avoided? I have been also performing some analysis with the patArea function to quantify color proportion using the patLanK raster list and the proportions obtain does not add up to 1. The proportions constantly add up to different numbers randomly between individuals even when using the full picture as an outline. And these numbers are always hihger than 1 reaching up to almos 2. All pictures have the same size and resolution and the background has been deleted. I am wondering if this is a mistake made by me or cluster proportions are not comparable within the same photo. If clustering proportions should not add up to one? If they should not, how can I compare them?
Adding the codes used below.
rasterList_SIB <- patLanK( IMG_SIB, LMK_SIB, k = 10, crop = F, res = 300, adjustCoords = T, plot = F)
areaList_lanK_sib <- patArea(rasterList_SIB, SIB, refShape = 'mean', type = 'k', outline = outline_A09206 ,landList = LMK_SIB, adjustCoords = TRUE, imageList = IMG_SIB, cartoonID = 'A09206_SIB_23')
— Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/45, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC4ZQSWWY6NVQOF2ACMT3BDU6NAVCNFSM6AAAAAB6JFYHJ2VHI2DSMVQWIX3LMV43ASLTON2WKOZTGEYDINBYGEZDKOA. You are receiving this because you are subscribed to this thread.Message ID: @.***>