roddalben / shine_color Goto Github PK
View Code? Open in Web Editor NEWSHINE_color: MATLAB toolbox to control luminance of colorful images.
Home Page: https://doi.org/10.1016/j.mex.2023.102377
License: MIT License
SHINE_color: MATLAB toolbox to control luminance of colorful images.
Home Page: https://doi.org/10.1016/j.mex.2023.102377
License: MIT License
Dear Shine Team,
first of all, thank you for sharing the toolbox and all the work you have put into this project! We have been using the toolbox for quite some time and are glad that you are offering a solution.
I've opened this Issue, because I found a possible bug in the file separate.m in line 61: background = image(find(max(imhist(image))));
Since the result of max(imhist(image)) is a single value the command: find(max(imhist(image))) always results in 1. That means that the command: background = image(find(max(imhist(image)))) is the same as background = image(1). The variable background holds the value of the first entry in the image matrix.
I assume that the value of the optional argument 3 should be computed . This would be possible with this code:
[~, background] = max(imhist(image));
Please let me know what you think and if I'm right with my assumption.
Best,
Tobias
Hello dear developer, thank you for such a great toolkit. I have a query I would like to ask you to answer, I would like to normalize some videos (about 40 videos, each video is 5 seconds long, 30fps) with low-level visual features, I found that the toolkit can only operate on a single video, so I performed frame extraction on each video, and when I tried to process the extracted frames as images (8450 images for the test), I got the message that I don't have enough memory again. I would like to ask the developer if there is a proper operation to do if I want to achieve what I mentioned earlier, i.e. normalize more than one video. Thanks!
Below is the log message:
SHINE_color - Log created on 2023-11-01 21:15:28
Input [1=images, 2=video]: 1
Type the image format [e.g., jpg, png]: png
Please note that our toolbox does not support transparent backgrounds.
Transparent backgrounds will be converted during manipulations.
Please manipulate the fore and background separately, and then remove the background
in an image processing software (e.g., GIMP).
Select the colorspace to perform the manipulations [1=HSV, 2=CIELab, 3=RGB, 4=Greyscale]: 3
Do you want diagnostic plots? (may take some time) [1=yes, 2=no]: 2
SHINE_color options [1=default, 2=custom]: 1
Number of images: 8450
Option: specMatch & histMatch with 1 iteration(s)
Option: whole image
Error: Out of memory.
Hi @takuma929 I have revised the manuscript and the toolbox following your suggestions (i.e., added diagnostic plots, reversed the order of the text in the sections summary and the statement, + minor changes). I will mark your comments as closed, but I will be looking forward for new comments.
Hi @RodDalBen thanks for your revision work. I have checked the revised code and manuscript.
My comments were essentially addressed but there are two points that I noticed.
Figure 2, on the right side, luminance histograms seems to be completely matched between cat1 and cat2 but slightly different for cat3. Could you check if this really the case?
It is great that there is now an option to save diagnostic images. Thanks for implementing this.
However, when I ran the "SHINE_color" with example images "2001-600.jpg", "2002-600.jpg" and "2003-600.jpg" using the default option, I've got two attached images.
In my command window, I've got a message "specMatch successful" and "histMatch successful", but these images show that they don't seem to be matched.. Could you check if luminance histograms and power spectra are properly plotted?
Consider adding the option to remove solid background. Should work fine when matching luminance or histogram separately for foreground and background.
(as part of JOSS review)
I have yet to dive into the code, but in the name of expediency, I think it appropriate to raise a question that I predict will arise:
HSV is only loosely related to psychophysically or physiologically meaningful colorspaces. Is it the right tool to use here?
More specifically, considering the range of potential ways in which one can convert from RGB to a (pseudo-)luminance channel, which choice was made? Do the results it produces suffice for pupilometry (and other visual psychophysics) experiments, and are the implicit assumptions appropriate?
Were alternatives such as CIELAB/CIELUV/DKL/[more recent color appearance spaces] considered?
At a minimum, a discussion of how these issues are thought of is warranted in the paper.
[Additional context: I know a fair amount about CIE colorimetry, but little about what I think of as 'computer scientist color-spaces' such as HSV]
First of all sorry for the delay, but I provide summary and specific comments for JOSS review.
Summary
The author created a MATLAB toolbox to control low-level image features in the luminance channel of color images. This work directly builds on the SHINE toolbox which performs the same transformation for achromatic images.
I think that the toolbox can be useful for experiments that require careful control of low-level image statistics. Thanks for making this toolbox available to the public. I have only a few comments.
Major comments
(1) It would be good to consider including some example images in the paper to show how different the original color images and the manipulated color images appear, along with manipulated statistics (e.g. luminance histogram or power spectrum). Currently, it is not clear from the paper what the toolbox does without running the code or reading a previous paper (Willenbockel et al., 2010).
(2) line 41 - 43: “In addition, to quantify the changes, the mean and standard deviation of each image’s Value channel is automatically calculated before and after manipulations.”
As stated here, the code calculates the mean and standard deviation of the luminance channel and I found that these values seem to be saved to “img_statistics_pos.txt” after running the code. From a user’s point of view, I think it would be helpful to save figures of the manipulated statistics (e.g., luminance histogram) so that users can check whether the code did what it intended to do. Thus, please consider adding an option to save these images.
Minor comments
(1) The current summary section starts with “pupil dilation are versatile measures…”. I understand that the author may have a motivation to use this toolbox for studies involving measurement of pupil dilation response, but I feel the summary still should start by explaining what the toolbox does and then stating what it can be useful for. Thus, I would request that the author reorder the summary section.
(2) I think that we need at least two images to execute the scripts (e.g., histogram matching), but the current code does not give any error message even if I try to run it with only one image. Consider displaying an error message.
Is there a reliable way to keep dpi
the same between the input images and the output ones? It seems like MATLAB does not have an out of the box solution for that.
Relevant discussions:
https://www.mathworks.com/matlabcentral/fileexchange/23629-export_fig
https://www.mathworks.com/matlabcentral/answers/102382-how-do-i-specify-the-output-sizes-of-jpeg-png-and-tiff-images-when-using-the-print-function-in-mat
https://blogs.mathworks.com/steve/2013/05/02/jpeg-versus-png-lossy-and-lossless-image-compression/?s_eid=PSM_4238
Hi. Excellent toolbox! How does SHINE_color deal with transparent pixels in PNG files, which typically have an alpha channel? I'm asking because I couldn't find any information about it in the Github and papers that describe how the toolbox works. If the toolbox ignores them, it would be great to know. If it doesn't ignore them, it would be great to have the option to ignore them.
Best!
Idea: Save each analysis in a new and separate subfolder in the OUTPUT folder. Save output pictures, diagnostics (txt and graphs), and also save a copy of the Command Window (see the diary
command).
(as part of JOSS review)
In the tutorial, I think that either point 3 should direct the user to navigate to SHINE_color\toolbox, or there should be an additional point instructing the user to add the folder and subfolders to the path.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.