[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
mathematica tips and tricks
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /sci/ - Science & Math

Thread replies: 11
Thread images: 2
File: mathematica.jpg (20 KB, 480x360) Image search: [Google]
mathematica.jpg
20 KB, 480x360
I have 2 matrix from 2 different grayscaled Imagedata.
i merged in a single matrix qq and now i must apply a formula that was sent to me today as ColorFunction.


ColorFunction -> (RGBColor[1 - 1/3 #[Alpha], 1 - #[Alpha], 1 - #[Alpha]] /. [Alpha] -> 0.9 &)


i never used this option and when i try using it i get only errors, i tried with

ColorConvert[Image[qq],ColorFunction -> (RGBColor[1 - 1/3 #[Alpha], 1 - #[Alpha], 1 - #[Alpha]] /. [Alpha] -> 0.9 &)]

i am just a novice in mathematica
how should i solve this problem?
>>
>>8066262
Try
ColorConvert[Image[qq], ColorFunction -> (RGBColor[1 - 1/3 # 0.9, 1 - # 0.9, 1 - # 0.9])&]
>>
>>8066274
ColorConvert::imgcstype: ColorFunction->RGBColor[1-Power[<<2>>] #1 0.9,1-#1 0.9,1-#1 0.9]& is an invalid color space specification.

nope just errors
>>
>>8066284
Well then there's something wrong with the output the color function is producing.

Do you know what it's supposed to do? Do you have examples?
>>
Actually did you even read the documentation for ColorConvert?

https://reference.wolfram.com/language/ref/ColorConvert.html

I don't think it's supposed to take a ColorFunction
>>
>>8066297
then what command has this function since it change the color?
>>
>>8066293
like background of pic related
>>
>>8066311
Just map your function over the pixels.
>>
>>8066330
how the fuck do i do it?
>>
File: Capture.png (32 KB, 709x668) Image search: [Google]
Capture.png
32 KB, 709x668
>>8066333
Like this

Replace f with your whatever color function you are trying to use, and use the correct numbers for the partitioning
>>
>>8066344
thanks
Thread replies: 11
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.