Simulink Simulation Summary of image contrast adjustment

Source: Internet
Author: User

Image contrast adjustment can be done by a module contrast adjustment, parameters have input range and output range, the calculation process is determined by the following formula

Explain that when input<=low_in the output value is low_out+low_out, when low_in<input

Based on this principle, we have made our own Simulink module, as follows

I use the picture is 640*1024, so after sampling first reshape into 1-dimensional after unbuffer make the data in the form of sample output instead of frame, then is the data processing part, with the if else structure set LOW_IN is 20,high_ In is 235 if the input is less than 20 on the output 0, if the input is greater than 235 on the output 255, if the input between 20-235 in accordance with the formula shown above to build a model, and then buffer,655360 the data is 1 frames, the output reshape into 640* 1024 can be output, it should be noted that in order to unbuffer from the beginning of the data, Simulink must be run mode set to single-task run mode.

Two chart comparison before and after processing

Simulink Simulation Summary of image contrast adjustment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.