JuliaImages / JuliaImages/ImageCore.jl

Inconsistency between accepted argument types for YCbCr constructor and colorview

Open
#200 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
28
Forks
21
PR merge metrics
No merged PRs in 30d

Description

There seem to be some inconsistencies in the accepted argument-types to the YCbCr constructor and the element-types of the channels in colorview.

Here, all the following types work:

using ImageCore
types = (UInt8, Int, N0f8, Float32)

for T in types
    YCbCr(rand(T, 3)...)
end

While here, only the Float32 does:

for T in types
    try
        colorview(YCbCr, (rand(T, 10, 10) for _ in 1:3)...)
        @info "worked for type $T"
    catch ex
        if ex isa TypeError
            @warn "failed for type $T"
        else
            throw(ex)
        end
    end
end

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the two Julia reproductions from the issue and inspect the YCbCr constructor and colorview implementations in ImageCore.jl. The work is done when the accepted argument types and channel element types are consistent for the listed types, with regression coverage for the demonstrated cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.