This file is indexed.

/usr/share/hugin/Makefile.equirect.mk is in hugin-data 2011.4.0+dfsg-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# Requires Panotools::Script
# Simple usage:
#   make -f Makefile.equirect.mk equirect_all PTO=myproject.pto

# requirements:
#
# libtiff (tiffcp)
# libpano13 (PTtiff2psd)
# Panotools::Script (erect2cubic jpeg2qtvr erect2planet transform-pano erect2mercator)
# ImageMagick (convert)
# hugin (nona)
# Image::ExifTool (exiftool)

include $(PTO).mk

JPEG_QUALITY = 70
GEOMETRY = $(HUGIN_WIDTH)x$(HUGIN_WIDTH)

ifdef DO_LDR_BLENDED
FUSED_SUFFIX =
else
FUSED_SUFFIX = _fused
endif

equirect_all : qtvr sky planet mercator

.PHONY: equirect_all layered psd qtvr preview panosalado vrml x3d spiv sky planet mercator equirect_clean faces_clean sky_clean planet_clean mercator_clean
.SECONDARY: $(LDR_EXPOSURE_LAYERS_REMAPPED) $(LDR_STACKS) $(LDR_LAYERS)

EQUIRECT_PREFIX = $(LDR_REMAPPED_PREFIX)$(FUSED_SUFFIX)
EQUIRECT_PREFIX_SHELL = $(LDR_REMAPPED_PREFIX_SHELL)$(FUSED_SUFFIX)

# a multilayer TIFF

layered : $(EQUIRECT_PREFIX)_multilayer.tif

# a multilayer PSD

psd : $(EQUIRECT_PREFIX)_multilayer.psd

# a set of cubefaces

CUBE_PREFIX = $(EQUIRECT_PREFIX)_cube
CUBE_PREFIX_SHELL = $(EQUIRECT_PREFIX_SHELL)_cube

CUBE_PROJECT = $(CUBE_PREFIX).pto
CUBE_PROJECT_SHELL = $(CUBE_PREFIX_SHELL).pto

JPEG_FACE_0 = $(CUBE_PREFIX)0.jpg
JPEG_FACE_0_SHELL = $(CUBE_PREFIX_SHELL)0.jpg
JPEG_FACE_1 = $(CUBE_PREFIX)1.jpg
JPEG_FACE_1_SHELL = $(CUBE_PREFIX_SHELL)1.jpg
JPEG_FACE_2 = $(CUBE_PREFIX)2.jpg
JPEG_FACE_2_SHELL = $(CUBE_PREFIX_SHELL)2.jpg
JPEG_FACE_3 = $(CUBE_PREFIX)3.jpg
JPEG_FACE_3_SHELL = $(CUBE_PREFIX_SHELL)3.jpg
JPEG_FACE_4 = $(CUBE_PREFIX)4.jpg
JPEG_FACE_4_SHELL = $(CUBE_PREFIX_SHELL)4.jpg
JPEG_FACE_5 = $(CUBE_PREFIX)5.jpg
JPEG_FACE_5_SHELL = $(CUBE_PREFIX_SHELL)5.jpg

JPEG_FACES = $(JPEG_FACE_0) $(JPEG_FACE_1) $(JPEG_FACE_2) \
    $(JPEG_FACE_3) $(JPEG_FACE_4) $(JPEG_FACE_5)
JPEG_FACES_SHELL = $(JPEG_FACE_0_SHELL) $(JPEG_FACE_1_SHELL) \
    $(JPEG_FACE_2_SHELL) $(JPEG_FACE_3_SHELL) \
    $(JPEG_FACE_4_SHELL) $(JPEG_FACE_5_SHELL)

CUBE_ROLL = 0.0
CUBE_PITCH = 0.0
CUBE_YAW = 0.0

$(CUBE_PROJECT) : $(EQUIRECT_PREFIX).tif
	erect2cubic --erect=$(EQUIRECT_PREFIX_SHELL).tif --ptofile=$(CUBE_PROJECT_SHELL) \
	--filespec="JPEG q$(JPEG_QUALITY)" \
	--roll=$(CUBE_ROLL) --pitch=$(CUBE_PITCH) --yaw=$(CUBE_YAW)

$(JPEG_FACE_0) : $(EQUIRECT_PREFIX).tif $(CUBE_PROJECT)
	$(NONA) -p UINT8 -i 0 -o $(JPEG_FACE_0_SHELL) $(CUBE_PROJECT_SHELL)
$(JPEG_FACE_1) : $(EQUIRECT_PREFIX).tif $(CUBE_PROJECT)
	$(NONA) -p UINT8 -i 1 -o $(JPEG_FACE_1_SHELL) $(CUBE_PROJECT_SHELL)
$(JPEG_FACE_2) : $(EQUIRECT_PREFIX).tif $(CUBE_PROJECT)
	$(NONA) -p UINT8 -i 2 -o $(JPEG_FACE_2_SHELL) $(CUBE_PROJECT_SHELL)
$(JPEG_FACE_3) : $(EQUIRECT_PREFIX).tif $(CUBE_PROJECT)
	$(NONA) -p UINT8 -i 3 -o $(JPEG_FACE_3_SHELL) $(CUBE_PROJECT_SHELL)
$(JPEG_FACE_4) : $(EQUIRECT_PREFIX).tif $(CUBE_PROJECT)
	$(NONA) -p UINT8 -i 4 -o $(JPEG_FACE_4_SHELL) $(CUBE_PROJECT_SHELL)
$(JPEG_FACE_5) : $(EQUIRECT_PREFIX).tif $(CUBE_PROJECT)
	$(NONA) -p UINT8 -i 5 -o $(JPEG_FACE_5_SHELL) $(CUBE_PROJECT_SHELL)

# a qvtr file

MOV = $(EQUIRECT_PREFIX).mov
MOV_SHELL = $(EQUIRECT_PREFIX_SHELL).mov

QTVR_NAME = 'Panorama created by hugin'
QTVR_PAN = 0.1
QTVR_TILT = 0.1
QTVR_FOV = 90.0

$(MOV) : faces
	jpeg2qtvr --outfile=$(MOV_SHELL) --prefix=$(CUBE_PREFIX_SHELL) --name=$(QTVR_NAME) \
	 --pan=$(QTVR_PAN) --tilt=$(QTVR_TILT) --fov=$(QTVR_FOV)

# a SPi-V cube strip

SPIV_CUBE = $(EQUIRECT_PREFIX)-SPiV_cube.jpg
SPIV_CUBE_SHELL = $(EQUIRECT_PREFIX_SHELL)-SPiV_cube.jpg

$(SPIV_CUBE) : $(JPEG_FACES)
	convert $(JPEG_FACES_SHELL) +append $(SPIV_CUBE_SHELL)

# a small JPEG preview

EQUIRECT_PREVIEW = $(EQUIRECT_PREFIX)-preview.jpg
EQUIRECT_PREVIEW_SHELL = $(EQUIRECT_PREFIX_SHELL)-preview.jpg

$(EQUIRECT_PREVIEW) : $(EQUIRECT_PREFIX).tif
	convert -geometry 320x160 $(EQUIRECT_PREFIX_SHELL).tif $(EQUIRECT_PREVIEW_SHELL)

# a very simple PanoSalado XML file

PANOSALADO = $(EQUIRECT_PREFIX)-PanoSalado.xml
PANOSALADO_SHELL = $(EQUIRECT_PREFIX_SHELL)-PanoSalado.xml
PANOSALADO_SWF = PanoSalado.swf

$(PANOSALADO) : $(JPEG_FACES) $(EQUIRECT_PREVIEW)
	echo -e $(XML_PANOSALADO) > $(PANOSALADO_SHELL)

XML_PANOSALADO = '<?xml version="1.0"?>\n\
<PanoSalado>\n\
  <layer id="PanoSalado" url="$(PANOSALADO_SWF)?xml=$(PANOSALADO)" depth="0" onStart="loadSpace:myPreview">\n\
    <spaces>\n\
      <space id="myPreview" onTransitionEnd="loadSpace:myPano">\n\
        <sphere id="myPreviewImage">\n\
          <file>$(EQUIRECT_PREVIEW)</file>\n\
        </sphere>\n\
      </space>\n\
      <space id="myPano">\n\
        <cube id="myPanoCubeFaces">\n\
          <file id="front">$(JPEG_FACE_0)</file>\n\
          <file id="right">$(JPEG_FACE_1)</file>\n\
          <file id="back">$(JPEG_FACE_2)</file>\n\
          <file id="left">$(JPEG_FACE_3)</file>\n\
          <file id="top">$(JPEG_FACE_4)</file>\n\
          <file id="bottom">$(JPEG_FACE_5)</file>\n\
        </cube>\n\
      </space>\n\
    </spaces>\n\
  </layer>\n\
</PanoSalado>'

# a very simple VRML file

VRML = $(EQUIRECT_PREFIX).wrl
VRML_SHELL = $(EQUIRECT_PREFIX_SHELL).wrl

$(VRML) : $(JPEG_FACES)
	echo -e $(TXT_VRML) > $(VRML_SHELL)

TXT_VRML = '\#VRML V2.0 utf8\n\
Background {\n\
 frontUrl  "$(JPEG_FACE_0)"\n\
 rightUrl  "$(JPEG_FACE_1)"\n\
 backUrl   "$(JPEG_FACE_2)"\n\
 leftUrl   "$(JPEG_FACE_3)"\n\
 topUrl    "$(JPEG_FACE_4)"\n\
 bottomUrl "$(JPEG_FACE_5)"\n\
}'

# a very simple X3D file

X3D = $(EQUIRECT_PREFIX).x3d
X3D_SHELL = $(EQUIRECT_PREFIX_SHELL).x3d

$(X3D) : $(JPEG_FACES)
	echo -e $(XML_X3D) > $(X3D_SHELL)

XML_X3D = '<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE\
 X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN"\
 "http://www.web3d.org/specifications/x3d-3.0.dtd">\n\
<X3D version="3.0" profile="Immersive"\
 xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance"\
 xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.0.xsd">\n\
  <Scene>\n\
    <Background\
     frontUrl="$(JPEG_FACE_0)"\
     rightUrl="$(JPEG_FACE_1)"\
     backUrl="$(JPEG_FACE_2)"\
     leftUrl="$(JPEG_FACE_3)"\
     topUrl="$(JPEG_FACE_4)"\
     bottomUrl="$(JPEG_FACE_5)" />\n\
  </Scene>\n\
</X3D>'

# a pto base for stereographic output

PTO_SGRAPHIC = $(EQUIRECT_PREFIX)-sgraphic.pto
PTO_SGRAPHIC_SHELL = $(EQUIRECT_PREFIX_SHELL)-sgraphic.pto

$(PTO_SGRAPHIC) : $(EQUIRECT_PREFIX).tif
	erect2planet $(EQUIRECT_PREFIX_SHELL).tif

# a stereographic view looking up

SKY_PREFIX = $(EQUIRECT_PREFIX)-sky
SKY_PREFIX_SHELL = $(EQUIRECT_PREFIX_SHELL)-sky
PTO_SKY = $(SKY_PREFIX).pto
PTO_SKY_SHELL = $(SKY_PREFIX_SHELL).pto
TIFF_SKY = $(SKY_PREFIX)_0000.tif
TIFF_SKY_SHELL = $(SKY_PREFIX_SHELL)_0000.tif
JPEG_SKY = $(SKY_PREFIX).jpg
JPEG_SKY_SHELL = $(SKY_PREFIX_SHELL).jpg

$(PTO_SKY) : $(PTO_SGRAPHIC)
	transform-pano 0 -90 0 $(PTO_SGRAPHIC_SHELL) $(PTO_SKY_SHELL)

$(TIFF_SKY) : $(PTO_SKY)
	$(NONA) -r ldr -m TIFF_m -i 0 -o $(SKY_PREFIX_SHELL)_ $(PTO_SKY_SHELL)

$(JPEG_SKY) : $(TIFF_SKY)
	convert -quality $(JPEG_QUALITY) $(TIFF_SKY_SHELL) $(JPEG_SKY_SHELL)
	$(EXIFTOOL) -overwrite_original_in_place -TagsFromFile $(INPUT_IMAGE_1_SHELL) \
	$(EXIFTOOL_COPY_ARGS) $(JPEG_SKY_SHELL)

# a stereographic view looking down

PLANET_PREFIX = $(EQUIRECT_PREFIX)-planet
PLANET_PREFIX_SHELL = $(EQUIRECT_PREFIX_SHELL)-planet
PTO_PLANET = $(PLANET_PREFIX).pto
PTO_PLANET_SHELL = $(PLANET_PREFIX_SHELL).pto
TIFF_PLANET = $(PLANET_PREFIX)_0000.tif
TIFF_PLANET_SHELL = $(PLANET_PREFIX_SHELL)_0000.tif
JPEG_PLANET = $(PLANET_PREFIX).jpg
JPEG_PLANET_SHELL = $(PLANET_PREFIX_SHELL).jpg

$(PTO_PLANET) : $(PTO_SGRAPHIC)
	transform-pano 0 90 0 $(PTO_SGRAPHIC_SHELL) $(PTO_PLANET_SHELL)

$(TIFF_PLANET) : $(PTO_PLANET)
	$(NONA) -r ldr -m TIFF_m -i 0 -o $(PLANET_PREFIX_SHELL)_ $(PTO_PLANET_SHELL)

$(JPEG_PLANET) : $(TIFF_PLANET)
	convert -quality $(JPEG_QUALITY) $(TIFF_PLANET_SHELL) $(JPEG_PLANET_SHELL)
	$(EXIFTOOL) -overwrite_original_in_place -TagsFromFile $(INPUT_IMAGE_1_SHELL) \
	$(EXIFTOOL_COPY_ARGS) $(JPEG_PLANET_SHELL)

# a mercator view

MERCATOR_PREFIX = $(EQUIRECT_PREFIX)-mercator
MERCATOR_PREFIX_SHELL = $(EQUIRECT_PREFIX_SHELL)-mercator
PTO_MERCATOR = $(MERCATOR_PREFIX).pto
PTO_MERCATOR_SHELL = $(MERCATOR_PREFIX_SHELL).pto
TIFF_MERCATOR = $(MERCATOR_PREFIX)_0000.tif
TIFF_MERCATOR_SHELL = $(MERCATOR_PREFIX_SHELL)_0000.tif
JPEG_MERCATOR = $(MERCATOR_PREFIX).jpg
JPEG_MERCATOR_SHELL = $(MERCATOR_PREFIX_SHELL).jpg

$(PTO_MERCATOR) : $(EQUIRECT_PREFIX).tif
	erect2mercator $(EQUIRECT_PREFIX_SHELL).tif

$(TIFF_MERCATOR) : $(PTO_MERCATOR)
	$(NONA) -r ldr -m TIFF_m -i 0 -o $(MERCATOR_PREFIX_SHELL)_ $(PTO_MERCATOR_SHELL)

$(JPEG_MERCATOR) : $(TIFF_MERCATOR)
	convert -quality $(JPEG_QUALITY) $(TIFF_MERCATOR_SHELL) $(JPEG_MERCATOR_SHELL)
	$(EXIFTOOL) -overwrite_original_in_place -TagsFromFile $(INPUT_IMAGE_1_SHELL) \
	$(EXIFTOOL_COPY_ARGS) $(JPEG_MERCATOR_SHELL)

# This Makefile is only useful for equirectangular
ifeq ($(HUGIN_PROJECTION),2)
faces : $(JPEG_FACES)
qtvr : $(MOV)
spiv : $(SPIV_CUBE)
panosalado : $(PANOSALADO)
vrml : $(VRML)
x3d : $(X3D)
preview : $(EQUIRECT_PREVIEW)
sky : $(JPEG_SKY)
planet : $(JPEG_PLANET)
mercator : $(JPEG_MERCATOR)
else
equirect_all faces qtvr spiv panosalado vrml x3d preview sky planet mercator :
endif

# cleanup

equirect_clean : faces_clean sky_clean planet_clean mercator_clean

faces_clean :
	$(RM) -f $(JPEG_FACES_SHELL) $(CUBE_PROJECT_SHELL)
sky_clean :
	$(RM) -f $(TIFF_SKY_SHELL)
planet_clean :
	$(RM) -f $(TIFF_PLANET_SHELL)
mercator_clean :
	$(RM) -f $(TIFF_MERCATOR_SHELL)