# problemas al utilizar Imagenes en Julia

**URL:** <https://discourse.julialang.org/t/problemas-al-utilizar-imagenes-en-julia/21407>\
**Category:** New to Julia\
**Created:** [March 3, 2019, 12:11am UTC](https://discourse.julialang.org/t/problemas-al-utilizar-imagenes-en-julia/21407 "2019-03-03T00:11:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GERSON\_EZEQUIEL\_HERN](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gerson_ezequiel_hern/32/7437_2.png) [@GERSON\_EZEQUIEL\_HERN](https://discourse.julialang.org/u/GERSON_EZEQUIEL_HERN)\
**Post date:** [March 3, 2019, 12:11am UTC](https://discourse.julialang.org/t/problemas-al-utilizar-imagenes-en-julia/21407/1 "2019-03-03T00:11:13Z")

</div>

tengo esto  
julia\> using TestImages

julia\> img = testimage(“mandrill”)  
512×512 Array{RGB{N0f8},2} with eltype ColorTypes.RGB{FixedPointNumbers.Normed{UInt8,8}}:  
RGB{N0f8}(0.643,0.588,0.278) RGB{N0f8}(0.247,0.224,0.122) RGB{N0f8}(0.294,0.169,0.039) … RGB{N0f8}(0.553,0.667,0.396) RGB{N0f8}(0.702,0.737,0.463)  
RGB{N0f8}(0.471,0.49,0.243) RGB{N0f8}(0.529,0.38,0.129) RGB{N0f8}(0.216,0.137,0.09) RGB{N0f8}(0.533,0.624,0.502) RGB{N0f8}(0.471,0.541,0.29)  
RGB{N0f8}(0.388,0.29,0.122) RGB{N0f8}(0.518,0.463,0.18) RGB{N0f8}(0.235,0.161,0.141) RGB{N0f8}(0.341,0.357,0.302) RGB{N0f8}(0.376,0.314,0.192)  
RGB{N0f8}(0.251,0.31,0.188) RGB{N0f8}(0.588,0.565,0.224) RGB{N0f8}(0.443,0.384,0.137) RGB{N0f8}(0.357,0.282,0.2) RGB{N0f8}(0.243,0.306,0.184)  
RGB{N0f8}(0.431,0.329,0.153) RGB{N0f8}(0.51,0.518,0.18) RGB{N0f8}(0.635,0.518,0.204) RGB{N0f8}(0.251,0.357,0.239) RGB{N0f8}(0.314,0.369,0.235)  
RGB{N0f8}(0.38,0.329,0.114) RGB{N0f8}(0.322,0.314,0.153) RGB{N0f8}(0.702,0.651,0.271) … RGB{N0f8}(0.545,0.675,0.325) RGB{N0f8}(0.659,0.788,0.463)  
RGB{N0f8}(0.239,0.149,0.09) RGB{N0f8}(0.275,0.184,0.102) RGB{N0f8}(0.584,0.557,0.2) RGB{N0f8}(0.792,0.827,0.463) RGB{N0f8}(0.651,0.675,0.467)  
RGB{N0f8}(0.212,0.09,0.122) RGB{N0f8}(0.247,0.192,0.118) RGB{N0f8}(0.451,0.482,0.161) RGB{N0f8}(0.42,0.537,0.271) RGB{N0f8}(0.525,0.596,0.314)  
RGB{N0f8}(0.251,0.212,0.216) RGB{N0f8}(0.263,0.161,0.145) RGB{N0f8}(0.282,0.208,0.102) RGB{N0f8}(0.663,0.651,0.278) RGB{N0f8}(0.467,0.518,0.29)  
RGB{N0f8}(0.216,0.125,0.09) RGB{N0f8}(0.212,0.09,0.067) RGB{N0f8}(0.2,0.208,0.063) RGB{N0f8}(0.38,0.318,0.153) RGB{N0f8}(0.596,0.561,0.239)  
RGB{N0f8}(0.212,0.106,0.047) RGB{N0f8}(0.216,0.165,0.082) RGB{N0f8}(0.373,0.173,0.082) … RGB{N0f8}(0.306,0.31,0.125) RGB{N0f8}(0.369,0.235,0.165)  
RGB{N0f8}(0.2,0.11,0.059) RGB{N0f8}(0.231,0.173,0.114) RGB{N0f8}(0.357,0.314,0.125) RGB{N0f8}(0.388,0.267,0.161) RGB{N0f8}(0.243,0.341,0.173)  
RGB{N0f8}(0.196,0.125,0.063) RGB{N0f8}(0.231,0.302,0.153) RGB{N0f8}(0.412,0.349,0.212) RGB{N0f8}(0.247,0.459,0.251) RGB{N0f8}(0.408,0.431,0.243)  
RGB{N0f8}(0.2,0.075,0.035) RGB{N0f8}(0.231,0.137,0.047) RGB{N0f8}(0.376,0.471,0.157) RGB{N0f8}(0.58,0.576,0.365) RGB{N0f8}(0.314,0.31,0.208)  
RGB{N0f8}(0.224,0.063,0.09) RGB{N0f8}(0.208,0.153,0.071) RGB{N0f8}(0.353,0.353,0.137) RGB{N0f8}(0.416,0.361,0.161) RGB{N0f8}(0.518,0.596,0.259)  
RGB{N0f8}(0.345,0.275,0.11) RGB{N0f8}(0.235,0.325,0.086) RGB{N0f8}(0.545,0.498,0.161) … RGB{N0f8}(0.506,0.592,0.322) RGB{N0f8}(0.486,0.522,0.29)  
RGB{N0f8}(0.325,0.325,0.09) RGB{N0f8}(0.475,0.42,0.102) RGB{N0f8}(0.584,0.569,0.165) RGB{N0f8}(0.451,0.482,0.243) RGB{N0f8}(0.412,0.482,0.278)  
RGB{N0f8}(0.235,0.208,0.125) RGB{N0f8}(0.373,0.357,0.075) RGB{N0f8}(0.502,0.541,0.157) RGB{N0f8}(0.506,0.608,0.282) RGB{N0f8}(0.659,0.761,0.353)  
RGB{N0f8}(0.267,0.227,0.145) RGB{N0f8}(0.216,0.18,0.078) RGB{N0f8}(0.235,0.192,0.102) RGB{N0f8}(0.745,0.757,0.58) RGB{N0f8}(0.569,0.588,0.439)  
RGB{N0f8}(0.592,0.455,0.251) RGB{N0f8}(0.157,0.125,0.106) RGB{N0f8}(0.192,0.129,0.086) RGB{N0f8}(0.322,0.306,0.196) RGB{N0f8}(0.541,0.675,0.208)  
⋮ ⋱ ⋮  
RGB{N0f8}(0.518,0.675,0.722) RGB{N0f8}(0.553,0.714,0.749) RGB{N0f8}(0.561,0.686,0.718) RGB{N0f8}(0.361,0.369,0.329) RGB{N0f8}(0.345,0.306,0.337)  
RGB{N0f8}(0.51,0.678,0.686) RGB{N0f8}(0.549,0.682,0.639) RGB{N0f8}(0.545,0.663,0.627) RGB{N0f8}(0.333,0.275,0.357) RGB{N0f8}(0.31,0.376,0.298)  
RGB{N0f8}(0.545,0.675,0.722) RGB{N0f8}(0.494,0.675,0.663) RGB{N0f8}(0.486,0.588,0.459) … RGB{N0f8}(0.349,0.235,0.329) RGB{N0f8}(0.282,0.302,0.271)  
RGB{N0f8}(0.482,0.647,0.667) RGB{N0f8}(0.478,0.573,0.471) RGB{N0f8}(0.467,0.49,0.412) RGB{N0f8}(0.322,0.369,0.263) RGB{N0f8}(0.318,0.251,0.239)  
RGB{N0f8}(0.506,0.584,0.557) RGB{N0f8}(0.451,0.576,0.537) RGB{N0f8}(0.51,0.588,0.471) RGB{N0f8}(0.302,0.18,0.298) RGB{N0f8}(0.314,0.388,0.29)  
RGB{N0f8}(0.502,0.565,0.533) RGB{N0f8}(0.471,0.6,0.588) RGB{N0f8}(0.557,0.667,0.647) RGB{N0f8}(0.38,0.349,0.243) RGB{N0f8}(0.282,0.318,0.322)  
RGB{N0f8}(0.506,0.612,0.624) RGB{N0f8}(0.604,0.659,0.596) RGB{N0f8}(0.561,0.675,0.655) RGB{N0f8}(0.267,0.325,0.263) RGB{N0f8}(0.322,0.314,0.247)  
RGB{N0f8}(0.561,0.659,0.71) RGB{N0f8}(0.525,0.663,0.702) RGB{N0f8}(0.518,0.58,0.573) … RGB{N0f8}(0.361,0.251,0.282) RGB{N0f8}(0.322,0.341,0.294)  
RGB{N0f8}(0.518,0.635,0.608) RGB{N0f8}(0.51,0.612,0.58) RGB{N0f8}(0.498,0.561,0.616) RGB{N0f8}(0.345,0.337,0.192) RGB{N0f8}(0.373,0.302,0.267)  
RGB{N0f8}(0.502,0.62,0.541) RGB{N0f8}(0.498,0.573,0.545) RGB{N0f8}(0.455,0.561,0.576) RGB{N0f8}(0.325,0.247,0.227) RGB{N0f8}(0.325,0.275,0.29)  
RGB{N0f8}(0.416,0.486,0.498) RGB{N0f8}(0.447,0.525,0.529) RGB{N0f8}(0.494,0.584,0.655) RGB{N0f8}(0.384,0.298,0.29) RGB{N0f8}(0.267,0.365,0.345)  
RGB{N0f8}(0.459,0.51,0.463) RGB{N0f8}(0.471,0.498,0.49) RGB{N0f8}(0.447,0.557,0.569) RGB{N0f8}(0.298,0.318,0.224) RGB{N0f8}(0.278,0.231,0.212)  
RGB{N0f8}(0.42,0.451,0.467) RGB{N0f8}(0.416,0.498,0.475) RGB{N0f8}(0.451,0.541,0.529) … RGB{N0f8}(0.408,0.29,0.306) RGB{N0f8}(0.329,0.337,0.365)  
RGB{N0f8}(0.38,0.42,0.447) RGB{N0f8}(0.388,0.451,0.475) RGB{N0f8}(0.451,0.541,0.561) RGB{N0f8}(0.373,0.31,0.29) RGB{N0f8}(0.29,0.353,0.286)  
RGB{N0f8}(0.365,0.388,0.353) RGB{N0f8}(0.361,0.486,0.478) RGB{N0f8}(0.455,0.58,0.549) RGB{N0f8}(0.353,0.38,0.294) RGB{N0f8}(0.349,0.325,0.333)  
RGB{N0f8}(0.376,0.451,0.525) RGB{N0f8}(0.463,0.553,0.549) RGB{N0f8}(0.522,0.627,0.62) RGB{N0f8}(0.42,0.318,0.349) RGB{N0f8}(0.325,0.357,0.376)  
RGB{N0f8}(0.475,0.58,0.608) RGB{N0f8}(0.482,0.612,0.588) RGB{N0f8}(0.486,0.588,0.545) RGB{N0f8}(0.353,0.365,0.275) RGB{N0f8}(0.318,0.314,0.235)  
RGB{N0f8}(0.494,0.663,0.659) RGB{N0f8}(0.459,0.592,0.592) RGB{N0f8}(0.475,0.533,0.522) … RGB{N0f8}(0.388,0.271,0.337) RGB{N0f8}(0.314,0.247,0.278)  
RGB{N0f8}(0.035,0.043,0.047) RGB{N0f8}(0.039,0.047,0.043) RGB{N0f8}(0.043,0.059,0.047) RGB{N0f8}(0.008,0.02,0.0) RGB{N0f8}(0.016,0.02,0.008)

y al darle

julia\> imshow(img)

me sale este error

julia\> imshow(img)  
ERROR: UndefVarError: imshow not defined  
Stacktrace:  
[1] top-level scope at none:0

ya utilice

julia\> ImageView.imshow(img)  
ERROR: UndefVarError: ImageView not defined  
Stacktrace:  
[1] top-level scope at none:0

Alguien me puede ayudar?

---

<div class="post-metadata">

**Author:** ![longemen3000](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/longemen3000/32/7298_2.png) [@longemen3000](https://discourse.julialang.org/u/longemen3000)\
**Post date:** [March 3, 2019, 12:20am UTC](https://discourse.julialang.org/t/problemas-al-utilizar-imagenes-en-julia/21407/2 "2019-03-03T00:20:04Z")

</div>

Hola, tipicamente acá hay solamente personas de habla inglesa, así que más gente vendría con un post en inglés, pero dejame ver 😄

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [March 3, 2019, 12:23am UTC](https://discourse.julialang.org/t/problemas-al-utilizar-imagenes-en-julia/21407/3 "2019-03-03T00:23:23Z")

</div>

I think you need `using Images` as well.

Please read

> [@PSA: how to quote code with backticks](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530):
>
> This is a short post on how to use backticks (` and ```) to quote code, so it is easy to read. This post can be linked to new users who are confused by this feature. Why By quoting your code, you get a monospaced font (which preserves indentation) and syntax highlighting. This makes it easier to read your code and help you. Displayed code looks like this: function displayed\_code(x::Int, y::Int) if x \< y println("x is smaller") else println("or not") end end Inline…

(Efectivamente aquí suele haber posts sólo en inglés.  
Creo que necesitas `using Images` también.)

---

<div class="post-metadata">

**Author:** ![longemen3000](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/longemen3000/32/7298_2.png) [@longemen3000](https://discourse.julialang.org/u/longemen3000)\
**Post date:** [March 3, 2019, 12:28am UTC](https://discourse.julialang.org/t/problemas-al-utilizar-imagenes-en-julia/21407/4 "2019-03-03T00:28:18Z")

</div>

prueba esto, debería funcionar

```julia
using ImageView, TestImages
img = testimage(“mandrill”)
imshow(img)

```

Actualización, no requiere el paquete Images para la visualización, ImageView es necesario

---

<div class="post-metadata">

**Author:** ![GERSON\_EZEQUIEL\_HERN](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gerson_ezequiel_hern/32/7437_2.png) [@GERSON\_EZEQUIEL\_HERN](https://discourse.julialang.org/u/GERSON_EZEQUIEL_HERN)\
**Post date:** [March 4, 2019, 3:12pm UTC](https://discourse.julialang.org/t/problemas-al-utilizar-imagenes-en-julia/21407/5 "2019-03-04T15:12:56Z")

</div>

thanks…
