Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pfuchs committed Feb 24, 2023
2 parents bdade3d + e7c5c66 commit 92f809a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ImageQualityIndexes"
uuid = "2996bd0c-7a13-11e9-2da2-2f5ce47296a9"
authors = ["Johnny Chen <[email protected]>"]
version = "0.3.3"
version = "0.3.4"

[deps]
ImageContrastAdjustment = "f332f351-ec65-5f6a-b3d1-319c6670881a"
Expand All @@ -10,6 +10,7 @@ ImageDistances = "51556ac3-7006-55f5-8cb3-34580c88182d"
ImageFiltering = "6a3955dd-da59-5b1f-98d4-e7296123deb5"
LazyModules = "8cdb02fc-e678-4876-92c5-9defec4f444e"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
Expand All @@ -19,6 +20,7 @@ ImageDistances = "0.2.4"
ImageFiltering = "0.6.3, 0.7"
LazyModules = "0.3"
OffsetArrays = "0.11, 1"
SnoopPrecompile = "1"
julia = "1"

[extras]
Expand Down
2 changes: 2 additions & 0 deletions src/ImageQualityIndexes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ include("msssim.jl")
include("colorfulness.jl")
include("entropy.jl")

include("precompile.jl")

export
# generic
assess,
Expand Down
18 changes: 18 additions & 0 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using SnoopPrecompile

@precompile_setup begin
imgs_list = Any[
[rand(Gray{N0f8}, 32, 32) for _ in 1:2],
[rand(RGB{N0f8}, 32, 32) for _ in 1:2],
[rand(Gray{Float64}, 32, 32) for _ in 1:2],
[rand(RGB{Float64}, 32, 32) for _ in 1:2],
[rand(N0f8, 32, 32) for _ in 1:2],
[rand(Float64, 32, 32) for _ in 1:2],
]
@precompile_all_calls begin
for imgs in imgs_list
assess_psnr(imgs...)
assess_ssim(imgs...)
end
end
end

0 comments on commit 92f809a

Please sign in to comment.