# Reduce image size and filter?

**URL:** https://discourse.julialang.org/t/reduce-image-size-and-filter/105926
**Category:** Visualization
**Created:** [November 8, 2023, 4:50am UTC](https://discourse.julialang.org/t/reduce-image-size-and-filter/105926 "2023-11-08T04:50:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rmfritz](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@rmfritz](https://discourse.julialang.org/u/rmfritz)
#### Post date: [November 8, 2023, 4:50am UTC](https://discourse.julialang.org/t/reduce-image-size-and-filter/105926/1 "2023-11-08T04:50:17Z")

</div>

I’m working with a physically-based rendering image (HDR, units of radiance or irradiance in an RGB model) and I would like to create an unsharp mask from it, reducing the size and applying a box filter. I am not seeing an obvious way of doing this. Am I missing something? Or should I just proceed to write my own? (Sigh.) I do have an example to work from, but these things are fiddly and it might take some effort.

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [November 8, 2023, 8:16am UTC](https://discourse.julialang.org/t/reduce-image-size-and-filter/105926/2 "2023-11-08T08:16:13Z")

</div>

I would expect that functions from the Images package should be able to do this, see e.g. [ImageFiltering.jl · ImageFiltering](https://juliaimages.org/ImageFiltering.jl/stable/) and [Cropping, Resizing and Rescaling · JuliaImages](https://juliaimages.org/latest/examples/spatial_transformation/SpatialTransformations/).

---

<div class="post-metadata">

### Author: ![Eben60](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eben60/32/13475_2.png) [@Eben60](https://discourse.julialang.org/u/Eben60)
#### Post date: [November 8, 2023, 8:34am UTC](https://discourse.julialang.org/t/reduce-image-size-and-filter/105926/3 "2023-11-08T08:34:28Z")

</div>

As usually, there would be more that one package to do something in Julia. One of these (which I never used) is the [OpenCV.jl](https://docs.opencv.org/4.x/d8/da4/tutorial_julia.html) Julia wrapper.

---

<div class="post-metadata">

### Author: ![rmfritz](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@rmfritz](https://discourse.julialang.org/u/rmfritz)
#### Post date: [November 8, 2023, 9:52pm UTC](https://discourse.julialang.org/t/reduce-image-size-and-filter/105926/5 "2023-11-08T21:52:39Z")

</div>

Thanks. Unfortunately, with the exception of ImageFiltering, most of those libraries do not work with physical units. There are hints that OpenCV does (at least, it offers HDR) but I can’t quickly find out for sure.

Thanks for the replies, anyway.
