JuliaImages / JuliaImages/ImageView.jl
ImageView's imshow incorrectly displays HSV images?
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 138
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
the toy code below demonstrates the problem: a one-pixel green RGB image is displayed as green, but is displayed as red when converted to HSV:
# Activate a brand-new environment
import Pkg
Pkg.activate(temp=true)
Pkg.add(["Images", "ImageView"])
using Images
using ImageView
# Prepare one-pixel RGB image
x = zeros(RGB{N0f8}, (1,1))
x .= RGB(0, 1, 0) # green
imshow(x, name="RGB") # correctly displays green
# Convert to HSV
y = HSV.(x) # conversion seems to be correct, HSV{Float32}(120.0f0,1.0f0,1.0f0)
imshow(y, name="HSV") # diplays red instead of green!
Information for the troubleshooting:
using(Dates)
today()
versioninfo()
Pkg.status()
julia> today()
2023-06-27
julia> versioninfo()
Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 8 × Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
Threads: 4 on 8 virtual cores
Environment:
LD_LIBRARY_PATH = :/home/xxxx/.emacs.d/tree-sitter-julia/src/
JULIA_NUM_THREADS = 4
LD_ARGV0_REL = ../bin/vshd
JULIA_EDITOR = vim
JULIA_PKG_DEVDIR = /home/xxxx/juliadev
JULIA_CONDAPKG_BACKEND = Null
JULIA_PYTHONCALL_EXE = /home/xxxx/.julia/conda/3/bin/python
julia> Pkg.status()
Status `/tmp/jl_M9VHws/Project.toml`
[86fae568] ImageView v0.11.6
[916415d5] Images v0.25.3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported one-pixel RGB-to-HSV example with Julia 1.9.1, Images v0.25.3, and ImageView v0.11.6, then trace the imshow entry point and its HSV display handling. Done means an HSV image with hue 120° is displayed green rather than red, with a regression test covering the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100