Skip to content

Commit

Permalink
Some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lim185 committed Dec 6, 2024
1 parent 21b84b7 commit b0e1459
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
sample data, and it's like generating droids.
"""

import pyspark
from pyspark.sql import SparkSession

if __name__ == "__main__":
pass
SparkSession.builder.appName("geonosis").getOrCreate()

# EOF
15 changes: 15 additions & 0 deletions pipe/pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,19 @@
pipe.py
"""

from pathlib import Path
import typing

import cv2 as cv
import numpy as np
import pyspark

def image_pipe(imagepath: Path, namepattern: str, stacksize: int)
-> np.ndarray:
images = np.zeros((stacksize, 800,800)
for i in range(stacksize):
images[i,:,:] = cv.imread(imagepath/namepattern.format(i), -1)

return images

# EOF

0 comments on commit b0e1459

Please sign in to comment.