[FFmpeg-user] how to invert a colormap implemented with filter_complex

Audette, Michel A. maudette at odu.edu
Thu Jun 22 20:12:36 EEST 2023


Dear members of the ffmpeg community,

I'm trying to visualize the deep neural network-based depth estimation result based on a video input, using code available on GitHub: https://github.com/tinghuiz/SfMLearner . There is a demo on that page whose visualization is exactly right: a purple-to-yellow colormap that corresponds to plasma. e.g.:

[cid:d60c3a17-abd3-469a-978f-90199c4baf1f]

I believe that the implementation is along the lines of the following:

 -filter_complex "pseudocolor=p=plasma"

However, my current result has the proximate objects mapped to dark purple and the furthest objects appearing in yellow, which is counterintuitive from a saliency standpoint.

[cid:ce889fa7-fb3e-49d8-878c-bf66728a98c5]
It is the opposite of what I would like to achieve.

How can I invert this mapping, while retaining that particular plasma colormap?

If I try to use -lutrgb="r=negval:g=negval:b=negval", right after the -filter_complex command, I get "unrecognized option".

Thanks for your support.

Michel


Michel Audette, Ph.D.
Associate Professor, Department of Electrical and Computer Engineering,
Graduate Program Director, Biomedical Engineering,
Old Dominion University,
Norfolk, VA.
maudette at odu.edu; office phone: 757-683-6940.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 121209 bytes
Desc: image.png
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20230622/8c6e9d99/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 181179 bytes
Desc: image.png
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20230622/8c6e9d99/attachment-0001.png>


More information about the ffmpeg-user mailing list