docker builder
This commit is contained in:
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@@ -0,0 +1,4 @@
|
||||
data/
|
||||
log/
|
||||
bin/
|
||||
deployment/
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,3 +8,4 @@ data
|
||||
bin
|
||||
log
|
||||
deployment
|
||||
build/go
|
||||
|
||||
@@ -9,9 +9,15 @@ RUN apt-get update && apt-get install -y \
|
||||
|
||||
RUN cd /opt && wget https://go.dev/dl/go1.20.linux-amd64.tar.gz && \
|
||||
tar -xvf go1.20.linux-amd64.tar.gz && rm go1.20.linux-amd64.tar.gz
|
||||
ENV GOROOT="/opt/go"
|
||||
ENV PATH="/opt/go/bin:${PATH}"
|
||||
ENV GOROOT="/opt/go" \
|
||||
PATH="/opt/go/bin:${PATH}" \
|
||||
GOPATH="/src/build/go"
|
||||
|
||||
RUN cd /opt && git clone -b v0.36.1 https://github.com/hybridgroup/gocv.git && cd gocv && \
|
||||
make install
|
||||
RUN cd /sjy01/image-proc && go mod download && make linux
|
||||
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
# RUN cd /sjy01/image-proc && go mod download && make linux
|
||||
# CMD ["/src/build/build.sh"]
|
||||
RUN cd /src && make linux
|
||||
3
build/build-in-docker.sh
Normal file
3
build/build-in-docker.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
# !/bin/bash
|
||||
|
||||
cd /src && go mod download && make linux
|
||||
13
pkg/producer/dark_bias.go
Normal file
13
pkg/producer/dark_bias.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package producer
|
||||
|
||||
const (
|
||||
DarkBiasValue = 15675.0/6
|
||||
)
|
||||
|
||||
// 暗场偏置校正 固定值15675校正
|
||||
func (r *Registrator) DoDarkBiasCorrection() {
|
||||
r.PanImage.SubtractFloat(DarkBiasValue)
|
||||
for i := 0; i < len(r.registeredMssImages); i++ {
|
||||
r.registeredMssImages[i].SubtractFloat(DarkBiasValue)
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,11 @@ func (r *Registrator) SubScenes() (panScenes []*Scene, mssScenes []*Scene, err e
|
||||
Y: i * hPAN,
|
||||
}
|
||||
|
||||
if scene.Height < scene.Width/2 {
|
||||
log.Info("scene height too small, skip")
|
||||
continue
|
||||
}
|
||||
|
||||
name := filepath.Base(r.Params.PanTiffFile)
|
||||
name = strings.TrimSuffix(name, ".tiff")
|
||||
scene.SceneId = fmt.Sprintf("%s_%03d", name, i+1)
|
||||
@@ -82,6 +87,11 @@ func (r *Registrator) SubScenes() (panScenes []*Scene, mssScenes []*Scene, err e
|
||||
Y: i * hMSS,
|
||||
}
|
||||
|
||||
if scene.Height < scene.Width/2 {
|
||||
log.Info("scene height too small, skip")
|
||||
continue
|
||||
}
|
||||
|
||||
for band := 0; band < 4; band++ {
|
||||
mat := r.registeredMssImages[band].Region(image.Rect(0, i*hMSS, 2336, y1))
|
||||
scene.Mat = append(scene.Mat, mat)
|
||||
|
||||
Reference in New Issue
Block a user