Giter Site home page Giter Site logo

lut's Introduction

Hi there, I am a SDE.

🏢 Job:Graphics, engine, art.

🛠 Favorite languages:C++ and Hlsl.

💬 Good languages: C++、Hlsl、Glsl、Rust、TypeScript、nodejs、C#(Programming without any language limitations)

📫 Reach me via Email: [email protected]

🎨 Side projects:Technical artistGraphics Engine

ReadmeStats-Image

lut's People

Contributors

ray-cast avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lut's Issues

Example?

Hi,

Thanks for the library.
I'm trying the samples without luck.

Here is my reproducible sample:

#include <iostream>
#include "lut.hpp"

#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"

int main()
{

  std::string lut_name = "default";
  std::string image_path = "image";
  std::string out_path = "image";

  int width, height, channels;
  auto *img = stbi_load(image_path.c_str(), &width, &height, &channels, 3);

  if (img == nullptr)
  {
    printf("Error in loading the image\n");
    return 1;
  }

  auto lut = octoon::image::lut::parse(lut_name);

  for (std::size_t i = 0; i < width; i++)
  {
    for (std::size_t j = 0; j < height; j++)
    {
      auto *px = img + (i * j) * 3;

      auto data = lut.lookup(px[0], px[1], px[2]); // The (r,g,b) can be extended to support these types of std::uint8_t, std::uint16_t, std::uint32_t, float, double

      px[0] = data[0];
      px[1] = data[1];
      px[2] = data[2];
    }
  }

  stbi_write_png(out_path.c_str(), width, height, 3, img, width * 3);

  stbi_image_free(img);

  return 0;
}

But this is my output,

image

Can you point me in the right direction?
Thanks

Direct2D Lut Effect

Thanks for this, I use it as a raw effect for my video sequencer.

Could you take a look at Direct2D's LUT: https://docs.microsoft.com/en-us/windows/win32/direct2d/3d-lookup-table-effect

Also, this: https://docs.microsoft.com/en-us/windows/win32/api/d2d1_3/nf-d2d1_3-id2d1devicecontext2-createlookuptable3d

I'm new to lut and perhaps you can advise on what to pass to this function. The idea is to use GPU for the color grading instead of the bitmap directly.

This may also help: https://github.com/microsoft/Win2D/blob/master/winrt/lib/effects/EffectTransferTable3D.cpp

Best,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.