Do RRC with histogram LUT, ineffective!

This commit is contained in:
nuknal
2024-06-17 10:59:48 +08:00
parent 35bf364e97
commit ce01f3b2ce
3 changed files with 12 additions and 7 deletions

View File

@@ -2,14 +2,15 @@ package producer
import (
"fmt"
"path/filepath"
"github.com/sirupsen/logrus"
"starwiz.cn/sjy01/image-proc/pkg/rrc"
)
func (r *Registrator) DoRRC() error {
logrus.Println("try to do RRC...")
lutPAN, err := rrc.LoadLUT("data/rrc/B0.LUT", 9344)
func (r *Registrator) DoRRC(lutDir string) error {
logrus.Printf("try to do RRC [%s]...", lutDir)
lutPAN, err := rrc.LoadLUT(filepath.Join(lutDir, "B0.LUT"), 9344)
if err != nil {
logrus.Error("load pan gray table failed")
return err
@@ -23,7 +24,7 @@ func (r *Registrator) DoRRC() error {
}
for i := 0; i < 4; i++ {
lutMSS, err := rrc.LoadLUT(fmt.Sprintf("data/rrc/B%d.LUT", i+1), 2336)
lutMSS, err := rrc.LoadLUT(filepath.Join(lutDir, fmt.Sprintf("B%d.LUT", i+1)), 2336)
if err != nil {
logrus.Error("load mss gray table failed")
return err