{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaImages/ImageCore.jl/issues/63","repository_url":"https://api.github.com/repos/JuliaImages/ImageCore.jl","labels_url":"https://api.github.com/repos/JuliaImages/ImageCore.jl/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/JuliaImages/ImageCore.jl/issues/63/comments","events_url":"https://api.github.com/repos/JuliaImages/ImageCore.jl/issues/63/events","html_url":"https://github.com/JuliaImages/ImageCore.jl/issues/63","id":355493573,"node_id":"MDU6SXNzdWUzNTU0OTM1NzM=","number":63,"title":"the wraparound behavior of using N0f8 seems unwanted?","user":{"login":"johnnychen94","id":8684355,"node_id":"MDQ6VXNlcjg2ODQzNTU=","avatar_url":"https://avatars1.githubusercontent.com/u/8684355?v=4","gravatar_id":"","url":"https://api.github.com/users/johnnychen94","html_url":"https://github.com/johnnychen94","followers_url":"https://api.github.com/users/johnnychen94/followers","following_url":"https://api.github.com/users/johnnychen94/following{/other_user}","gists_url":"https://api.github.com/users/johnnychen94/gists{/gist_id}","starred_url":"https://api.github.com/users/johnnychen94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnnychen94/subscriptions","organizations_url":"https://api.github.com/users/johnnychen94/orgs","repos_url":"https://api.github.com/users/johnnychen94/repos","events_url":"https://api.github.com/users/johnnychen94/events{/privacy}","received_events_url":"https://api.github.com/users/johnnychen94/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-30T09:09:48Z","updated_at":"2018-08-30T10:13:17Z","closed_at":"2018-08-30T09:24:25Z","author_association":"NONE","body":"For example, we have a new denoising algorithm `imgdenoise_new(img)` and want to compare the performance. A subtraction is often used to get the difference.\r\n\r\n```julia\r\nimg_new = imgdenoise_new(img)\r\nimg_old = imgdenoise_old(img)\r\n\r\nimg_diff = img_new - img_old\r\n```\r\n\r\nFor example, I want to get the img noise, which should be very small...\r\n```julia\r\nori_img = fill(N0f8(0.5),2,2)\r\nnoisy_img = N0f8.(ori_img + randn(2,2)/100)\r\nimg_noise = noisy_img - ori_img\r\n```\r\n\r\n\r\nSince `FixedPointNumbers` use the same wraparound behavior for overflow as Julia does, the `img_diff` and `img_noise` are not actually what we want; some minor differences will become very large. Indeed, truncation behavior seems reasonable for image processing tasks.\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaImages/ImageCore.jl/issues/comments/417267582","html_url":"https://github.com/JuliaImages/ImageCore.jl/issues/63#issuecomment-417267582","issue_url":"https://api.github.com/repos/JuliaImages/ImageCore.jl/issues/63","id":417267582,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzI2NzU4Mg==","user":{"login":"johnnychen94","id":8684355,"node_id":"MDQ6VXNlcjg2ODQzNTU=","avatar_url":"https://avatars1.githubusercontent.com/u/8684355?v=4","gravatar_id":"","url":"https://api.github.com/users/johnnychen94","html_url":"https://github.com/johnnychen94","followers_url":"https://api.github.com/users/johnnychen94/followers","following_url":"https://api.github.com/users/johnnychen94/following{/other_user}","gists_url":"https://api.github.com/users/johnnychen94/gists{/gist_id}","starred_url":"https://api.github.com/users/johnnychen94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnnychen94/subscriptions","organizations_url":"https://api.github.com/users/johnnychen94/orgs","repos_url":"https://api.github.com/users/johnnychen94/repos","events_url":"https://api.github.com/users/johnnychen94/events{/privacy}","received_events_url":"https://api.github.com/users/johnnychen94/received_events","type":"User","site_admin":false},"created_at":"2018-08-30T10:13:17Z","updated_at":"2018-08-30T10:13:17Z","author_association":"NONE","body":" @Evizero Many thanks. \r\nSo the solution for this is to write `img = Gray{Float32}.(load(\"img_path\"))` for all image loadings.\r\n\r\nI create this issue here because the default loading behavior is kind of annoying, and I'm not sure if this is an image-processing specific problem or not."}}
{"actor":{"display_login":"johnnychen94"}}